< Home

dhcp relay anycast gateway re-route enable

Function

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.

Format

dhcp relay anycast gateway re-route enable

undo dhcp relay anycast gateway re-route enable

Parameters

None

Views

VBDIF interface view

Default Level

2: Configuration level

Usage Guidelines

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

Because the return IP address is carried in the Option82 field, you need to perform the following operations:
  1. Run the dhcp option82 vendor-specific format vendor-sub-option 2 ip-address ip-address command in the system view to use the Sub Option2 field that is customized by the vendor in the Option82 field to carry the VTEP IP address of the local device.
  2. Run the dhcp option82 encapsulation vendor-specific-id command in the BD view to insert the sub-option customized by the vendor into the Option82 field.
  3. Run the dhcp option82 { insert | rebuild } enable command in the BD view to configure the Option82 field to be inserted into DHCP packets.
  4. Run the dhcp relay information enable command in the VBDIF interface view to enable the Option 82 function for the DHCP relay agent.

Example

# Enable the re-routing function for the DHCP relay agent on VBDIF100 of a distributed gateway.
<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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >