|
|
In addition, the following sections contain information on troubleshooting PPP, routing problems and various TCP/IP protocols:
If there is trouble on the network, here are some actions you can take to diagnose and fix software-related problems.
The resulting display should resemble the following if the inetd daemon is running:
root 21038 359 TS 80 0 Oct 15 ? 0:01 /usr/sbin/inetd root 16155 16100 TS 85 0 12:37:10 pts/3 0:00 grep inetdIf inetd is not running, restart it by entering:
or by shutting down and rebooting the machine.
You can use the netinfo command to see the network devices that are configured on a host.
To list all the devices for the network adapters
that are installed in your machine, enter:
netinfo -l dev
To show which devices are mapped to the Internet
protocol suite (inet), enter:
netinfo -p inet
See also ``Verifying the configuration of network interfaces''.
The
ifconfig(1Mtcp)
command displays information
about the configuration for a named network interface.
To find out the configuration
for all network devices
that are currently installed, enter:
ifconfig -a
This command will display output similar to the following. The exact format will depend on the network interfaces that are configured on your system.
en0: flags=4043<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 150.162.7.7 netmask ffffff00 broadcast 150.162.7.255 perf. params: recv size: 4096; send size: 8192; full-size frames: 1 ether 00:20:af:f2:91:19 (alias) inet 150.162.7.52 netmask ffffff00 broadcast 150.162.7.255 (alias) inet 150.162.7.54 netmask ffffff00 broadcast 150.162.7.255 lo0: flags=4049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232 inet 127.0.0.1 netmask ff000000 perf. params: recv size: 4096; send size: 8192; full-size frames: 1 (alias) inet 127.0.0.1 netmask ff000000From this output, several things can be deduced about the en0 interface:
The lo0 entry is for the loopback interface. This is used for communication using the Internet protocols on the host itself.
Additionally, you can use the netstat -i command to see which interfaces are currently configured. You should see the loopback interface, plus one interface for each networking card or serial line protocol (SLIP or PPP) on your system.
If you do not see a networking card or serial line protocol that you know exists on your system, reconfigure it using the Network Configuration Manager.
You can use the -I option to netstat
to display the number of packets sent
and received on an interface in a given time interval.
For example,
the following command displays activity
on the en0 network interface every 5 seconds:
netstat -I en0 5
The output appears similar to the following:
input (en0) output input (Total) output packets errs packets errs colls packets errs packets errs colls 5533475 276 4615973 460 14899 6063429 276 5145927 460 14899 2 0 1 0 0 2 0 1 0 0 5 0 3 0 0 5 0 3 0 0 21 0 21 0 0 21 0 21 0 0 ...The first row of figures shows the cumulative totals since TCP/IP was last started. Subsequent rows show statistics collected in the previous five seconds. The first five columns show numbers of input and output packets, errors and collisions for the en0 interface. The remaining columns show the totals for all interfaces including the loopback interface. Errors indicate packets lost due to hardware problems such as breaks in the network or faulty adapter hardware. Collisions on an Ethernet are caused by two or more hosts trying to broadcast at the same time. This is not normally a problem unless the ratio of collisions to output packets rises above 10%.
The -s option to netstat
displays per-protocol statistics for
the Internet Control Message Protocol (ICMP),
the Internet Group Management Protocol (IGMP),
the Internet Protocol (IP),
the Transmission Control Protocol (TCP),
and the User Datagram Protocol (UDP).
To display statistics for all protocols, enter:
netstat -s
To display statistics for a particular protocol, enter:
netstat -s -p protocol
The name of the protocol must be entered in lowercase letters.
For example, to display statistics for IP, enter:
netstat -s -p ip
This produces statistics similar to the following:
ip: 376003 total packets received 0 bad header checksums 0 with size smaller than minimum 0 with data size < data length 0 with header length < data size 0 with data length < header length 0 with unknown protocol 0 fragments received 0 fragments dropped (dup or out of space) 0 fragments dropped after timeout 0 packets reassembled 0 packets forwarded 4588 packets not forwardable 2 no routes 0 redirects sent 0 system errors during input 371415 packets delivered 7750 total packets sent 0 system errors during output 0 packets fragmented 0 packets not fragmentable 0 fragments createdThe statistical information can show areas where a protocol is having problems.
The ping(1Mtcp) command sends TCP/IP packets to the desired destination and, if successful, returns packets to the sender. With ping, you can verify that the TCP/IP stack is configured correctly on the local host and that your system can reach others via configured interfaces. To verify connectivity:
IP_addr is alive
host is alive
Use the netstat -rn command as described in ``Verifying correct routing behavior'' to verify that a route is defined to the outside world from your network. If you use a default router (in the example below, this is 192.168.1.1), there should be an entry such as the following in the routing table:
Destination Gateway Flags Refs Use Interface default 192.168.1.1 UGS 0 0 en0Try to ping the IP address of the default router. If there is no response, this machine which provides network access to the outside world from your local network may need attention.
Use the Network Configuration Manager to see if the network adapter's hardware settings conflict with those of other hardware in the system.
Finally, verify that the netmask and broadcast address defined for the interface match those of the local network.
A hostname lookup failure may also indicate that a DNS name server used by your host is not running. Contact the administrator of the name server to verify that it is up and running, or see ``Using nslookup, dig, and host'' for information about how to test DNS. As a temporary measure, add the IP address and fully qualified domain name (for example, nile.rivers.com) of the system that you are trying to contact to the /etc/hosts file.
If your system is an NIS client which uses the hosts map distributed by NIS for name resolution, enter the command ypcat hosts to examine the contents of this map. If the contents of the map are incorrect, you must update the source file (usually /etc/hosts) for the map on the master server, and use the ypbuild command to make and propagate the new version. See ``Updating the default NIS maps'' and ``Troubleshooting NIS'' for more information. The /etc/hosts file on the NIS client must contain entries for the local host (127.0.0.1), its own host name, and the NIS master server.
If you can ping hosts on the local network, try to ping one that is remotely connected via a gateway or router:
See ``Adjusting your netmask to correct routing problems'' for more information about curing problems that can be caused by using an incorrect netmask. If necessary, you can reconfigure your system's routing table manually as described in ``Specifying a default route'' and route(1Mtcp).
Use the netstat -a command to display active connections and sockets. Look for phantom connections in the output from this command -- there may still be active sockets for processes that terminated abnormally. If many appear, your network may run slowly. Stop and restart TCP/IP to flush the connections.
The netstat -i command displays active interfaces (network card and serial interfaces) as well as statistics on:
Ipkts
Ierrs
Opkts
Oerrs
Coll
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll en0 1500 172.16.118 don 1348 12 1854 23 65 lo0 8232 loopback localhost 4058 0 4058 0 0In using netstat -i, you should verify that the card is receiving and sending packets (that
Ipkts
and
Opkts
are nonzero), and that input and output errors as
well as collisions are a small percentage of the packet total.
If both Ipkts
and Ierrs
are zero, the connection
to the network may be bad, the network card may be bad, or there may be
an interrupt vector conflict. Verify network cabling, then check for
interrupt conflicts by running hwconfig or vectorsinuse.
If a conflict exists, use the
Network Configuration Manager
to reconfigure your card. If the cable and interrupt vectors check out, run
any diagnostic tools supplied by the manufacturer of the networking card.
If Ipkts
is zero, but Ierrs
is nonzero, the network,
cabling, or card may be bad, another host on the network may be
generating bad packets, or the network may be incorrectly terminated.
If Opkts
is zero and Oerrs
is nonzero, there
may be a conflict of I/O addresses on the system. If both
are zero, the conflict may be in shared memory addresses. Verify
the I/O and shared memory addresses of each card on your
system, and reconfigure your networking card with other supported
addresses if conflicts exist.
If Coll
is high (greater than 1-2 percent of the Opkts
total), your network is very busy. Consider breaking the network into
multiple separate networks.
Most of the server daemons started by /etc/inetd.conf accept a -d option to force all sockets to be created with debugging turned on. Their activity is logged by default in /var/adm/log/osmlog. To enable logging:
or by stopping and restarting it:
sacadm -k -p inetd
sacadm -s -p inetd
To turn off logging: