HP-UX HB v13.00 Ch-09 - Networking Basics

HP-UX Handbook Rev 13.00 Page 25 (of 27)
Chapter 09 Network Basics
October 29, 2013
appropriate information.
Additional hints:
To get a first impression of what is going on within the network, we can combine nettl and
netfmt, even though UNIX pipes are to slow to trace a really busy network.
# /usr/sbin/nettl -tn pduin pduout -e ns_ls_ip | netfmt -F1TN | tee file
This shows you what happened on the network and writes it to file. You have to use the kill
command to stop this pipe and to run:
# /usr/sbin/nettl -tf -e all
to stop tracing afterwards.
Older documentations use ns_ls_driver to get more informative traces. Unfortunately, the current
driver generation does not use this part of the network stack anymore. Therefore, you will have
to use more specific entities, such as “BTLAN” or something similar, to catch packages at the
driver level.
If you like graphical interfaces, you can use the command /opt/nettladm/bin/nettladm. It starts a
GUI for nettl and netfmt.
tcpdump
A very useful trace tool for networks is tcpdump. It is a small, open-source, easy to use program.
You can find the latest version and background information at: http://www.tcpdump.org.
You can find software depots with binary versions for HP-UX available at:
http://software.hp.com,
under “Security and manageability”, HPUX Internet Express for HP-UX.
(Install libpcap as well which is available on the same server).
Here are some examples on how to use tcpdump (which is located at /usr/sbin/tcpdump or
/usr/contrib/bin/tcpdump).
To will catch everything:
# tcpdump -nnn -v -x -s 256 -w /tmp/tcp.out
Check what happens at interface lan1, show each incoming package, even if we have no
appropriate IP address:
# tcpdump -n -i lan1