Introduction to 3 Network Diagnostics Commands under Windows

  

Collected several network diagnostic commands, under Windows.

First of all the commands under Windows can use the “--help” parameter to view the help information.

Routing Information Command-----route

View Local Routing Table
Copy Code
The code is as follows: Route print

Add route< Br>Copy code
The code is as follows: Route add Network address (192.168.1.0) mask 255.255.255.0 (Mask) 192.168.1.1 (Gateway) where the increase at the end "-p"" parameter is increased to permanent Routing, that is, writing to the registry, the machine restart is not lost.

Adding a "metric 10(number)" parameter at the end sets the priority for this route. The smaller the number, the higher the priority.

****Add the "if ip address" parameter at the end to set the NIC port for this route. It is useful when the machine is equipped with multiple NICs. This option is for testing.

Delete routing
Copy code
The code is as follows: Route delete Network address mask Mask gateway

When the machine is equipped with multiple network cards, this delete command will prompt an error. “ specified path can not be found, some people say that this is a small bug in win2003, the specific solution was not found, the alternative is to add a higher priority routing information of this network segment.

Routing Trace Command------tracert

“-d” The parameter prohibits parsing ip as hostname.

Port Information Command-----netstat

“-a”Parameter Display All

“-n” Display Port Information in Digital Format

“-o”Show the process id associated with each connection

Copyright © Windows knowledge All Rights Reserved