tcpdump - Collect traffic information for a network interface

The tcpdump network analysis tool dumps traffic collected for a given network interface.

tcpdump syntax

See the tcpdump man page for the complete syntax and all options.

1  tcpdump?  -s  <length>?  -X ?  -i  <interface>

Parameters

-s <length>
Writes <length> of data from each packet rather than the default 65535 bytes.
-X
Writes each packet in hexadecimal and in ASCII format.
-i  <interface>
Identifies the network interface.

Example

To dump network traffic for interface eth0, issue the command:
[root@system]#  tcpdump -s 65000 -X -i eth0