The dhcpv6 remote-id format command sets the format of the Remote-ID in DHCPv6 messages.
The undo dhcpv6 remote-id format command restores the default format of the Remote-ID in DHCPv6 messages.
By default, the default format of the Remote-ID in DHCPv6 messages is used.
Parameter |
Description |
Value |
---|---|---|
default |
Indicates to adopt the default format of the remote ID. The default format of the remote ID is %duid %portname:%04svlan.%04cvlan, where the values of the outer VLAN ID and inner VLAN ID are integers and composed of four characters. If the length is shorter than four characters, 0s are prefixed to the value. 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 GE0/0/1, and the client DUID is 0003000180FB063545B3, the Remote-ID option generated during the system parsing process is 0003000180FB063545B3 GigabitEthernet 0/0/1:0011.0022. |
- |
user-defined text |
Specifies a user-defined format as the Remote-ID format. A user-defined format can be:
|
The value is a string of 3 to 247 case-sensitive characters with spaces. |
Use Scenario
The Remote-ID records user access information such as the DUID of the DHCPv6 packets sent from the clients to the device. The device functions as a DHCPv6 relay or lightweight DHCPfv6 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 Remote-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 remote-id format command to configure the format of the Remote-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. |
Follow-up Procedure
When the device functions as a DHCPv6 relay, you must run the dhcpv6 remote-id insert enable or dhcpv6 remote-id rebuild enable command to enable the function of inserting the Remote-ID into DHCPv6 relay packets after running the dhcpv6 remote-id format command to configure the Remote-ID format in DHCPv6 packets.
When the device functions as an LDRA, the Remote-ID is inserted into DHCPv6 relay packets by default and the function does not need to be enabled.
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: