Rocky 8.x Finding DHCP offer and options without changing actual interface settings

From Notes_Wiki

Home > Rocky Linux or CentOS > Rocky Linux 8.x > System Administration > Finding DHCP offer and options without changing actual interface settings

It is possible to make DHCP request on an interface without changing any settings. This way we can find out what IP and other options such as DNS, lease-time etc. DHCP server provides without actually changing interface settings. To do this:

  1. First run tcpdump with verbose options to print all DHCP related packets using:
    tcpdump -n -vvv -i <interface-name> 'udp and port 68'
  2. Then on another terminal / shell make DHCP request using:
    dhclient -nw -d -v -i <interface-name>
  3. After the DHCP offer is received on dhclient, press Ctrl+C to stop it
  4. Now we can see the various options sent by DHCP server including IP, DNS, etc. on tcpdump output.
  5. We can press Ctrl+C on tcpdump window also.


Home > Rocky Linux or CentOS > Rocky Linux 8.x > System Administration > Finding DHCP offer and options without changing actual interface settings