< Home

Enabling the DHCPv6 Client Function

Context

When the DHCPv6 client function is configured on the switch, the switch dynamically obtains IPv6 addresses and other configuration parameters from the DHCPv6 server. This operation facilitates user configurations and management.

Procedure

  1. Configure IPv6 functions on interfaces.
    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. Run ipv6 address auto link-local or ipv6 address ipv6-address link-local

      The link-local address is configured automatically or manually on the interface.

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

  2. Configure the DHCPv6 client to request an IPv6 address
    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. Configure the DHCPv6 client function.

      A DHCPv6 client can obtain an IPv6 address in DHCPv6 stateful mode and DHCPv6 stateless mode. For details, see IPv6 Address Allocation Methods in DHCPv6 Overview.

      • DHCPv6 stateful mode: Run ipv6 address auto dhcp [ hint ipv6-address ] [ rapid-commit ] [ unicast-option ]

        The DHCPv6 client is enabled to obtain an IPv6 address and other network configuration parameters including the IPv6 addresses of the DNS and SNTP servers using the stateful DHCPv6 address autoconfiguration mode.

      • DHCPv6 stateless mode: Run dhcpv6 client information-request

        The DHCPv6 client is enabled to obtain network configuration parameters (excluding IPv6 addresses) using the stateless DHCPv6 address autoconfiguration mode.

      By default, stateless or stateful DHCPv6 address autoconfiguration is not configured on an interface to assign IPv6 addresses and other network configuration parameters.

      The service can use the two-message exchange method to assign IPv6 addresses and other network configuration parameters to clients only when two-message exchange is enabled on the DHCPv6 clients and server. Otherwise, the server assigns IPv6 addresses and other network configuration parameters to the clients using the four-message exchange method.

      To modify the DHCPv6 address autoconfiguration mode, you must disable the original mode. For example, the DHCPv6 client is enabled to use the stateful DHCPv6 address autoconfiguration mode to obtain an IPv6 address and other network configuration parameters including the IPv6 addresses of the DNS and SNTP servers. To enable the DHCPv6 client to use the stateless DHCPv6 address autoconfiguration mode to obtain network configuration parameters (excluding IPv6 addresses), run the undo ipv6 address auto dhcp command to disable stateful DHCPv6 address autoconfiguration and then run the dhcpv6 client information-request command to enable stateless DHCPv6 address autoconfiguration.

    5. Run ipv6 address auto global default

      The device is enabled to automatically generate global unicast IPv6 addresses through stateless autoconfiguration or learn the default route destined for the IPv6 gateway.

      By default, a device is disabled from automatically generating global unicast IPv6 addresses through stateless autoconfiguration or learning the default route destined for the IPv6 gateway.

      The DHCPv6 server does not allocate the IPv6 gateway address to any DHCPv6 client.

      When the DHCPv6 stateful mode is configured, the DHCPv6 client learns the default route destined for the IPv6 gateway using this command. When the DHCPv6 stateless mode is configured, the DHCPv6 client learns the global unicast IPv6 address and the default route destined for the IPv6 gateway using this command.

      Ensure that the RA message advertisement function has been configured on the interconnected interface of the remote device using the undo ipv6 nd ra halt command.

    6. (Optional) Run dhcpv6 client renew

      IPv6 addresses and prefixes allocated to DHCPv6 clients are manually updated.

Verifying the Configuration

  • Run the display dhcpv6 client [ interface interface-type interface-number ] command to check the DHCPv6 client configurations.

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