21.02.2013 Views

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

address of the named server and try to ping it. If you can, then it is reachable. If<br />

not, try different name resolution ordering.<br />

Note: When you can ping the name server, it does not mean that the named<br />

daemon is active on this system.<br />

By default, resolver routines attempt to resolve names using BIND and DNS. If<br />

the /etc/resolv.conf file does not exist, or if BIND or DNS could not find the name,<br />

NIS is queried (if it is running). NIS is authoritative over the local /etc/hosts, so<br />

the search will end here if it is running. If NIS is not running, then the local<br />

/etc/hosts file is searched. If none of these services could find the name, then the<br />

resolver routines return with HOST_NOT_FOUND. If all of the services are<br />

unavailable, then the resolver routines return with SERVICE_UNAVAILABLE.<br />

If you want to change the name resolution ordering so that NIS takes precedence<br />

over the BIND and DNS, your /etc/netsvc.conf file should look like the following<br />

example:<br />

# cat /etc/netsvc.conf<br />

hosts = nis,bind<br />

You can override this setting by using the NSORDER environment variable:<br />

# export NSORDER=local,bind<br />

In this situation the /etc/hosts file will be examined for name resolution first.<br />

8.3.1 The tcpdump and iptrace commands<br />

You may need to see the real data crossing the wire to solve a problem. There<br />

are two commands that let you see every incoming and outgoing packet from<br />

your interface: tcpdump and iptrace.<br />

The tcpdump command prints out the headers of packets captured on a specified<br />

network interface. The following example shows a telnet session between hosts<br />

9.3.240.59 and 9.3.240.58:<br />

# tcpdump -i tr0 -n -I -t dst host 9.3.240.58<br />

9.3.240.59.44183 > 9.3.240.58.23: S 1589597023:1589597023(0) win 16384 [tos 0x10]<br />

9.3.240.58.23 > 9.3.240.59.44183: S 1272672076:1272672076(0) ack 1589597024 win<br />

15972 <br />

9.3.240.59.44183 > 9.3.240.58.23: . ack 1 win 15972 [tos 0x10]<br />

9.3.240.59.44183 > 9.3.240.58.23: . ack 1 win 15972 [tos 0x10]<br />

9.3.240.59.44183 > 9.3.240.58.23: P 1:16(15) ack 1 win 15972 [tos 0x10]<br />

9.3.240.59.44183 > 9.3.240.58.23: P 1:16(15) ack 1 win 15972 [tos 0x10]<br />

9.3.240.59.44183 > 9.3.240.58.23: . ack 6 win 15972 [tos 0x10]<br />

186 <strong>IBM</strong> ^ Certification Study Guide - <strong>AIX</strong> <strong>5L</strong> <strong>Problem</strong> <strong>Determination</strong> Tools and Techniques

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!