Windows network command Line program parameter description _ Application Tips

Source: Internet
Author: User
Windows Network Command line program
C:\>nslookup www.jb51.net
Server:www
address:192.168.5.8
Non-authoritative Answer:
Name:www.jb51.net
address:202.103.69.64
This section includes:
Shi
Use Ipconfig/all to view configuration
Use Ipconfig/renew to refresh the configuration
For DHCP-enabled Windows 95 and Windows 98 customers, use the release and renew options for the winipcfg command, instead of the ipconfig/release and Ipconfig/renew commands, manually releasing or update the client's IP configuration lease
Using Ipconfig to manage DNS and DHCP class IDs
Use Ping to test connection ping-a 0.0.0.0IP address is the host name that resolves NetBIOS
You can specify a longer timeout using the-W (wait) option
C:\>ping-n 2-l 1450 172.16.48.10
Pinging 172.16.48.10 with 1450 bytes of data:
Reply from 172.16.48.10:bytes=1450 time<10ms ttl=32
Reply from 172.16.48.10:bytes=1450 time<10ms ttl=32
Resolving hardware address problems with ARP
Resolving NetBIOS name problems with nbtstat resolving NetBIOS names to IP addresses
Display connection statistics using netstat
Using tracert to track network connections
Testing routers using Pathping
Netstat-a shows all the ports that your computer is currently opening
Netstat-s-E More detailed display of your network data, including TCP, UDP, ICMP and IP statistics, etc.
Probe the opponent's computer name, the group, domain, and current user name
Ping-a ip-t, showing only NetBIOS names
Nbtstat-a 192.168.10.146 is more complete.
Nbtstat
Displays the NetBIOS statistics, NetBIOS name table, and NetBIOS name cache for the TCP/IP (NetBT) protocol for the local computer and the remote computer. Nbtstat can refresh the NetBIOS name cache and registered Windows Internet Name Service (WINS) names. Use nbtstat with no parameters to display Help
10. Routing Trace Command
Tracert Working principle
The Tracert diagnostics determine the route to the destination by sending an Internet Control Message Protocol (ICMP) response packet to the destination with different IP time to live (TTL) values. Requires that each router on the path decrements at least 1 of the TTL on the packet before forwarding the packet. The TTL on the packet is reduced to 0 o'clock, and the router should send the "ICMP timed out" message back to the source system.
Tracert sends a response packet with a TTL of 1 and increments the TTL by 1 in each subsequent send process until the target response or TTL reaches its maximum value to determine the route. Route is determined by examining the "ICMP timed out" message sent back by the intermediary router. Some routers discard the TTL-expired packets without asking, which is not visible in the tracert utility.
The Tracert command prints a list of the near-end router interfaces in the path that returns the ICMP timeout message in order. If you use the-D option, the Tracert utility does not query DNS on each IP address.
A.tracert pop.pcpop.com
C:\>tracert-d 202.103.96.112
tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] Target_name
Option description
-d specifies that the IP address is not resolved to the host name.
-h maximum_hops Specifies the metric to track the route to a host called Target_name.
-j host-list Specifies the list of router interfaces in the path used by the Tracert utility packet.
-W Timeout Wait timeout the number of milliseconds specified for each reply.
Target_name the name or IP address of the target host.
B.pathping pop.pcpop.com, in addition to displaying routing, also provides 325S analysis to calculate% of lost packages
Testing routers using Pathping
The Pathping command is a route tracking tool that combines the functionality of the ping and Tracert commands with other information not provided by the two tools. The Pathping command sends packets over a period of time to each router on the path to the final destination, and then returns from each hop based on the packet's computer results. Because the command displays the extent to which packets are lost on any given router or link, you can easily identify the routers or links that may be causing network problems. Some options are available, as shown in the following table.
Option name feature
-N hostnames does not resolve addresses to host names.
-H Maximum hops the maximum number of hops for the search target.
-G host-list releases source routes along the routing list.
-P Period The number of milliseconds to wait between pings.
-Q num_queries The number of queries per hop.
The number of milliseconds that the-W time-out waits for each reply.
-T Layer 2 tag connects the 2nd-tier priority tag (for example, to IEEE 802.1p) to a packet and sends it to each network device in the path. This helps identify network devices that do not have the proper configuration of level 2nd priority. The-t switch is used to test quality of service (QoS) connectivity.
-R RSVP isbase che check to determine whether each router in the path supports the Resource Reservation Protocol (RSVP), which allows the host to reserve a certain amount of bandwidth for the data stream. The-r switch is used to test quality of service (QoS) connectivity.
The default metric is 30, and the default wait time before the timeout is 3 seconds. The default time is 250 milliseconds, and the number of queries per router along the path is 100.
Probe ARP binding (dynamic and Static) list, show all connected to my computer, display the other IP and MAC address
Arp-a
7. On the proxy server side
Bundle IP and MAC addresses to resolve IP theft in LAN:
Arp-s 192.168.10.59 00-50-ff-6c-08-75
To unbind the IP of the NIC from the MAC address:
ARP-D Network card IP
To view the shared resources on this IP, you can
C:\>net View 192.168.10.8
View user account List net user on a computer
C. View network link net use
For example: net use Z: \\192.168.10.8\movie maps this IP movie shared directory to a local z disk
11. Several commands for shared security
A. View your machine's shared resources net share
B. Manual deletion of shares
NET share C/d
NET share d$/d
NET share ipc$/d
NET share admin$/d
Note that there are spaces after the $.
C. Add a share:
C:\net share Mymovie=e:\downloads\movie/users:1
Mymovie shared successfully.
Also limit the number of linked users to 1 people.
Set static IP
Cmd
Netsh
Netsh>int
Interface>ip
Interface ip>set Add "local link" static IP address mask Gateway
Using the command route print, view the current routing table, there should be no 61.132.122.118 and 61.132.122.117 routes, and if so, use the command route delete (IP). Using commands
Route Add–p 61.132.122.118 10.84.0.1
Route Add–p 61.132.122.117 10.84.0.3
The use skill of Route
Most hosts typically reside on a network segment that is connected to only one router. Because there is only one router, there is no problem using which router to publish datagrams to a remote computer, and the IP address of the router can be entered as the default gateway for all computers on the network segment.
However, when there are two or more routers on the network, we do not necessarily want to rely on the default gateway alone. We may actually want some of our remote IP addresses to pass through a particular router, while other remote IP passes through another router.
In this case, we need the appropriate routing information, which is stored in the routing table, each host and each router with its own unique routing table. Most routers use specialized routing protocols to exchange and dynamically update routing tables between routers. In some cases, however, items must be manually added to the routing table on the router and host. Route is used to display, manually add and modify routing table entries.
General usage Options:
Route Print
This command displays the current project in the routing table, the output on a single router network segment, and all of these items are automatically added because the network adapter is configured with an IP address.
Route Add
Using this command, you can add a letter-routed project to the routing table. For example If you want to set a route to the destination network 209.98.32.33, which has to go through 5 routers network segment, first to pass through a local network router, IP 202.96 123.5, subnet mask 255.255.255.224, then we should enter the following command:
Route add 209.98.32.33 Mask 255.255.255.224 202.96.123.5 metric 5
Route Change
We can use this command to modify the transmission route of the data, but we cannot use this command to change the destination of the data. The following example can change the routing of data to another router, which takes a more straight path with 3 segments:
Route add 209.98.32.33 Mask 255.255.255.224 202.96.123.250 metric 3
Route Delete
Use this command to remove a route from the routing table. For example: ROUTE delete 209.98.32.33
The IP address of the interface, the subnet mask, and the configuration of the default gateway automatically determine the number of hops in the routing table. The Automatically determined interface metric for the default startup determines the speed of each interface, adjusts the routing metric for each interface, so the route created by the fastest interface has the lowest metric. To remove a large metric, disable the automatic determination of the interface metric in the advanced properties of the TCP/IP protocol for each LAN connection.
If an appropriate entry exists in the local network file in the systemroot\System32\Drivers\Etc folder, the name can be used for destination. As long as the name can be decomposed into IP addresses through standard hostname resolution techniques such as Domain Name System (DNS) queries, it can be used for GATEWAY,DNS queries using local host files stored under the systemroot\System32\Drivers\Etc folder and NetBIOS name resolution.
If it is a print or delete command, you can ignore the gateway parameter and use wildcard characters to represent the target and gateway. Destination values can be wildcard characters specified by an asterisk (*). If the specified target contains an asterisk (*) or a question mark (?), it is considered a wildcard character, and only the matching destination route is printed or deleted. An asterisk represents any sequence of characters, and a question mark represents any character. For example, 10.*.1, 192.168.*, 127.*, and *224* are all valid uses of the asterisk wildcard character.
Using a combination of invalid destination and subnet mask (netmask) values, the Route:bad gateway address netmask error message is displayed. This error occurs when the target has one or more digits set to 1, and its corresponding bit in the subnet mask is set to 0. You can check this by representing the target and subnet masks in binary notation. A binary subnet mask consists of a series of 1 representing the destination network address portion and a series of 2 parts representing the destination host address portion. View the target to determine whether the host address portion of the target (as defined by the subnet mask) is set to 1.
Only the Windows NT 4.0, Windows 2000, Windows Millennium Edition, and Windows XP route commands support the-p parameter. The route command for Windows 95 or Windows 98 does not support this parameter.
This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component of network adapter properties in a network connection.
Example
To display the full contents of the IP routing table, type:
Route print
To display the IP routing table in 10. The route you started, type:
Route print 10.*
To add a default route with a default gateway address of 192.168.12.1, type:
Route add 0.0.0.0 Mask 0.0.0.0 192.168.12.1
To add a target of 10.41.0.0, the subnet mask is 255.255.0.0, and the next hop address is a 10.27.0.1 route, type:
Route add 10.41.0.0 Mask 255.255.0.0 10.27.0.1
To add a target of 10.41.0.0 with a subnet mask of 255.255.0.0 and a permanent route with the next hop address 10.27.0.1, type:
Route-p Add 10.41.0.0 mask 255.255.0.0 10.27.0.1
To add a destination of 10.41.0.0, the subnet mask is 255.255.0.0, and the next hop address is 10.27.0.1, and the route with a hop count of 7, type:
Route add 10.41.0.0 Mask 255.255.0.0 10.27.0.1 metric 7
To add a target of 10.41.0.0, the subnet mask is 255.255.0.0, and the next hop address is 10.27.0.1, and the interface is indexed to 0x3 routes, type:
Route add 10.41.0.0 Mask 255.255.0.0 10.27.0.1 if 0x3
To delete a route with a target of 10.41.0.0 with a subnet mask of 255.255.0.0, type:
Route Delete 10.41.0.0 Mask 255.255.0.0
To delete the IP routing table in 10. All the routes that started, please type:
Route Delete 10.*
To target a 10.41.0.0, the next hop address for a route with a subnet mask of 255.255.0.0 changed from 10.27.0.1 to 10.27.0.25, type:
Route change 10.41.0.0 Mask 255.255.0.0 10.27.0.25
How to change the IP address-> Windows 2k/2003 Server under WindowsServer cmd
To change the IP address at the command line
WINDOWS2000 is now the more popular operating system, its function is very powerful, it can even like Unix at the command line to do a lot of work. The following is a way to change the IP address at the command line, which is now introduced to you (in parentheses there are some annotations, which are manually entered in bold letters):
C:\>ipconfig (First Use ipconfig this command to look at the IP address before the change)
Windows IP Configuration
Ethernet Adapter Local Area Connection:
Connection-specific DNS Suffix. :
IP address ...: 10.1.1.94 (IP prior to local connection change).
Subnet Mask ........... : 255.255.255.0
Default Gateway ..... . : 10.1.1.254
C:\>netsh (enter setup mode)
Netsh>interface
Interface>ip
Interface Ip>set Address "Local Area Connection" Static 10.1.1.111 255.255.255.0 10.1.1.254
Interface Ip>exit
The set command above is explained in detail as follows:
Set addressing-sets the IP address and default gateway for the specified interface.
Set DNS-sets the DNS server mode and address.
Set wins-sets the WINS server mode and address.
C:\>ipconfig (change and then use the ipconfig command to check to see if the change succeeds)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.