If you are playing a router, you know that the router is very fun command abbreviation.
For example, "Sh Int" means "show interface".
Now Windows 2000 has a similar interface tool called Netsh.
We entered Netsh under the cmd shell of Windows 2000
Just come out: Netsh> prompt,
Enter int ip is displayed:
Interface IP>
Then enter DUMP, we can see the network configuration of the current system:
# ----------------------------------
# Interface IP Configuration
# ----------------------------------
Pushd Interface IP
# Interface IP Configuration for "Local Area Connection"
SET Address name = "local area connection" Source = static addr = 192.168.1.168
Mask = 255.255.255.0
Add address name = "local area connection" addr = 192.1.1.111 mask = 255.255.255.0
Set address name = "local area connection" gateway = 192.168.1.100 gwmetric = 1
SET DNS Name = "Local Area Connection" Source = static addr = 202.96.209.5
SET WINS Name = "Local Area Connection" Source = static addr = none
Popd
# END of Interface IP Configuration
The above introduction is one way to operate by interactive.
We can enter the command directly:
"Netsh Interface IP Add Address" Local Area Connection "10.0.0.2
255.0.0.0 "
To add an IP address.
If you don't know the grammar, don't be tight!
At the prompt, enter? You can find the answer. Convenient and inconvenient?
It turns out that Microsoft's things are there, there are so some people who love. Unfortunately, it is very few!
Windows network command line program
This part includes:
View configuration using IPCONFIG / ALL
Refresh configuration using IPConfig / Renew
Manage DNS and DHCP Categories ID using IPConfig
Use PING test connection
Use ARP to resolve hardware address issues
Use nbtstat to solve the NetBIOS name problem
Display connection statistics using NetStat
Use Tracert Tracking Network Connections
Use the PATHPING test router
View configuration using IPCONFIG / ALL
When discovering and resolving TCP / IP network issues, check the TCP / IP configuration on a computer that appears. can
Use the ipconfig command to get host configuration information, including IP addresses, subnet masks, and default gateways.
note
For Windows 95 and Windows 98 clients, use the WiniPCFG command instead of the ipconfig command.
When using the IPConfig command with / all option, a detailed configuration report for all interfaces, including any
The configured serial port. Use ipconfig / all to redirect the command output to a file and will
Output is pasted into other documents. You can also confirm the TCP / IP configuration of each computer on the network with this output, or
Further investigate TCP / IP network issues.
For example, if the IP address of the computer is repeated with the existing IP address, the subnet mask is displayed as 0.0.0
.0.
The following example is the ipconfig / all command output, which is configured to dynamically configure the DHCP server.
TCP / IP, and use the WINS and DNS server parsing names.
Windows 2000 IP Configuration
...........: Hybrid
IP routing enabled .....: No
Wins proxy enabled .....: No
Ethernet Adapter Local Area Connection:
Host name ................: Corp1.microsoft.com
.............: 10.1.0.200
Description.......................................
Physical address..................................
DHCP enabled .............
AutoConfiguration enabled .: YES
IP address.............: 192.168.0.112
Subnet mask.............: 255.255.0.0
192.168.0.1
DHCP Server............: 10.1.0.50
PRIMARY WINS Server.....: 10.1.0.101
Secondary Wins Server...: 10.1.0.102
Wednesday, September 02, 1998 10:32:13 AM
Lease expression........: Friday, September 18, 1998 10:32:13 AM
If the TCP / IP configuration is no problem, the next test can be connected to other hosts on the TCP / IP network.
Refresh configuration using IPConfig / Renew
To resolve the TCP / IP network problem, check the TCP / IP configuration on the computer that encounters a problem. Computers
Enable DHCP and use the DHCP server to get the configuration, please use the ipconfig / renew command to start refresh
approximately.
When using IPConfig / Renew, all NICs on the computer of DHCP (except those manually configured)
The adapter) is connected to the DHCP server, updating an existing configuration or get a new configuration.
You can also immediately release the current DHCP configuration of the host using the ipconfig command with the / Release option. Have
For more information on the DHCP and rental processes, see How to get the configuration.
note
For Windows 95 and Windows 98 customers enabled DHCP, use the Winipcfg command to
Ease and rent options instead of ipconfig / release and ipconfig / renew commands, manually releasing or updating customer IP configuration leases.
Manage DNS and DHCP Categories ID using IPConfig
You can also use the ipconfig command:
Display or reset the DNS cache.
For more information, see Use IPConfig to view or reset the customer resolution program.
Refresh the registered DNS name.
For more information, see Updating DNS Customer Registration with IPConfig.
Displays the DHCP Category ID of the adapter.
For more information, see Displaying the DHCP Category ID information on the client.
Set the DHCP category ID of the adapter.
For more information, see Setting the DHCP Category ID information on the client.
Use PING test connection
The ping command helps to verify the connectivity of the IP level. When discovering and solving problems, you can use ping to go to the target
Machine name or IP address sends an ICMP response request. Need to verify that the host can connect to TCP / IP networks and networks
When resources are resource, please use ping. You can also use ping to isolate network hardware issues and incompatible configurations.
Usually, it is best to verify that the route between the local computer and the network host is exist with the PING command, and
The IP address of the connected network host. The IP address of the PING target host does not respond, as follows:
PING ip_address
When using ping, you should perform the following steps:
Ping loopback address Verify that TCP / IP is installed on the local computer and whether the configuration is correct.
Ping 127.0.0.1
Ping local computer IP address verification is added correctly to the network.
PING ip_address_of_local_host
PING The IP address of the default gateway verifies whether the default gateway is running and whether it can be connected to the local host on the local network.
News.
PING ip_address_of_default_gateway
The IP address verification of the PING remote host can communicate via the router.
PING ip_address_of_remote_host
The ping command parsing the computer name into an IP address with a name resolution of the Windows socket style, so if
Submitted by the address, but with the name PING failed, the problem is on the address or name resolution, not the network.
Treatment problem. For more information, see Using ARP to resolve hardware address issues.
If you can't use ping in any point, please confirm:
Restart your computer after installing and configuring TCP / IP.
"Internet Protocol (TCP / IP) Properties dialog" General "IP address on the local computer on the General tab
Effective and correct.
Enable IP routing, and link between the router is available.
You can use the different options for the ping command to specify the size of the packet to use, how many data packets are to be sent,
Whether the useful route, the living time (TTL) value to use, and whether the "no segment" flag is set. can
Type these options to type ping -?
The following example shows how to send two pings to IP addresses 172.16.48.10, each is 1,450 bytes:
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
Ping Statistics for 157.59.8.1:
Packets: Sent = 2, Received = 2, Lost = 0 (0% LOSS), Approximate Roundtrip Times in Milli-Seconds:
Minimum = 0ms, Maximum = 10ms, Average = 2MS
By default, the time that PING waits for 1,000 milliseconds (1 second) will return each response before displaying "request timeout". If a long-term delayed link is passed through the remote system, such as a satellite link, the response may take longer to return. You can use the -w (wait) option to specify a longer time timeout.
Use ARP to resolve hardware address issues
"Address Resolution Protocol (ARP)" allows the host to find the media access control address of the host on the same physical network, if the latter's IP address is given. To make the ARP more efficient, each computer cache IP to the media access control address map eliminates the repeated ARP broadcast request.
You can use the ARP command to view and modify the ARP entry on the local computer. The ARP command is useful for viewing ARP caches and resolving address resolution issues.
For more information, see Viewing the Address Resolution Protocol (ARP) cache and add a static ARP cache item.
Use nbtstat to solve the NetBIOS name problem
NetBIOS (NetBT) on TCP / IP resolves the NetBIOS name into an IP address. TCP / IP provides a lot of options for NetBIOS name, including local cache search, WINS server query, broadcast, DNS server queries, and LMHOSTS and host file searches.
NBTSTAT is a useful tool to solve the NetBIOS name resolution problem. You can use the nbtstat command to delete or correct preloaded items:
NBTSTAT-N Displays the names local registered locally locally on the system, or the program, or a redirector.
NBTSTAT -C Displays the NetBIOS name cache, contains the name of the other computer to the address mapping.
NBTSTAT -R Clears the name cache and then reload from the LMHOSTS file.
NBTSTAT -RR releases the NetBIOS name registered on the WINS server and refreshes their registration.
NBTSTAT -A Name executes the NetBIOS adapter status command to the computer specified by the Name. The adapter status command will return to the local NetBIOS name table of the computer, as well as the media access control address of the adapter.
NBTSTAT -S lists current NetBIOS sessions and their status (including statistics), as shown in the following example:
NetBIOS Connection Table
Local name State In / Out Remote Host Input Output
-------------------------------------------------- ----------------
Corp1 <00> Connected Out Corpsup1 <20> 6MB 5MB
Corp1 <00> Connected Out Corpprint <20> 108KB 116KB
Corp1 <00> Connected Out Corpsrc1 <20> 299KB 19KB
Corp1 <00> Connected Out CorpeMail1 <20> 324KB 19KB
Corp1 <03> listening
Display connection statistics using NetStat