The dhcp option82 format command configures the format of Option 82 in DHCP packets.
The undo dhcp option82 format command restores the default format of Option 82 in DHCP packets.
By default, Option 82 in DHCP packets is in the type1 format.
Parameter | Description | Value |
---|---|---|
circuit-id |
Indicates sub-option 1 of option 82: circuit-id (CID). |
- |
remote-id |
Indicates sub-option 2 of option 82: remote-id (RID). |
- |
self-define extendText |
Specifies a user-defined DHCP Option 82 format. |
The value is a string of 1 to 255 case-insensitive characters. It can contain letters, digits, and special characters. |
type1 |
Indicates the Telecom format of Option 82. CID format: interface name:outer VLAN ID.inner VLAN ID system name/0/0/0/0/0, in ASCII encapsulation mode. |
- |
type2 |
Indicates the NMS format of Option 82. CID format: interface name:outer VLAN ID.inner VLAN ID system name, in ASCII encapsulation mode. |
- |
cn-telecom |
Indicates the Option 82 information in the standard cn-telecom format. CID format: interface name:outer VLAN ID.inner VLAN ID /0/0/0/0/0/0, in ASCII encapsulation mode. |
- |
cn-telecom-inherit |
Option 82 information in the standard cn-telecom format is inherited. CID format: inherits the access node information in the DHCP request packet and fills in the location information. |
- |
user-defined text |
Specifies the self-defined format string of option 82. |
The value is a string of 1 to 255 characters. For the value requirements of the user-defined format character string, see the following "Usage Guidelines". |
100GE interface view, 10GE interface view, 25GE interface view, 400GE Layer 2 sub-interface view, 400GE interface view, 40GE interface view, 50GE Layer 2 sub-interface view, 50GE interface view, Eth-Trunk Layer 2 sub-interface view, Eth-Trunk interface view, FlexE sub-interface view, FlexE interface view, GE Layer 2 sub-interface view, GE optical interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, VE sub-interface view, Layer 2 sub-interface view, Sub-interface view
Usage Scenario
The option 82 contains the location information of DHCP clients, such as information about login interface, VLAN, and address. After the option 82 field is configured, the device can set up dynamic binding entries with accurate interface information. Based on the option 82 field, the DHCP server assigns IP addresses and policies for DHCP clients.
After a self-define Option 82 format is configured, the device encapsulates the self-define Option 82 format into packets. In addition, you can use the following keywords to define the user-defined option 82 format string. The format string can use the hexadecimal format, ASCII format, or combination of the two formats.Prerequisites
Perform the following operations before running the command:
Precautions
<HUAWEI> system-view [~HUAWEI] dhcp enable [~HUAWEI] interface GigabitEthernet 0/1/1 [~HUAWEI-GigabitEthernet0/1/1] dhcp option82 insert enable [*HUAWEI-GigabitEthernet0/1/1] dhcp option82 format type1
<HUAWEI> system-view [~HUAWEI] dhcp enable [~HUAWEI] interface GigabitEthernet 0/1/1 [~HUAWEI-GigabitEthernet0/1/1] dhcp option82 insert enable [*HUAWEI-GigabitEthernet0/1/1] dhcp option82 format self-define testCase