Lets say I have a Windows 2003 DHCP server on VLAN 2
there are VLANS 2,3 4 and 5
The subnets are as follows:
192.168.0.0/24 VLAN 2
192.168.1.0/24 VLAN 3
192.168.2.0/24 VLAN 4
192.168.3.0/24 VLAN 5
On a Cisco stack I set up the IP helper* on VLANs 3,4 and 5 to point to the IP address of my Win2003 DHCP server. There is no IP helper on VLAN 2 since that's where the DHCP server is.
There are 4 scopes set up on said server
192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
Now I know that when the IP helper forwards DHCP packets to the DHCP server, it puts its gateway in there. Win2003 DHCP then knows which scope to assign IPA's from because it knows the network addresses from which the request came.
How does it know which scope to use for new clients on the local VLAN (VLAN 2)?
i.e. If I plug a new PC into a port that is assigned to VLAN 2, how will the Windows 2003 server know to aggidn an address from the 192.168.0.0/24 scope rather than any of the other ones?
*Microsoft calls the same thing the DHCP relay agent.