In this article i will show how to install tcpdump on Linux (Ubuntu, Redhat) and Capture DHCP requests using tcpdump utility in Linux.
DHCP requests can be captured with tcpdump. So first we need install tcpdump utility in our Linux system.
Install tcpdump utility
Install tcpdump in Ubuntu or Debian Linux:
$ sudo apt-get install tcpdump
Install tcpdump in CentOS/RedHat:
$ sudo yum install tcpdump
Example output:
Tcpdump DHCP Capture
To capture DHCP requests we need capture traffic on 67, 68, 69 ports. Below you see example how to capture DHCP requests using tcpdump:
# tcpdump -n -i any port 67 or port 68 or port 69
As result you will see similar output from tcpdump – captured DHCP packets”
How to capture DHCP requests with tcpdump
To capture DHCP requests we need capture traffic on 67, 68, 69 ports.
# tcpdump -n -i any port 67 or port 68 or port 69
Using tcpdump for SIP and RTP Diagnostic