Difference between revisions of "Tcpdump"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 1: Line 1:
tcpdump is a [[command]] that allows you to monitor your network traffic. For example you can watch out for dhcp communication on your network using:
+
tcpdump is a [[command]] that allows you to monitor your network traffic.  
 +
 
 +
= Examples =
 +
 
 +
== dhcp ==
 +
You can watch out for dhcp communication on your network using:
 
  tcpdump -i eth1 port 67 and port 68
 
  tcpdump -i eth1 port 67 and port 68
 +
 +
== SNMP ==
 +
You can display incoming [[snmp]] traps using:
 +
tcpdump <abbr title="display all data">-A</abbr> <abbr title="SNMP trap port">port 162</abbr> <abbr title="print output with linefeeds and flushing to allow piping>-l</abbr> | [[hexdump]] -C
  
 
= See also =
 
= See also =

Revision as of 10:52, 6 May 2014

tcpdump is a command that allows you to monitor your network traffic.

Examples

dhcp

You can watch out for dhcp communication on your network using:

tcpdump -i eth1 port 67 and port 68

SNMP

You can display incoming snmp traps using:

tcpdump -A port 162 -l | hexdump -C

See also