How To Take A Network Trace On HP-UX
How To Take A Network Trace On HP-UX
How To Take A Network Trace On HP-UX
Page 1 of 4
file://C:\Documents%20and%20Settings\DoraS.LOGICA-IN\Local%20Settings\Tempor... 4/1/2004
Page 2 of 4
Step 4.1: To create 1-liner trace analysis file of all packets in capture file:
# netfmt -N -n -l -1 -f /tmp/raw0.TRC0 > /tmp/fmt-10
Step 4.2: To create a 1-liner trace analysis file using a packet filter:
See information in Step #5 on creating a filter file.
# netfmt -N -n -l -1 -c /tmp/filterfile -f /tmp/raw0.TRC0 > /tmp/fmt-10
file://C:\Documents%20and%20Settings\DoraS.LOGICA-IN\Local%20Settings\Tempor... 4/1/2004
Page 3 of 4
Step 4.3: To create detailed trace analysis of all packets in capture file:
# netfmt -N -n -l -f /tmp/raw0.TRC0 > /tmp/fmt0
Step 4.4: To create a detailed trace analysis file using a packet filter:
See information in Step #5 on creating a filter file.
# netfmt -N -n -l -c /tmp/filterfile -f /tmp/raw0.TRC0 > /tmp/fmt-10
EXAMPLE 5.1: To view packets sent to and received from an IP address by the
host running the nettl trace:
filter ip_saddr 192.6.2.1
filter ip_daddr 192.6.2.1
EXAMPLE 5.2: To view packets sent to and received from an Ethernet address by
the host running the nettl trace:
filter source 08-00-09-00-12-3c
filter dest 08-00-09-00-12-3c
EXAMPLE 5.3: To see NFS packets sent to and from the host doing trace:
filter udp_sport 2049 /* UDP port 2049 = nfsd */
filter udp_dport 2049 /* UDP port 2049 = nfsd */
EXAMPLE 5.4: To see only telnet packets sent to and from the host doing the trace:
filter tcp_sport 23 /* TCP port 23 = telnet */
filter tcp_dport 23 /* TCP port 23 = telent */
The following (taken from the netfmt man page) may also help:
________________________________________________________________
Layer 1
dest hardware destination address
source hardware source address
interface software network interface
_________________________________________________________________
Layer 2
ssap IEEE802.2 source sap
dsap IEEE802.2 destination sap
type Ethernet type
_________________________________________________________________
Layer 3
file://C:\Documents%20and%20Settings\DoraS.LOGICA-IN\Local%20Settings\Tempor... 4/1/2004
Page 4 of 4
file://C:\Documents%20and%20Settings\DoraS.LOGICA-IN\Local%20Settings\Tempor... 4/1/2004