(Optional) Inserting the Interface-ID or Remote-ID Option Information into DHCPv6 Messages
Context
Some DHCPv6 servers can allocate IPv6 addresses and other network parameters to clients according to the client location information. The DHCPv6 protocol defines the Interface-ID option and Remote-ID option that can record the client location information, including the inbound interface on the device that receives DHCPv6 Request packets and DUID information of clients. If the device functions as a DHCPv6 relay agent, the Interface-ID option or Remote-ID option can be added in DHCPv6 packets.
If the device functions as a DHCPv6 snooping device or a lightweight DHCPv6 relay agent, the client location information can be added in DHCPv6 packets. For detailed configuration, see Inserting the Option 18 or Option 37 Field in a DHCPv6 Message or Configuring the LDRA to Detect Client Locations in "DHCP Snooping Configuration" in the S7700 V200R019C10 Configuration Guide - Security.
After DHCPv6 packets are configured to contain the Interface-ID option or Remote-ID option, the device adds the Interface-ID option or Remote-ID option in DHCPv6 Request packets sent by clients according to the configuration, constructs Relay-Forward packets, and sends the packets to the DHCPv6 server. The DHCPv6 server allocates IPv6 addresses and other network parameters to clients according to the options, and sends Relay-Reply packets to the DHCPv6 relay agent. After receiving the Relay-Reply packets, the DHCPv6 relay agent removes the Interface-ID option or Remote-ID option, and forwards the packets to clients or other relay agents.
Procedure
- Run system-view
The system view is displayed.
- (Optional) Run the following commands to configure the format of the Interface-ID option or Remote-ID option.
- Run interface interface-type interface-number
The interface view is displayed.
- Run dhcpv6 remote-id insert enable or dhcpv6 remote-id rebuild enable
The function of adding the Remote-ID option in DHCPv6 packets is enabled.
By default, the function of adding the Remote-ID option in DHCPv6 packets is disabled.
- Run dhcpv6 interface-id insert enable
The function of adding the Interface-ID option in DHCPv6 packets is enabled.
By default, the function of adding the Interface-ID option in DHCPv6 packets is enabled.