Options

Question about DHCP

acidsatyracidsatyr Member Posts: 111
I never thought about this but how does a router acting as a DHCP server 'knows' which pool to take address out from and assign to a requesting DHCP client?

Lets say you have several pools all for different vlans; The routes gets DHCP request and then which pool he looks at?

Comments

  • Options
    mikem2temikem2te Member Posts: 407
    acidsatyr wrote: »
    I never thought about this but how does a router acting as a DHCP server 'knows' which pool to take address out from and assign to a requesting DHCP client?

    Lets say you have several pools all for different vlans; The routes gets DHCP request and then which pool he looks at?
    It knows because all the interfaces have an ip address assigned, so if a dhcp discover message comes in to a routers interface it matches up the ip address of the interface to the available dhcp pools and hands out correct addresses.

    Work just the same for vlan subinterfaces as well, a tagged dhcp discover message comes in, the router then matches this up against the 'encapsulation dot1q' lines under the sub interfaces to find the correct subinterface , it then knows subinterface IP to find the correct dhcp pool.
    Blog : http://www.caerffili.co.uk/

    Previous : Passed Configuring Microsoft Office SharePoint Server 2007 (70-630)
    Currently : EIGRP & OSPF
    Next : CCNP Route
  • Options
    acidsatyracidsatyr Member Posts: 111
    But, what if a request is relayed accross a network?

    Thanks for reply
  • Options
    Forsaken_GAForsaken_GA Member Posts: 4,024
    the broadcast is converted to unicast and forwarded to the configured server

    edit: I should elaborate on that.

    Assuming the router for the subnet has it's interface configured with an ip helper-address, the broadcast is converted to unicast and forwarded to the IP specified in the helper-address command.

    If your host needs access to more than one service via broadcast (ie, it needs DHCP and TFTP, but they reside on different servers) you need to configure directed broadcast forwarding
  • Options
    acidsatyracidsatyr Member Posts: 111
    Ah, so, the source IP of that unicast would be DHCP relay agent and based on that DHCP will deduce which pool to look at.

    Thanks!
Sign In or Register to comment.