This topic is to discuss the following lesson:
Hi Rene,
Let’s say after configuring HSRP, a DHCP server is located in a remote network. During the DHCP Discover process, on which interface should the virtual IP address be configured for DHCP relay (ip helper-address)?
Should the virtual IP be configured on:
Only the active interface, or
Both redundant interfaces?
Thank you in advance
Hello Thomas
That’s an excellent question! It helps us to understand how HSRP interacts with other features such as DHCP.
The quick answer to your question is that the ip helper-address should be configured on both redundant interfaces, using the same DHCP server IP address on each interface. The HSRP virtual IP address should not be used.
Remember that the ip helper-address command specifies the destination IP address of the DHCP server(s), not the source gateway address for relay. So you would never use the virtual IP address or any “real” IP address of any interface. Take a look at this lesson for more info about the DHCP relay feature.
Now you would apply it to both interfaces because both interfaces may potentially receive a DHCP message from a client that requires relaying. And according to RFC 1542 which defines DHCP relay:
If the relay agent does decide to relay the request, it MUST examine the ‘giaddr’ (“gateway” IP address) field. If this field is zero, the relay agent MUST fill this field with the IP address of the interface on which the request was received. If the interface has more than one IP address logically associated with it, the relay agent SHOULD choose one IP address associated with that interface and use it consistently for all BOOTP messages it relays.
This means each router should use its own interface IP address (not the HSRP virtual IP) when relaying DHCP requests. The HSRP virtual IP is used by clients as their default gateway, but plays no role in the relay configuration itself. Does that make sense?
I hope this has been helpful!
Laz