• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

DHCP and multiple scopes on a single server

racolvin

Golden Member
Example: Central DHCP server running multiple scopes (subnets) for different LAN segments. When a request from a user PC on a particular segment, how does the DHCP server know from which scope to hand out an address? How is the DHCP server informed or whatever which LAN segment the request is coming from?

(of course the routers would be setup to forward DHCP requests, etc ... I'm just wondering by what mechanism the DHCP server is told which scope to use to assign the address)
 
the router or DHCP relay agent will insert a field in the DHCP request packet indicating what ip subnet it's coming from.
 
sure thing. That's the key function of a DHCP relay agent.

And any router will have DHCP relay runctionality.

Most places have one or two (for redundanc) DHCP servers and they can serve 100s or 1000s of IP subnets.
 
oh I've know how to enable it on the router for years ... I just never understood WHY it worked until I asked here and then ran with that info to Google for the rest of thes story 🙂

Thanx again 🙂
 
A number of DHCP questions are answered at this site but here's the one I specifically looked for: DHCP in subnetted environment

"DHCP client messages are sent to off-net servers by DHCP relay agents, which are often a part of an IP router. The DHCP relay agent records the subnet from which the message was received in the DHCP message header for use by the DHCP server."
 
More technically when you do a discover packet (first packet from client) it sends TO broadcast with no return address.

If a DHCP server sees this broadcast it will send an offer for the subnet that the server is on.

If there is a relay agent, it will see this broadcast and wait for a moment. If it hears no offer it will send a unicast discover directly to the dhcp server with it's own IP as the source address.

When the reply is sent back it then broadcasts that reply on the original network.

So basically the subnet is determined by the source address of the discover and if there is no source address it will default to it's own subnet.

That covers the Discover & offer packets. Request and Ack packets that follow are the same in all scenarios.
 
Back
Top