0

I need a way to determine the next IP address a DHCP server will offer.

RFC 2131 states:

Each server may respond with a DHCPOFFER message that includes an available network address in the 'yiaddr' field [...].

I found no specification that this must be the next available IP address in the address pool. Do DHCP server implementations state which IP they will offer next? Or is there a way to tell a DHCP Server (for example isc-dhcp-server) which IP to offer next?

I need this information in order to configure tcpdump to capture traffic from/to this specific IP before the device connects to the network.

6
  • 1
    This reads like an XY question. Instead, you could setup the DHCP server to always provide the same IP address to that device (identified by its MAC address). Look up "DHCP IP reservation".
    – sawdust
    Commented Sep 4, 2022 at 21:58
  • The problem with that is that I don't know the MAC address before the device starts to communicate, therefore I can't do DHCP IP reservation in advance.
    – Fandi
    Commented Sep 4, 2022 at 22:23
  • Temporarily set the DHCP server to a very limited range of IP:s to provide? e.g. a single IP? Possible?
    – Hannu
    Commented Sep 5, 2022 at 10:48
  • @Hannu this would be an idea, but it seems to be more of a workaround... Would this affect existing DHCP leases?
    – Fandi
    Commented Sep 5, 2022 at 12:18
  • Now, this is just an idea, never tried. That might depend on the DHCP server software, i would expect a "well behaved" one to NOT do anything with existing leases; this should IMO only be affecting NEW requests.
    – Hannu
    Commented Sep 5, 2022 at 12:23

0

You must log in to answer this question.

Browse other questions tagged .