DHCP relay agents in VXLAN BGP EVPN fabrics
A DHCP relay agent in a VXLAN BGP EVPN fabric is a network component that
-
forwards DHCP packets between hosts and DHCP servers across VXLAN overlays,
-
provides relay functionality in a multi-tenant environment to support multiple virtual networks, and
-
uses VXLAN VTEP capabilities along with specialized sub-options for accurate address assignment and scope selection.
In VXLAN BGP EVPN networks, DHCP relay agents (often implemented in VTEPs) facilitate communication between local DHCP clients and remote DHCP servers. The relay ensures DHCP messages traverse the VXLAN fabric, maintaining tenant isolation and supporting distributed gateway models.
You may face challenges when using distributed anycast gateway addresses. DHCP messages forwarded by a relay agent might be returned to any switch hosting the same gateway IP (GiAddr). Use a unique loopback interface as the GiAddr for each switch to ensure correct DHCP address assignment. This approach supports proper scope selection and ensures that responses are routed to the appropriate switch.
Option 82 carries additional information in DHCP messages to help identify sources and tenants. In VXLAN EVPN environments, the following sub-options are important:
Gateway IP Address (GiAddr):
The relay agent uses this field to indicate the relay’s address; DHCP servers use it for scope selection and reply routing.
Virtual Tunnel Endpoint (VXLAN VTEP):
An endpoint device that encapsulates/decapsulates VXLAN traffic, often acting as a DHCP relay agent.
Relevant Option 82 sub-options
In a multi-tenant EVPN environment, DHCP relay uses these sub-options of Option 82:
-
Sub-option 151 (0x97) – Virtual Subnet Selection (RFC 6607):
Conveys VRF-related information to the DHCP server in an MPLS-VPN or VXLAN EVPN multi-tenant network. Helps the DHCP server select the correct IP address pool based on the virtual subnet or tenant.
-
Sub-option 11 (0xb) – Server ID Override (RFC 5107):
Allows the relay agent to specify a new server ID, making renewal requests return to the relay agent rather than directly to the DHCP server. The proprietary enhancement uses sub-option 152 (0x98). Use the ip dhcp relay sub-option type cisco command to manage the function.
-
Sub-option 5 (0x5) – Link Selection (RFC 3527):
Separates the DHCP client’s subnet from the relay’s GiAddr, enabling the DHCP server to assign an address based on the correct subscriber subnet. The proprietary enhancement uses sub-option 152 (0x98). Use the ip dhcp relay sub-option type cisco command to manage the function.
In a multi-tenant data center network using VXLAN BGP EVPN, each switch (VTEP) employs a unique loopback interface as its GiAddr. DHCP relay agents add Option 82 sub-options to DHCP messages:
-
Sub-option 151 informs the DHCP server which tenant (VRF) the request originated from.
-
Sub-option 11 (Server ID Override) ensures clients send DHCP renew requests to the appropriate relay.
-
Sub-option 5 (Link Selection) helps in exact subnet assignment.
This model allows the network to correctly assign IP addresses and manage tenant isolation, even with distributed gateways.