OIT Logo
-

   Search
   Princeton University
   OIT Help Desk
   OIT Servers & Storage
  
     



Network Debugging

ifconfig

ifconfig is the primary command to use for debugging network interface problems, especially ifconfig -a. If necessary, ifconfig -a statements can be inserted into rc scripts to track interface condition during the boot process.

The first thing to check is that all values from ifconfig -a are as expected (FLAGS=UP and RUNNING, MTU=1500 for ethernet, INET=IP address, NETMASK correct (255.255.252.0 for Princeton), BROADCAST correct, ETHER=ethernet address).

netstat

netstat provides useful information regarding traffic flow. In particular, netstat -i lists statistics for each interface, netstat -s provides a full listing of several counters, and netstat -rs provides routing table statistics. netstat -k provides a useful summary of several network-related statistics, but this option is officially unsupported and may be removed in a future release.

Here are some of the issues that can be revealed with netstat:

  • netstat -i: (Collis+Ierrs+Oerrs)/(Ipkts+Opkts) > 2%: This may indicate a network hardware issue.
  • netstat -i: (Collis/Opkts) > 10%: The interface is overloaded. Traffic will need to be reduced or redistributed to other interfaces or servers.
  • netstat -i: (Ierrs/Ipkts) > 25%: Packets are probably being dropped by the host, indicating an overloaded network (and/or server). Retransmissions can be dropped by reducing the rsize and wsize mount parameters to 2048 on the clients. Note that this is a temporary workaround, since this has the net effect of reducing maximum NFS throughput on the segment.
  • netstat -s: If significant numbers of packets arrive with bad headers, bad data length or bad checksums, check the network hardware.
  • netstat -i: If there are more than 120 collisions/second, the network is overloaded. See the suggestions above.
  • netstat -i: If the sum of input and output packets is higher than about 600 for a 10Mbs interface or 6000 for a 100Mbs interface, the network segment is too busy. See the suggestions above.

snoop

snoop provides a snapshot of network traffic. This utility gives a definitive answer to the question whether packets are arriving at their destination.

ping and traceroute

ping -sRv (or traceroute, if available) can provide useful routing information that may pinpoint the source of network congestion.




Page © 2011 by the Trustees of Princeton University.
Content © 2011 by Scott Cromar, from The Solaris Troubleshooting Handbook. Used with permission.
Comments on the contents of this page may be logged to
The Solaris Troubleshooting Blog