< Home

dhcp relay information link-selection insert enable

Function

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.

Format

dhcp relay information link-selection insert enable

undo dhcp relay information link-selection insert enable

Parameters

None

Views

VBDIF interface view

Default Level

2: Configuration level

Usage Guidelines

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

  1. The DHCP relay function has been enabled using the dhcp select relay command in the VBDIF interface view.

  2. 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

  • The DHCP server must be capable of parsing the Link-selection suboption.
  • 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:

    • When the Option82 insertion mode or processing policy is not configured, the DHCP relay agent processes the Link-selection suboption as follows: The DHCP relay agent forcibly inserts the Option82 field with the Link-selection suboption into the DHCP packet; if the DHCP packet has carried the Option82 field, the DHCP relay agent replaces the Option82 field, namely, the DHCP relay agent deletes the original Option82 field and inserts the Option82 field with the Link-selection suboption into the DHCP packet.
    • When the Option82 insertion mode or processing policy is configured, the DHCP relay agent processes the Link-selection suboption as follows: How the DHCP relay agent inserts the Link-selection suboption depends on the corresponding configuration. For example, if the insertion mode is set to insert and the received DHCP packet has carried the Option82 field, the DHCP relay agent does not insert the Link-selection suboption into the packet.

    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.

Example

# On VBDIF100, configure the function of inserting the Link-selection suboption of the Option82 field into DHCP packets.
<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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >