0

I'm trying to determine the DHCP lease options offered by a server. The server is a m0n0wall, so it does not have a fancy GUI that provides the single looking glass (its scattered across a few configuration screens).

I'm finding remnants of an answer with questions like How to determine dhcp lease time on CentOS 6 client and Command to retrieve dhcp lease information for OpenSUSE? I also see there's a dhcp-options command, but it appears to provide the information from a configured host, and not the options provided by the server (I'm splitting hairs, but they are different).

I'm working on Solaris at the moment, but I can run the command on Linux to gather the information. I can even jump on a Windows machine if necessary.

How do I capture and print the DHCP lease options offered by a server?

1 Answer 1

3

If you have console & root access in a Linux client, you could use tcpdump or the more fancy dhcpdump. Both commands depend on the interface name, and must be executed on the client. An example for tcpdump is:

tcpdump -i eth0 port 67 or port 68

and for dhcpdump is:

dhcpdump -i eth0

Also, I'm assuming this is for IPv4 only.

6
  • Which fedora version?
    – Felipe
    Commented Aug 26, 2016 at 1:16
  • It depends on the correct interface name, if is 'eth0' then use dhcpdump -i eth0
    – Felipe
    Commented Aug 26, 2016 at 1:29
  • I've corrected my original answer with examples.
    – Felipe
    Commented Aug 26, 2016 at 1:33
  • Thanks Felipe. When running dhcpdump -i eth0, does this look expected: How to configure DHCP given Oracle instructions don't work? Specifically, should there be a separate REQUEST and then RESPONSE? Or is dhcpdump combining them and printing a synopsis? (I'd prefer to see both the REQUEST from the client and the RESPONSE from the server. But I don't think I am seeing what I expect).
    – jww
    Commented Aug 26, 2016 at 1:38
  • This is not working as you expected. Be aware that dhcp messages are broadcasted to the network, but it could not be the case for the answers. In the Solaris box, you should do a sudo snoop -v broadcast. Snoop is the equivalent for tcpdump in Solaris.
    – Felipe
    Commented Aug 26, 2016 at 1:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .