dhcp relay - stateless

Allwyn Carvalho allwyn at lucent.com
Thu Jul 20 18:22:16 UTC 2006


One inline.

Simon Hobson wrote:

>foomail123 wrote:
>
>  
>
>>Since dhcp relay is stateless, if there are multiple
>>interfaces, how does relay know which interface to
>>foward DHCP offer received from server ?
>>
>>How does relay work in vlan case (multiple interfaces
>>in a vlan) ?
>>
>>Also, being stateless if same host is connected to
>>multiple interfaces and/or vlans, how does relay
>>process DHCP offer packet received from server ?
>>    
>>
>
>The process is fairly simple.
>
>On receiving a broadcast packet from a client, it puts a Gateway 
>Interface Address (GIAddr) into the header of the packet before 
>unicasting it to the server(s).
>
>Replies from the server are unicast to the GIAddr, so the relay agent 
>can tell from that which interface to broadcast it back out on.
>  
>

The relay agent may also insert "relay agent options" -- option-82, to 
identify the client interface.  See RFC 3046.  This is better than using 
giaddr, because the same giaddr may be used to fulfill DHCP requests 
from multiple client interfaces.

Allwyn.

>GIAddr is the key - it must be an address that both the server and 
>agent can identify with a subnet or shared network (in the case of 
>the server) and an interface (for the relay agent). It is typically 
>the IP address of the interface through which the broadcast request 
>was received - it can be a different address, but if it isn't in the 
>same subnet then it must still be unique to the interface (ie you 
>can't use the same loopback address for three different networks) and 
>you would need a shared network statement on the server to associate 
>the network and the GIAddr.
>
>
>VLANs are no different. A client will normally only be in one VLAN 
>(typically determined by the setting for the physical port of the 
>switch it connects to) - in network terms it's no different to having 
>a separate switch for the VLAN. The relay agent must use a GIAddr 
>appropriate to the VLAN it detects the client as being connected to.
>
>
>If a host is connected to multiple networks or VLANs, then the host 
>is responsible for making dhcp requests on each interface (or virtual 
>interface) it wishes to configure - but each request is uniquely 
>linked to a network as above.
>
>
>If you have a shared network (ie multiple IP subnets on one physical 
>network), then the relay agent cannot differentiate clients  - that 
>is the servers job IF the administrator has configured it accordingly 
>(eg by using classes to assign clients to subnets).
>
>
>Simon
>  
>


More information about the dhcp-users mailing list