The dhcpv6 interface-id format command configures the Interface-ID format in DHCPv6 packets.
The undo dhcpv6 interface-id format command restores the default Interface-ID format in DHCPv6 packets.
By default, the Interface-ID format in DHCPv6 packets is default.
Parameter | Description | Value |
---|---|---|
default | Specifies the default Interface-ID format. The default Interface-ID format is %04svlan.%04cvlan.%mac:%portname. The values of the S-VLAN and C-VLAN are integers containing four characters. If the length is fewer than four characters, the value is prefixed with 0s. For example, if the outer VLAN value in the DHCPv6 packets received by the device is 11, the inner VLAN value is 22, the inbound interface is VLANIF100, and the device MAC address is 6afe-870b-0000, the Interface-ID generated during the system parsing process is 0011.0022.6afe870b0000:vlanif100. |
- |
user-defined text | Specifies a user-defined format as the Interface-ID
format. A user-defined format can be:
|
The value is a string of case-sensitive characters without spaces. The character string contains 1 to 251 characters, excluding the quotation marks. |
Usage Scenario
The Interface-ID records user access information such as the inbound interfaces of the DHCPv6 packets sent from the clients to the device. The device functions as a DHCPv6 relay or lightweight DHCPv6 relay agent (LDRA). When receiving the request packets sent from the DHCPv6 clients and forwarding the packets to the DHCPv6 server, the device can insert the Interface-ID to the packets to identify the DHCPv6 client location information. The location information can be used by the DHCPv6 server to assign IPv6 addresses and network parameters. You can run the dhcpv6 interface-id format command to configure the format of the Interface-ID inserted into DHCPv6 packets.
Keyword |
Description |
---|---|
duid |
Specifies the client ID, including information such as the client MAC address. |
sysname |
Specifies the device name of the client. |
portname |
Specifies the name of the inbound interface that receives the DHCPv6 packets sent from the client to the device. |
porttype |
Specifies the type of the inbound interface that receives the DHCPv6 packets sent from the client to the device. The interface type is specified when the NAS interface is configured in certain scenarios. |
iftype |
Specifies the type of the inbound interface that receives the DHCPv6 packets sent from the client to the device. The interface type is usually GE. |
mac |
Specifies the device MAC address. |
slot |
Specifies the slot number of the DHCPv6 packet sent from the client to the device. |
subslot |
Specifies the sub-slot number of the DHCPv6 packet sent from the client to the device. |
port |
Specifies the port number of the DHCPv6 packet sent from the client to the device. |
svlan |
Specifies the outer VLAN of the DHCPv6 packet sent by the client. |
cvlan |
Specifies the inner VLAN of the DHCPv6 packet sent by the client. |
length |
Specifies the total length of the keywords following the length keyword. The length of the length keyword is excluded. |
Prerequisites
DHCP has been enabled globally using the dhcp enable command.
Precautions
The user-defined format content must be specified between the double quotation marks (""). For example, to configure the user-defined format content as mac, run the dhcpv6 interface-id format user-defined "%mac" command.
Separators that cannot be digits must be added between the keywords in the user-defined format. Otherwise, the keywords cannot be parsed.
The symbol % must be prefixed to the keywords in the user-defined format to differentiate them from common character strings. If a digit exists before the symbol % and keyword, the digit refers to the number of characters in the keyword.
The self-defined content is encapsulated in ASCII format. In addition to the preceding precautions, note the following rules: