VLANS and DHCP

Simon Hobson dhcp1 at thehobsons.co.uk
Fri Aug 18 15:10:48 UTC 2006


Steve Wenger wrote:
>the dhcp-server-identifier is I think the address that is specified by the
>IP Helper in the cisco, my question is will that helper address direct the
>traffic to the proper section in the dhcpd.conf file?
>Example if the ip-helper address is 206.126.242.2 will the traffic skip over
>the vlan 19 and goto vlan20?
>
>#Vlan 19 - Rubicon Private
>subnet 172.19.0.0 netmask 255.255.254.0 {
>          range 172.19.0.10 172.20.0.254;
>          option routers 172.19.0.1;
>          option subnet-mask 255.255.254.0;
>          option dhcp-server-identifier 172.19.0.2 }
>}
>#Vlan 20 - Rubicon Public
>subnet 206.126.242.0 netmask 255.255.254.0 {
>          range 206.126.242.5 206.126.243.254;
>          option routers 206.126.212.1;
>          option subnet-mask 255.255.254.0;
>          option dhcp-server-identifier 206.126.242.2
>}

Unless I'm missing something important, I think you have two 
different situations mixed up.

If you are using IP Helper (in Cisco speak) to enable a DHCP Relay 
Agent then the server does NOT need to be directly connected to the 
subnet in question - and the question of whether VLANs are involved 
is completely invisible to the server. If it is not connected to the 
subnet then it CANNOT have an IP address in that subnet - and 
therefore it would be incorrect to set the dhcp-server-identifier 
like that.

With this setup, dhcp-server-identifier probably doesn't need setting 
as the default will do the job. What is used by the DHCP server is 
the GIAddr (Gateway Interface Address) field of the dhcp packet - an 
address (or more usually the only address) belonging to the interface 
of the relay agent that is directly connected to the subnet.

Taking the example of the 172.19.0.0 subnet above, and assuming the 
relay agent is in teh router at 172.19.0.1, then incoming packets to 
the dhcp server will be unicast (NOT broadcast) and will contain 
172.19.0.1 in the GIAddr field. The server will work out that this 
address is in the 172.19.0.0/23 subnet and act accordingly.


However, it sounds like your dhcp server is at 206.255.254.2, in 
which case you do NOT need an IP Helper setting on that subnet and 
DHCP request packets will be a mix of broadcast and unicast (for 
renewals) received directly by the dhcp server which will determine 
the subnet according to the interface the packet was received on.

None of this requires VLAN support on the server.

Simon


More information about the dhcp-users mailing list