Share via


Multiple DHCP Scopes on a single DHCP Server

Question

Thursday, November 13, 2008 12:03 AM

When you have multiple DHCP scopes on a server, how does the server know which scope to issue an address from when a client from a subnet starts up?

All replies (9)

Saturday, February 28, 2009 12:08 AM ✅Answered

    That is a different question. There is no way that you can control the situation in a case like that. The client will broadcast on the LAN and will probably accept an offer from the first DHCP server to reply. You would be better off using manual configuration of all machines and forget DHCP. Bill


Thursday, November 13, 2008 1:42 AM | 2 votes

   DHCP requests use LAN broadcasts. If the client is on the same segment as the DHCP server, the server receives the request directly.

   If the client is on a different segment the request will be received by the DHCP-relay device on that segment. This device is in the same segment as the client. When it relays the request to the DHCP server, the DHCP server knows where the request came from and will hand out an IP corresponding the the subnet in which the request was originally detected. 


Bill


Friday, February 27, 2009 3:48 PM

I dont believe that addresses the question - if you have multiple departments on the same LAN and Subnet (eg 192.168.50.10-20 and 192.168.50.100-120) and they have different dns servers and AD servers they need to connect to, how can you have a single DHCP server with multiple scopes serve to either subnet? Is it a matter of creating reservations on both Scopes?

 

thanks

 


Monday, March 2, 2009 6:28 PM

Also, you can create a specific Class ID for one or more subnets or groups of workstations.
So, some workstations can acquire a specific set of IP configuration, just execute the ipconfig command with /setclassid switch to be setup it properly, in each workstation - it can be made by script.

http://support.microsoft.com/default.aspx/kb/240247
http://technet.microsoft.com/en-us/library/cc758890.aspx

Good luck,

Marcelo.Marcelo Braga -- Um discipulo de Jesus -- MCT/ MCSA/ MCITP/ MCTS Exchange 2007. http://WindowsServer-AD.blogspot.com


Wednesday, March 4, 2009 2:31 AM | 1 vote

+ Two scenario we are discussing,

  1. Local clients boots up and sent request for DHCP IP - it will be broadcast and will be accepted by DHCP or relay agent, if its accepted by DHCP server it will offer IP address to client from same subnet as DHCP server. If we have super scope configured on DHCP server, it can reply back from any scope available. Please read documentation on technet before proceeding with superscope feature.

  2. if broadcast packet will be received by DHCP relay agent - it will contact DHCP server with unicast packet and request for specific IP range (based on source IP of relay agent) and reason DHCP server will use right scope to reply back.

  • Hope this helps.

Sunday, April 8, 2012 12:05 AM | 1 vote

Hi,

To answer the original question, here is a little scenario :

I have a multihomed RRAS server with 3 interfaces each connected to a separate physical subnets respectively 10.10.10.0/24, 192.168.1.0/24 and 192.168.2.0/24 (eth0:10.10.10.1, eth4:192.168.1.1 and eth4:192.168.2.1)

W2K3 DHCP server resides in the first network and has the address  10.10.10.2.

DHCP relay agents are configured at the RRAS server at both interface eth4 and eth4 and pointing to the DHCP server at address 10.10.10.2.

DHCP has been configured with two separate active scopes.

*LAN1 Scope: 192.168.1.1 – 192.168.1.254 ;

Excluded range [192.168.1.1 – 192.168.1.10]

*LAN2 Scope: 192.168.2.1 – 192.168.2.254

Excluded range [192.168.2.1 – 192.168.2.10]

XPClient01 is at the far subnet 192.168.1.0/24

XPClient02 is at the far subnet 192.168.2.0/24

The logic is that the DHCP Relay agent present at the local broadcast domain of the respective XP DHCP Clients (to say, Relay Agents at eth4 and eth4) get the DHCP DISCOVER broadcast packet sent from the client and relay it in unicast to the DHCP server while including his address (being 192.168.1.1 or 192.168.2.1, for Relay 1 and Relay2) in a special field in the DHCP packet structure called Giaddr witch informs the server that the request is originating from a  relay agent at the address in question rather than from a local DHCP client.

The DHCP server then uses that relay agent address to do a match against its active scopes to find the one from witch to offer a lease, hence, it does not mistakenly hand off a lease from its directly connected subnet ( if a scope is defined for that sub).

Please note that the requests are coming originally from clients at separate network segments (routed topology). If the clients were to reside physically on same segment but logicaly ( IP networks ) within multiple networks ( multinets) than you would need to put in place  a superscope with the different scopes as members in order to have the server know from witch scope to lease.

Here is a couple of packet capture matching this traffic pattern took from the DHCP server involved in the transaction and note that the DHCP server did in fact lease addresses from the adequate scope ( YourIP DHCP field).

I Hope this might help someone.


Sunday, April 8, 2012 12:09 AM | 1 vote


Monday, August 19, 2013 7:20 PM

It's not the best answer!

Use manual settings is not recommended. DHCP works as Scotts-smt said!


Thursday, February 20, 2020 6:25 PM

Excellent explanation. On a side note, the DHCP server local LAN will also be served by the same DHCP server that all relay agents contact. How can we avoid that? We do not wish to serve DHCP on the LAN segment where the DHCP server lives, only other subnets (routable) with relay agents. Thank you