TCPDUMP Quick Reference
TCPDUMP Quick Reference
Listen on interface. If unspecified, tcpdump searches the system interface list for the lowest ether multicast the packet is an ethernet multicast packet.
-I number. ip multicast the packet is an IP multicast packet.
-p Don't put the interface into promiscuous mode. if the packet is of ether type protocol. Protocol can be a number or one of the
-r Read packets from file (which was created with the -w option). Standard input is used if file is ``-''. ether proto protocol names ip, ip6, arp , rarp, atalk, aarp, decnet, sca, lat, mopdl, moprc, or iso. Note
these identifiers are also keywords and must be escaped via backslash (\).
Write the raw packets to file rather than parsing and printing them out. They can later be printed
-w with the -r option. Standard output is used if file is ``-''. expr is an arithmetic expression composed of integer constants (expressed in
standard C syntax), the normal binary operators [+, -, *, /, &, |], a length operator,
Expression (BPF Packet Filtering) expr relop expr and special packet data accessors.
expression selects which packets will be dumped. If no expression is given, all packets on the net will be relop is one of >, <, >=, <=, =, !=.
dumped. Otherwise, only packets for which expression is `true' will be dumped.
Proto is one of ether, fddi, tr, ip, arp, rarp, tcp, udp, icmp or ip6 .
proto [ expr : size ]
For example, `ether[0] & 1 != 0' catches all multicast traffic.
type: (1) host, (2) net, (3) port
Primitives may be combined using: A parenthesized group of primitives and operators (parentheses are
direction: (1) src, (2) dst, (3) src or dst, (4) src and dst special to the Shell and must be escaped).
protocol: (1) ether, (2) ip, (3) tcp, (4) udp, (5) arp, (6) rarp
Negation (`!' or `not').
logical operator: (1) and, (2) or, (3) not Concatenation (`&&' or `and').
dst host host destination field of the packet is host. Alternation (`||' or `or').
src host host source field of the packet is host. Example: To print traffic between helios and either hot or ace:
host host either source or destination of the packet is host. tcpdump host helios and \( hot or ace \)