Networks use DHCP relay to forward DHCP packets between host devices and a DHCP server. In a BGP EVPN VXLAN fabric, you can
configure a VTEP as a relay agent to provide DCHP relay services in a multi-tenant VXLAN environment.
When a network uses DHCP relay, DHCP messages move through the same switch in both directions. DHCP relay generally uses the
gateway IP address (GiAddr) for scope selection and DHCP response messages. In a BGP EVPN VXLAN fabric that has distributed
IP anycast gateway enabled, DHCP messages can return to any switch that hosts the respective GiAddr.
Deploying DHCP relay in an EVPN VXLAN network requires a different method for scope selection and a unique IP address for
each switch in the network. The unique Loopback interface for a switch becomes the GiAddr that a switch uses to respond to
the correct switch. DHCP option 82, also referred to as DHCP option VPN, is used for scope selection based on the Layer 2
In a multi-tenant EVPN environment, DHCP relay uses the following sub-options of option 82:
Sub-Option 151(0x97)—Virtual Subnet Selection:
The virtual subnet selection sub-option is used to convey VRF-related information to the DHCP server in an MPLS VPN and a
VXLAN EVPN multi-tenant environment.
RFC 6607 provides the definition for this sub-option.
Sub-Option 11(0xb)—Server ID Override
The server identifier or server ID override sub-option allows the DHCP relay agent to specify a new value for the server ID
option. The DHCP server inserts this new value in the reply packet. This sub-option allows the DHCP relay agent to act as
the actual DHCP server. The DHCP relay agent begins to receive all the renew requests instead of the DHCP server. The server
ID override sub-option contains the incoming interface IP address. The DHCP client accesses the DHCP relay agent using the
incoming interface IP address. The DHCP client uses this information to send all the renew and release request packets to
the DHCP relay agent. The DHCP relay agent adds all the appropriate sub-options and then forwards the renew and release request
packets to the original DHCP server.
For this function, Cisco’s proprietary implementation is sub-option 152(0x98). To implement the suboption and manage the function,
run the ip dhcp relay sub-option type cisco command in global configuration mode on the VTEP that acts as the DHCP relay agent.
RFC 5107 provides the definition for this sub-option.
Sub-Option 5(0x5)—Link Selection:
The link selection sub-option provides a mechanism to separate the subnet or link, on which the DHCP client resides, from
the GiAddr. The DHCP server uses this mechanism to communicate with the DHCP relay agent. The DHCP relay agent sets the sub-option
to the correct subscriber subnet. The DHCP server then uses this value to assign an IP address different from the GiAddr.
The DHCP relay agent sets the GiAddr to its own IP address to ensure that it is possible to forward the DHCP messages over
For this function, Cisco’s proprietary implementation is sub-option 150(0x96). To manage the function, run the ip dhcp relay sub-option type cisco command in global configuration mode on the VTEP that acts as the DHCP relay agent.
RFC 3527 provides the definition for this sub-option.