To help you resolve problems with network hardware, the network itself, and various network services, the Digital UNIX system provides problem solving tools to help you do the following tasks:
You test your system's ability to reach a host on the Internet network by using the ping command. The ping command has the following syntax:
/usr/sbin/ping [options...] hostname
Table 14-1 shows some of the ping command options.
Option | Function |
-R | Includes the RECORD_ROUTE option in the packet and displays the route buffer on returned packets. |
-r | Executes the ping command for a host directly connected to the local host. With this option, the ping command bypasses normal routing tables and sends the request directly to a host on an attached network. If the host is not on a directly attached network, the local host receives an error message. |
The ping command sends an Internet Control Message Protocol (ICMP) echo request to the host name specified. When the request is successful, the remote host sends the data back to the local host. If the remote host does not respond to the request, the ping command displays the following message:
unknown host hostname
See ping(8) for more information on this command.
To terminate the ping command output, press Ctrl/C. When terminated, the ping command displays statistics on packets sent, packets received, the percentage of packets lost, and the minimum, average, and maximum round-trip packet times.
You can use the output from the ping command to help determine the cause of direct and indirect routing problems such as host is unreachable, connection timed out, and network is unreachable.
When using the ping command for fault isolation, you should first test the local host to verify that it is running. If the local host returns the data correctly, use the ping command to test remote hosts farther and farther away from the local host.
If you do not specify command options, the ping command displays the results of each ICMP request in sequence, the number of bytes received from the remote host, and the round-trip time on a per-request basis.
The following example shows the output from a ping command to a host named host1:
%
ping host1
PING host1.corp.com (16.20.32.2): 56 data bytes 64 bytes from 16.20.32.2: icmp_seq=0 ttl=255 time=11 ms 64 bytes from 16.20.32.2: icmp_seq=1 ttl=255 time=3 ms 64 bytes from 16.20.32.2: icmp_seq=2 ttl=255 time=7 ms 64 bytes from 16.20.32.2: icmp_seq=3 ttl=255 time=3 ms 64 bytes from 16.20.32.2: icmp_seq=4 ttl=255 time=7 ms 64 bytes from 16.20.32.2: icmp_seq=5 ttl=255 time=3 ms[Ctrl/C]
----host1.corp.com PING Statistics--- 6 packets transmitted, 6 packets received, 0% packet loss roundtrip (ms) min/avg/max = 3/5/11 ms
You can display and modify the Internet to Ethernet translation tables used by the Address Resolution Protocol (ARP) to help solve direct routing problems resulting from the following circumstances:
Although you can modify the translation tables and change the name, you should resolve the name conflict permanently by changing one host name.
To display the entries in the Internet to Ethernet address translation tables, use the arp command to translate an Internet address to an Ethernet address with the following syntax:
/usr/sbin/arp hostname
To modify the entries in the Internet to Ethernet address translation tables, do the following:
/usr/sbin/arp [options] hostname
Use the arp command to solve direct routing problems on an Ethernet.
See arp(8) for more information on this command.
The following example shows the Ethernet address for an Internet host named host1. The system response tells you that the Ethernet address for host1 is aa-00-04-00-8f-11.
#
/usr/sbin/arp host1
host1 (16.20.32.2) at aa:0:4:0:8f:11 permanent trailers
The following example shows how to temporarily add host9 to the system translation tables:
#
/usr/sbin/arp -s host9 0:dd:0:a:85:0 temp
The following example shows how to remove host8 from the system translation tables:
#
/usr/sbin/arp -d host8
You can display a datagram's route to a network host to manually test, measure, and manage the network.
To display a datagram's route, use the traceroute command with the following syntax:
traceroute [options...] hostname [packetsize]
Table 14-2 lists some of the traceroute command options.
Option | Function |
-m max_ttl | Sets the maximum time-to-live (ttl) used in outgoing probe packets. The ttl parameter specifies the maximum number of hops a packet can take to reach its destination. The default is 30 hops. |
-n | Displays hop addresses numerically only, rather than both numerically and symbolically. |
-p port | Sets the base User Datagram Protocol (UDP) port number to be used in outgoing probe packets. The default is 33434. The port information is used to select an unused port range if a port in the default range is already used. |
-r | Bypasses the normal routing tables and sends the probe packet directly to a host on an attached network. If the host is not on a directly attached network, the traceroute command returns an error. |
-s IP_address_number | Uses the specified IP address number as the source address in outgoing probe packets. On hosts with more than one IP address, this option forces the traceroute command to use the specified source address rather than any others the host might have. If the IP address is not one of the receiving host's interface addresses, the command returns an error and does not send a probe packet. |
-t type-of-service value | Sets the type-of-service in probe packets to the specified value. The default is zero. The value must be a decimal integer in the range 0--255. This option tells you if different types of service result in different paths. This option is available only in Berkeley UNIX (4.4BSD) environments. Not all types of service are legal or meaningful. Useful values for this option are 16 (low delay) and 8 (high delay). See RFC 791, Internet Protocol for more information on types of service. |
-v | Displays verbose output, which includes received ICMP packets other than timeexceeded and port unreachable. |
-w wait_time | Sets the time (in seconds) to wait for a response to a probe. The default is 3 seconds. |
packetsize | Sets the packet size (in bytes) for the probe packet. The default size is 38 bytes. |
The traceroute command sends UDP packets (known as probe packets) to an unused port on the remote host, and listens for ICMP replies from IP routers. The probe packets are sent with a small ttl parameter, which specifies the maximum number of hops a packet can take to reach its destination.
You might see the following two ICMP messages when using traceroute: time exceeded and port unreachable. The ICMP time exceeded message means that the IP router that received the probe packet cannot forward it any further due to the ttl value. The ICMP port unreachable message means that the host that received the probe packet cannot access the port intended for the probe packet.
In displaying a routing path, traceroute starts by specifying a ttl of one hop, and increasing the ttl by one for each probe packet it sends. The timeexceeded message tells you which IP routers are processing the packets. The port unreachable message tells you that the probe packet reached its intended destination, but could not access the intended port.
The traceroute command sends three probe datagrams for each ttl setting, and displays a line showing the following:
If multiple IP routers respond to the probe, the traceroute command displays the address of each IP router. If the traceroute command does not elicit a response in 3 seconds (the default wait time), the command displays an asterisk (*) for the probe.
The following example shows a successful traceroute command to host2:
%
traceroute host2
traceroute to host2 (555.55.5.5), 30 hops max, 40 byte packets 1 host3 (555.55.5.1) 2 ms 2 ms 2 ms 2 host5 (555.55.5.2) 5 ms 6 ms 4 ms 3 host7 (555.55.5.3) 7 ms 7 ms 6 ms 4 host2 (555.55.5.5) 12 ms 8 ms 8 ms
You display packet headers on the network any time you want to monitor the network traffic associated with a particular network service. This is usually done to determine whether requests are being received or ackowledged, or to determine the source of network requests, in the case of slow network performance.
To display packet headers for a network interface, use the tcpdump command with the following syntax:
tcpdump [ options...]
The tcpdump command options enable you to specify the interface on which to listen, the direction of the packet transfer, the type of protocol traffic to display. In addition, it enables you to identify the source of the packet. See tcpdump(8) for more information.
Note
In order to use the tcpdump command, the packetfilter option must be configured into the kernel and the system rebooted.
You test a uucp remote connection to solve problems; for example, to determine why there is a backlog of transfer requests in the queue.
To test a remote connection, do the following:
uutry system_name
The system_name variable names the remote system to contact.
The uutry command has the following characteristics:
If you use uutry frequently, you can put the pathname to the command in the PATH entry in your .profile file.
If your local system cannot contact the remote system, do the following:
If you are using a TCP/IP connection, verify that configuration files contain the correct TCP entries. Verify that the inetd daemon can start the uucpd daemon. Edit the /etc/inetd.conf file and delete the comment character (#) from the beginning of the line containing the uucp entry. Restart the inetd daemon by using the following command:
#
/sbin/init.d/inetd start
Always save the debugging output produced by the uutry command until you are certain that the problem is resolved.
The following example shows a successful test of a remote connection to system host6:
#
/usr/lib/uucp/uutry host6
.
.
.
Conversation Complete: Status SUCCEEDED
The following example shows an unsuccessful test of a remote connection to system host6:
#
/usr/lib/uucp/uutry host6
.
.
.
mchFind called (host6) conn (host6) getto ret -1 Call Failed: CAN'T ACCESS DEVICE exit code 101 Conversation Complete: Status FAILED
Monitoring a file transfer enables you to solve other uucp problems, especially if you can already establish a remote uucp connection.
To monitor a file transfer, do the following:
Start the file transfer by using the uutry command.
See uutry(1) for additional information on the uutry command.
The following example sends the test1 file to the system host6:
#
uucp -r test1 host6!~/test1
#
/usr/lib/uucp/uutry host6
You can view the binary error log file, /var/adm/binary.errlog, to see the contents of system events recorded there. The error log file is a data file that is read with the uerf command.
The events recorded in the /var/adm/binary.errlog file include error messages relating to the system hardware and the software kernel, as well as information about system status, startup, and diagnostics.
The uerf command has the following syntax:
/usr/sbin/uerf [ options...]
The uerf command runs the error report formatter and displays the contents of the /var/adm/binary.errlog file.
You can use the uerf command to diagnose kernel and hardware errors.
See System Administration and uerf(8) for a complete description of this command.
The syslogd daemon records system messages into a set of files. The syslogd daemon starts running from the /etc/rc.config file when you boot the system, and whenever it receives a hangup signal. Before the syslogd daemon starts logging system messages, it scans the /etc/syslog.conf file to determine its configuration information. The configuration information determines the files into which the syslogd daemon logs system messages.
System messages can contain a priority code indicating the type and severity of the message. For example, system messages can indicate error conditions and warnings.
The syslogd daemon is available to the entire system, including binary kernel errors. See syslogd(8) for a complete description of the syslogd daemon.
To review the syslogd daemon log files, do the following:
#
cat syslog.conf
# # syslogd config file # # facilities: kern user mail daemon auth syslog lpr binary # priorities: emerg alert crit err warning notice info debug kern.debug /var/adm/syslog.dated/kern.log user.debug /var/adm/syslog.dated/user.log mail.debug /var/adm/syslog.dated/mail.log daemon.debug /var/adm/syslog.dated/daemon.log auth.debug /var/adm/syslog.dated/auth.log syslog.debug /var/adm/syslog.dated/syslog.log lpr.debug /var/adm/syslog.dated/lpr.log binary.err /var/adm/binary.errlog msgbuf.err /var/adm/crash/msgbuf.savecore kern.debug /var/adm/messages kern.debug /dev/console *.emerg *
#
cd /var/adm/syslog.dated/28-Oct-12:49
#
cat daemon.log
You can use the syslogd daemon to help solve session layer problems such as access control problems for the Internet Protocol (IP).