This summary information is sufficient to gain insight into how
packets flow between two hosts and into potential problems. However,
troubleshooting protocol problems requires more detailed information
about each packet. snoop has options that give you
control over what information is displayed. To display the data
contained in a packet, use the -x option. It
causes the entire contents of the packet to be dumped in hex and
ASCII. In most cases, you don't need to see the entire packet;
usually, the headers are sufficient to troubleshoot a protocol
problem. The -v option displays the headers in a
well-formatted and very detailed manner. Because of the large number
of lines displayed for each packet, use -v only
when you need it.
The following example shows an ICMP Echo Request packet displayed
with the -v option. The same type of packet was
summarized in the first line of the previous example.
# snoop -v host crab and host minasi
Using device /dev/le (promiscuous mode)
ETHER: ----- Ether Header -----
ETHER:
ETHER: Packet 3 arrived at 16:56:57.90
ETHER: Packet size = 98 bytes
ETHER: Destination = 8:0:20:22:fd:51, Sun
ETHER: Source = 0:0:c0:9a:d0:db, Western Digital
ETHER: Ethertype = 0800 (IP)
ETHER:
IP: ----- IP Header -----
IP:
IP: Version = 4
IP: Header length = 20 bytes
IP: Type of service = 0x00
IP: xxx. .... = 0 (precedence)
IP: ...0 .... = normal delay
IP: .... 0... = normal throughput
IP: .... .0.. = normal reliability
IP: Total length = 84 bytes
IP: Identification = 3049
IP: Flags = 0x0
IP: .0.. .... = may fragment
IP: ..0. .... = last fragment
IP: Fragment offset = 0 bytes
IP: Time to live = 64 seconds/hops
IP: Protocol = 1 (ICMP)
IP: Header checksum = fde0
IP: Source address = 172.16.55.106, minasi.wrotethebook.com
IP: Destination address = 172.16.12.1, crab.wrotethebook.com
IP: No options
IP:
ICMP: ----- ICMP Header -----
ICMP:
ICMP: Type = 8 (Echo request)
ICMP: Code = 0
ICMP: Checksum = ac54 ICMP: