The dhcp relay anycast gateway re-route enable command enables the re-routing function for the DHCP relay agent on a distributed gateway.
The undo dhcp relay anycast gateway re-route enable command disables the re-routing function for the DHCP relay agent on a distributed gateway.
By default, the re-routing function for the DHCP relay agent on a distributed gateway is disabled.
Only the S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support this command.
Usage Scenario
In a distributed VXLAN gateway scenario, the DHCP relay function is configured on VBDIF interfaces of distributed gateways. The value of the GIADDR field carried in a request packet sent from a DHCP relay agent to the DHCP server is the IP address of the VBDIF interface. When returning a response packet, the DHCP server figures out the network segment on which the DHCP client resides based on information of this field. However, the response packet from the DHCP server may be forwarded to other distributed gateways (rather than the device that sends the request packet) because IP addresses of VBDIF interfaces on distributed gateways are the same. As a result, the user cannot obtain an IP address.
To resolve the preceding problem, you can enable the re-routing function for DHCP relay agents on VBDIF interfaces of the distributed gateways. After this function is enabled, when a DHCP relay agent sends a request packet, the VTEP IP address of the local device, functioning as the return IP address, is carried in the Option82 field; when a DHCP relay agent returns a response packet, the VTEP IP address of the local device is also carried in the packet. When processing a response packet from the DHCP server, the DHCP relay agent figures out whether the response packet corresponds to the request packet sent from the local device based on the return IP address carried in the packet. If so, the DHCP relay agent forwards the packet to the client. If not, the DHCP relay agent performs re-routing based on the return IP address to forward the response packet to the corresponding distributed gateway through a VXLAN tunnel.
Prerequisites
The DHCP relay function has been enabled using the dhcp select relay command in the VBDIF interface view.
Precautions
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] bridge-domain 100 [HUAWEI-bd100] quit [HUAWEI] interface vbdif 100 [HUAWEI-Vbdif100] dhcp select relay [HUAWEI-Vbdif100] dhcp relay anycast gateway re-route enable