|
Next: Displaying Interface Statistics Up: Checking with netstat Previous: Checking with netstat
Displaying the Routing TableWhen invoking netstat with the -r flag, it displays the kernel routing table in the way we've been doing this with route above. On vstout, it produces:# netstat -nr Kernel routing table Destination Gateway Genmask Flags Metric Ref Use 127.0.0.1 * 255.255.255.255 UH 1 0 191.72.1.0 * 255.255.255.0 U 1 0 191.72.2.0 191.72.1.1 255.255.255.0 UGN 1 0The -n option makes netstat print addresses as dotted quad IP-numbers rather than the symbolic host and network names. This is especially useful when you want to avoid address lookups over the network (e.g. to a DNS or NIS server). The second column of netstat's output shows the gateway the routing entry points to. If no gateway is used, an asterisk is printed instead. Column three shows the ``generality'' of the route. When given an IP-address to find a suitable route for, the kernel goes through all routing table entries, taking the bitwise AND of the address and the genmask before comparing it to the target of the route. The fourth column displays various flags that describe the route:
Andrew Anderson Thu Mar 7 23:22:06 EST 1996 |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |