The dhcp option82 subscriber-id format command inserts the Sub6 suboption into the DHCP Option 82 field of DHCP messages and configures the format of the Sub6 suboption.
The undo dhcp option82 subscriber-id format command cancels the configuration of the Sub6 suboption inserted into the DHCP Option 82 field of DHCP messages.
By default, the Sub6 suboption is not inserted into the DHCP Option 82 field of DHCP messages.
dhcp option82 subscriber-id format { ascii ascii-text | hex hex-text }
undo dhcp option82 subscriber-id format
Parameter | Description | Value |
---|---|---|
ascii ascii-text |
Specifies the ASCII character string in the Sub6 field. |
The value is an ASCII character string and contains fewer than 129 characters. |
hex hex-text |
Specifies the HEX character string in the Sub6 field. |
The value is in hexadecimal notation. The value can contain only digits 0 to 9, uppercase letters A to F, and lowercase letters a to f. If no space is included, the value length must be an even number smaller than 257. |
System view, Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, MultiGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view
Usage Scenario
In an authentication system for wired Ethernet access based on DHCP, DHCP snooping, and Option82, a device can insert suboptions (suboption 1, suboption 2, suboption 6, and suboption 9) into the Option 82 field in DHCP Request messages. These suboptions in DHCP Request messages help locate user devices. Unauthorized users cannot access the network by using static IP addresses or stealing accounts of authorized users. You can run the dhcp option82 subscriber-id format command to configure the Sub6 suboption.
Prerequisites
DHCP has been enabled using the dhcp enable command.
# Configure the Sub6 suboption inserted into the DHCP Option 82 field of DHCP messages on GE0/0/1 and specify the ASCII character string in the Sub6 suboption.
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] dhcp option82 subscriber-id format ascii hw