Previous Page
Next Page

Network Maintenance

Solaris provides several network commands that you can use to check and troubleshoot a network:

  • ping ping stands for packet Internet groper. The ping command sends an ICMP packet to another host to test its network status. The remote system sends an ICMP packet back to the originating host if the ping command succeeds. If no packet is received from the remote system then it is deemed to be down and a message is returned to the calling host. The options to the command allow continuous packets or a specified number of packets to be sent as well as different sizes of packets.

  • snoop The snoop command captures and inspects network packets. Captured packets can be displayed as they are received or saved into a file to be analyzed later. snoop can produce large amounts of information, with each entry being displayed in single-line summary form or multiline verbose form.

  • netstat The netstat command displays network status information. You can see the status of the network interface, monitor how many packets are passing through the interface, and monitor how many errors are occurring. This command is used extensively in identifying overloaded networks where the packet collision rate would be much higher than expected.

Each of the commands listed here are demonstrated in Step by Step 8.2.

Step By Step 8.2: Verifying That a Network Is Operational

Check the network connection to another system by typing the following:

ping <options> <ip-address>

For example, to check the network between systemA and systemB, type ping systemB from systemA. If the check is successful, the remote system replies with this:

systemB is alive

If the network is not active, you get this message:

no answer from systemB

If you get this negative response, check your cable and make sure that both the local system and the remote system are configured properly.

Use the snoop utility to determine what information is flowing between systems. The snoop utility can show what actually happens when one system sends a ping to another system. The following example shows network traffic being monitored between two hosts, namely and


The system responds with the following:

Using device /dev/hme (promiscuous mode) -> ICMP Echo request (ID: 2677
 Sequence number\
: 0) -> ICMP Echo reply (ID: 2677 Sequence
 number: \

Check for network traffic by typing the following:

netstat -i 5

The system responds with this:

input   hme0   output  input   (Total)  output
packets errs  packets errs colls packets errs  packets errs colls
95218   49983 189     1    0     218706  49983 123677  1    0
0       0     0       0    0     3       0     3       0    0
0       0     0       0    0     4       0     4       0    0
1       1     0       0    0     144     1     143     0    0
0       0     0       0    0     256     0     256     0    0
0       0     0       0    0     95      0     95      0    0
0       0     0       0    0     1171    0     1171    0    0

The netstat command is used to monitor the system's TCP/IP network activity. netstat can provide some basic data about how much and what kind of network activity is happening. You should ignore the first line of output, as this shows the overall activity since the system was last booted. The -i option shows the state of the network interface used for TCP/IP traffic. The last option, 5, reissues the netstat command every 5 seconds to get a good sampling of network activity, with each line showing the activity since the last display, in this case 5 seconds. You can press Ctrl+C to break out of the netstat command.

Look in the colls column to see if there is a large number of collisions. To calculate the network collision rate, divide the number of output collisions (output colls) by the number of output packets. A network wide collision rate greater than 10% can indicate an overloaded network, a poorly configured network, or hardware problems.

Examine the errs column to see if there is a large number of errors. To calculate the input packet error rate, divide the number of input errors by the total number of input packets. If the input error rate is highmore than 25%the host might be dropping packets because of transmission problems. Transmission problems can be caused by other hardware on the network and by heavy traffic and low-level hardware problems. Routers can drop packets, forcing retransmissions and causing degraded performance.

Type ping -sRv <hostname> from the client to determine how long it takes a packet to make a round-trip on the network. If the round-trip takes more than a few milliseconds, the routers on the network are slow or the network is very busy. Issue the ping command twice and ignore the first set of results.

The ping -sRv command also displays packet losses. If you suspect a physical problem, you can use ping -sRv to find the response times of several hosts on the network. If the response time (in milliseconds) from one host is not what you expect, you should investigate that host.

Previous Page
Next Page