How to know the DHCP settings offered by a server


I want to debug a router that is giving strange DHCP settings, but I don't know how to check it without having to make my system take all the configurations. Isn't there a utility that returns all DHCP settings (like NTP, WINS, DNS, IP, router) whenever a client connects?

Preferably that is platform independent, and that won't require changing the client's configuration to trigger the DHCP.

Best Answer

Ok, this is what happens when I don't read the manual. man dhclient

-d : Force dhclient to run as a foreground process. Normally the DHCP client will run in the foreground until is has configured an interface at which time it will revert to running in the background. This option is useful when running the client undera debugger, or when running it out of inittab on System V systems. This implies -v.

-v : Enable verbose log messages.

-n : Do not configure any interfaces. This is most likely to be useful in combination with the -w flag.

Once I ran dhclient -d -v -n, discovered what configurations were buggy, and why. Another DHCP was running in the network.

If you want to really get several information, but then some system will need to mess up the DHCP configuration to work, is using WireShark:

enter image description here