NETSTAT


The netstat command is used to check if a valid route to the destination machine exists in the routing table. When the netstat command is run, it displays a routing table - a simple table that routes data packets according to the routing data contained within the table.

If a problem is in the routing table of the local host (a local routing problem), it will be indicated by an error message such as "network unreachable", or if netstat is run, the correct or expected route is not returned.

If netstat is run and either a specified or valid route is returned, then the routing table is valid, and any faults will lie outside of the routing table. The next step at this point, would be to run the traceroute / tracert command.

There are usually entries in the routing table for the local host and the default gateway. The local host has a loopback route, and this loopback route is used by every system to enable a system to send data back to itself (hence the name "loopback"). The default gateway has a default route that is specified if no route is identified in the routing table for the network address of the destination machine.

netstat can be run without any options, just by typing:

netstat

or to display more details on the routing table with the -r option (to display the routing table), and the -n option (to display the routing table numerically):

netstat -nr

References





www.cyberthinc.com