netstat is a useful tool for checking your network configuration
and activity. It is in fact a collection of several tools lumped
together. We discuss each of its functions in the following
sections. When you invoke netstat with the –r flag, it displays
the kernel routing table in the way we've been doing with route.
On vstout, it produces: # netstat -nr Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo 172.16.1.0 *
255.255.255.0 U 0 0 0 eth0 172.16.2.0 172.16.1.1 255.255.255.0
UG 0 0 0 eth0 The –n option makes netstat print addresses as
dotted quad IP numbers rather than the symbolic host and network
names. This option 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 to
which the routing entry points. If no gateway is used, an
asterisk is printed instead. The third column shows the
“generality” of the route, i.e., the networ