Configuring option 82

Simon Hobson dhcp1 at thehobsons.co.uk
Fri Sep 27 18:15:11 UTC 2019


Surya Teja <suryateja042 at gmail.com> wrote:

> I just want to make sure that my DHCP server will grant IP from particular subnet to the clients which has specified value in agent.circuit-id/agent.remote-id suboptions of option 82 from request packets (DHCP relay will be adding the option 82 info to request packet)

You do not need to do anything for that to happen - it's just automagic.
The server will automatically match a client to the right subnet according to either the interface the request comes in on (for local clients) or the Gateway Interface Address (GI-Addr) set by the relay agent (for remote clients).

So lets say you have two subnets: The server is on the 192.168.1.0/24 subnet, and the relay agent is listening on the 192.168.2.0/24 subnet (lets say it's IP is 192.168.2.2). The server receiving a relayed request will find GI-Addr set to 192.168.2.2 and automatically select a client address from the 192.168.2.0/24 subnet declaration. For the server, all it needs is :

<global stuff>
subnet 192.168.1.0 ... {
}
subnet 192.168.2.0 ... {
  <subnet specific options>
  range 192.168.2.xx 192.168.2.xx ;
}

That's really all there is to it. If there are no clients connected locally to the server, then the local subnet (192.168.1.0/24 in this example) can be empty as above.




More information about the dhcp-users mailing list