The dhcpv6 option18 format command configures the format of the Option 18 field in a DHCPv6 message.
The undo dhcpv6 option18 format command restores the default format of the Option 18 field in a DHCPv6 message.
By default, the format of the Option 18 field is not configured in a DHCPv6 message.
dhcpv6 option18 [ vlan vlan-id ] [ ce-vlan ce-vlan-id ] format user-defined text
undo dhcpv6 option18 { [ vlan vlan-id ] [ ce-vlan ce-vlan-id ] format | format all }
Parameter | Description | Value |
---|---|---|
user-defined text |
Indicates the user-defined format of the Option 18 field. |
The value is a string of 1 to 251 characters. The details about the user-defined format string are provided in the Usage Guidelines. |
vlan vlan-id |
Specifies the outer VLAN ID. NOTE:
|
The value is an integer that ranges from 1 to 4094. |
ce-vlan ce-vlan-id |
Specifies the inner VLAN ID.
NOTE:
This parameter is not supported in the VLAN view. |
The value is an integer that ranges from 1 to 4094. |
all |
Deletes all formats of the Option 18 field. |
- |
System view, VLAN 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
After the dhcpv6 option18 { insert | rebuild } enable command is executed to enable the device to insert the Option 18 field to a DHCPv6 message, you can run the dhcpv6 option18 format command to configure the format of the Option 18 field in a DHCPv6 message.
Delimiters must be added between keywords; otherwise, the device cannot parse the keywords. The delimiters cannot be numbers.
# Configure the format of the Option 18 field in a DHCPv6 message in VLAN 10.
<HUAWEI> system-view [HUAWEI] dhcp snooping enable [HUAWEI] vlan 10 [HUAWEI-vlan10] dhcpv6 option18 format user-defined "%length %svlan %5slot %3subslot %8port"
# Configure the format of the Option 18 field in a DHCPv6 message on GE0/0/1.
<HUAWEI> system-view [HUAWEI] dhcp snooping enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] dhcpv6 option18 format user-defined "%length %svlan %5slot %3subslot %8port"