< Home

dhcp option82 append vendor-specific

Function

The dhcp option82 append vendor-specific command inserts the Sub9 suboption into Option 82.

The undo dhcp option82 append vendor-specific command restores the default configuration.

By default, Sub9 suboption is not inserted into the Option 82 field of DHCP messages.

Format

dhcp option82 append vendor-specific

undo dhcp option82 append vendor-specific

Parameters

None

Views

Interface view, VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the dhcp option82 append vendor-specific command is run on a DHCP relay agent or DHCP snooping device, the device will insert the Sub9 suboption into the Option 82 field of a received DHCP message. When this DHCP message is forwarded to the DHCP server, the server obtains the DHCP client location information from the Sub9 suboption.

The Sub9 suboption has old and new formats. The old format contains the vendor ID, for example, hwid. The new format does not contain the vendor ID.

Both the dhcp option82 append vendor-specific and dhcp option82 vendor-specific format commands can insert the Sub9 into the Option 82 field of the DHCP message, except that the Sub9 formats are different:
  • dhcp option82 append vendor-specific: inserts the Sub9 of the new format. The new format includes the location information such as the node identifier, node chassis ID, node slot ID, node port number, and user VLAN.
  • dhcp option82 vendor-specific format: inserts the Sub9 of the old format. The old format includes the DHCP client information such as user IP address and device name.

Prerequisites

DHCP has been enabled globally using the dhcp enable command.

Precautions

  • When both the dhcp option82 append vendor-specific and dhcp option82 vendor-specific format commands are run, the dhcp option82 append vendor-specific command takes effect.
  • The Sub9 suboption can be inserted into Option 82 only when the Sub9 format is the same as the DHCP packet format. If the formats are different:
    • If the dhcp option82 vendor-specific format command has been run, the Sub9 of the new format cannot be inserted into Option 82.
    • If the dhcp option82 append vendor-specific command has been run, whether the Sub9 of the old format can be inserted depends on the Option 82 insertion method (which is configured using the dhcp option82 enable command).
      • When the Option 82 insertion method is Insert, the Sub9 is not inserted.

      • When the Option 82 insertion method is Rebuild, the Sub9 is reconstructed and then inserted into Option 82.

  • The total length of the Option 82 field cannot exceed 255 bytes.

Example

# Insert the Sub9 suboption into the Option 82 field of DHCP messages.

<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] dhcp option82 append vendor-specific
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >