< Home

Enabling the DHCPv6 PD Client Function

Context

When the uplink interface of the device is configured as the DHCPv6 PD client, the client uses the DHCPv6 protocol to dynamically obtain an IPv6 address prefix from the DHCPv6 PD server. The downlink interface is bound to the obtained IPv6 address prefix, so that the IPv6 address can be automatically generated for the user in route advertising mode.

Procedure

  1. Configure the IPv6 function on the uplink interface.
    1. Run system-view

      The system view is displayed.

    2. Run ipv6

      The device is enabled to forward IPv6 unicast packets.

      By default, the device is disabled from forwarding IPv6 unicast packets.

    3. Run interface interface-type interface-number

      The interface view is displayed.

    4. (Optional) On an Ethernet interface, run undo portswitch

      The interface is switched to Layer 3 mode.

      By default, an Ethernet interface works in Layer 2 mode.

      Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.

    5. Run ipv6 enable

      IPv6 is enabled on the interface.

      By default, IPv6 is disabled on an interface.

    6. Configure a global unicast IPv6 address manually or automatically.

      • Manually configuring a global unicast IPv6 address:

        Run the ipv6 address { ipv6-address prefix-length |ipv6-address/prefix-length } command to configure the global unicast IPv6 address for the interface.

      • Automatically generating a global unicast IPv6 address:

        1. Run the ipv6 address auto link-local or ipv6 address ipv6-address link-local command to automatically or manually configure the link-local address on the interface.

          By default, no link-local address is configured for an interface.

        2. Run the ipv6 address auto global [ default ] command to enable the function of automatically generating global unicast IPv6 addresses through stateless autoconfiguration.

          By default, the device is disabled from automatically generating global unicast IPv6 addresses through stateless autoconfiguration.

  2. Configure the DHCPv6 PD client on the uplink interface.
    1. Run system-view

      The system view is displayed.

    2. Run dhcpv6 duid { ll | llt | duid }

      A DUID is configured for the device.

      By default, the device generates a DUID based on the link-layer (LL) address.

    3. Run interface interface-type interface-number

      The interface view is displayed.

    4. Run dhcpv6 client pd prefix-name [ hint ipv6-prefix/ipv6-prefix-length ] [ rapid-commit ] [ unicast-option ] or dhcpv6 client dhcp [ hint ipv6-address ] pd prefix-name [ hint ipv6-prefix/ipv6-prefix-length ] [ rapid-commit ] [ unicast-option ] union-mode

      The DHCPv6 PD client is enabled.

      By default, the DHCPv6 PD client is disabled.

      You can specify the rapid-commit parameter to set the DHCPv6 PD client to request an IPv6 address prefix using the two-message exchange. The service can use two-message exchange to assign IPv6 address prefix to client only when two-message exchange is enabled on the DHCPv6 PD client and server. Otherwise, the server assigns IPv6 address prefix to the client using the four-message exchange method.

Verifying the Configuration

Run the display dhcpv6 client prefix [ name prefix-name ] command to check the IPv6 address prefix on the device that functions as the DHCPv6 PD client.

Follow-up Procedure

Bind the downlink interface to the obtained IPv6 address prefix and enable the downlink interface to send RA packets, so that the IPv6 address can be automatically generated for the user in route advertising mode.
  1. Run the system-view command to enter the system view.

  2. Run the interface interface-type interface-number command to enter the interface view.
  3. (Optional) On an Ethernet interface, run undo portswitch

    The interface is switched to Layer 3 mode.

    By default, an Ethernet interface works in Layer 2 mode.

    Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.

  4. Run the ipv6 enable command to enable the IPv6 function on the interface.

    By default, the IPv6 function is disabled on an interface.

  5. Run the ipv6 address auto link-local or ipv6 address ipv6-address link-local command to automatically or manually configure the link-local address on the interface.

    By default, no link-local address is configured for an interface.

  6. Run the ipv6 address dhcpv6-prefix { ipv6-address prefix-length | ipv6-address/prefix-length } command to bind the interface to the IPv6 address prefix obtained by the DHCPv6 PD client.

    By default, the interface is not bound to the IPv6 address prefix obtained by the DHCPv6 PD client.

    The value of prefix-length for the IPv6 address prefix bound to the interface must be greater than the length of the prefix obtained by the DHCPv6 PD client; otherwise, the interface cannot generate the global unicast IPv6 address based on the bound IPv6 address prefix and record the log DHCP/4/PREF_LENCHK.

    You can run the display dhcpv6 client prefix [ name prefix-name ] command to check the length of the prefix obtained by the DHCPv6 PD client.

  7. Run the undo ipv6 nd ra halt command to enable the interface to send RA packets.

    By default, the interface is disabled from sending RA packets.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >