The dhcp relay information link-selection insert enable command configures the function of inserting the Link-selection suboption of the Option82 field into DHCP packets.
The undo dhcp relay information link-selection insert enable command restores the default settings.
By default, the Link-selection suboption of the Option82 field is not inserted into DHCP packets.
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.
dhcp relay information link-selection insert enable
undo dhcp relay information link-selection insert enable
Usage Scenario
In a scenario where a distributed VXLAN gateway functions as a DHCP relay agent, you need to run the dhcp relay giaddr source-interface command on the distributed gateway to enter the primary IP address of the source interface into the giaddr field to ensure that the response packet from the DHCP server can accurately return to the corresponding distributed gateway. However, the DHCP server selects an IP address pool based on the giaddr field by default. After the preceding command is configured, the primary IP address of the source interface and the IP address of the DHCP relay-enabled interface are on different network segments. The DHCP relay-enabled interface functions as the gateway for connected DHCP clients. If the DHCP server still selects an IP address pool based on the giaddr field, DHCP clients cannot properly communicate even if they have obtained IP addresses.
To resolve this issue, run the dhcp relay information link-selection insert enable command to configure the function of inserting the Link-selection suboption of the Option82 option into DHCP relayed DHCP request packets. The IP address of the DHCP relay-enabled interface is entered into the Link-selection suboption. The DHCP server then selects an IP address pool based on the Link-selection suboption after receiving a request packet.
Prerequisites
The DHCP relay function has been enabled using the dhcp select relay command in the VBDIF interface view.
The source interface of DHCP relayed packets is configured and the primary IP address of the interface is entered into the giaddr field using the dhcp relay giaddr source-interface command in the VBDIF interface view.
Precautions
After the dhcp relay information link-selection insert enable command is configured, the Link-selection suboption is inserted into DHCP packets and configuring the Option82 insertion mode or processing policy is not required. The details are as follows:
You can run the dhcp option82 { insert | rebuild } enable command to configure the Option82 insertion mode. You can run the dhcp relay information enable and dhcp relay information strategy { drop | keep | replace } commands to configure the Option82 processing policy.
<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 information link-selection insert enable