1

I have a Win 2k3 server with DHCP running on a subnet with no VLAN, and 5 scopes (each with a different subnet). I have 4 VLAN's and a router that does DHCP relay to that server from each vlan.

I understand that a DHCP request coming from any VLAN will be converted to unicast, and the DHCP server will pick the right scope to serve from based on the unicast address. Great!

However, what if a DHCP request comes in from a PC not on a vlan? Which scope will the server use?

If not predictable, is there a way to force the DHCP server to use one scope by default?

TSG
  • 1,634
  • 6
  • 29
  • 51
  • How do you have a PC that's not on a vlan, but is on the network? And do you really not understand how DHCP scopes work and DHCP address are assigned? If so, I'd recommend some remedial reading over asking your question here. – HopelessN00b Jul 20 '12 at 02:32

2 Answers2

4

DHCP scopes and switch VLAN's aren't directly related to each other and as such there's no interdependence or interaction between them. The DHCP server will assign an ip address from the scope that corresponds to the subnet that the server is on, except in the case where a DHCP relay agent is in use to relay DHCPDiscover packets from remote subnets. In the case of remote subnets where a DHCP relay agent is in use, the DHCP relay agent forwards the DHCP client broadcast packet as a unicast packet to the DHCP server with additional information (contained in the GIADDR field), which the DHCP server uses to assign an ip address from a scope that corresponds to the GIADDR field value in the DHCP relay agent packet.

http://www.ietf.org/rfc/rfc2131.txt

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
2

DHCP is a broadcast protocol, so unless something special is going on the only scope it can serve is the same subnet the DHCP server is on. Happily, nearly every router has the ability to forward DHCP requests (sometimes called a DHCP Relay Agent) from clients on one subnet (VLAN) to a specific DHCP server.

Secondly, VLAN and Subnet are synonymous on most networks. A PC not on a VLAN, is going to be on a Subnet. The router providing gateway services on that subnet can still have a Forwarding/Relay agent for DHCP, a VLAN is not required. So really, VLAN isn't really a factor in this transaction. A VLAN-less PC connection will be treated the same as a PC on a VLANed subnet.

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296