Example for Configuring a DHCPv6 Client
Networking Requirements
In Figure 9-20, the RouterIndustrial Switch Router is required to function as a DHCPv6 client and obtain an IPv6 address and other configuration parameters from the DHCPv6 server. The address of the DHCPv6 server is fc00:3::1/64. The DHCPv6 server and client are on the same link.
Configuration Roadmap
Enable IPv6 functions on the interface so that devices can communicate using IPv6.
Enable the DHCPv6 client function so that devices can obtain IPv6 addresses using DHCPv6.
Procedure
- Configure IPv6 functions on an interface.
<Huawei> system-view [Huawei] sysname Router A [Router A] ipv6 [Router A] interface gigabitethernet 0/0/1 [Router A-GigabitEthernet0/0/1] ipv6 enable [Router A-GigabitEthernet0/0/1] ipv6 address auto link-local [Router A-GigabitEthernet0/0/1] ipv6 address auto global default
- Enable the DHCPv6 client function.
# Enable the DHCPv6 client function on GE 0/0/1.
[Router A-GigabitEthernet0/0/1] ipv6 address auto dhcp
- Verify the configuration.
# Run the display dhcpv6 client command on the Router A to check the DHCPv6 client configurations.
<Router A> display dhcpv6 client GigabitEthernet0/0/1 is in stateful DHCPv6 client mode. State is BOUND. Preferred server DUID : 000300060819A6CDA894 Reachable via address : FE80::A19:A6FF:FECD:A897 IA NA IA ID 0x00000051 T1 43200 T2 69120 Obtained : 2012-12-22 09:15:54 Renews : 2012-12-22 21:15:54 Rebinds : 2012-12-23 04:27:54 Address : FC00:3::2 Lifetime valid 172800 seconds, preferred 86400 seconds Expires at 2012-12-24 09:15:54(172795 seconds left)
# Run the display dhcpv6 client statistics command on the Router A to check message statistics on the DHCPv6 client.
<Router A> display dhcpv6 client statistics Message statistics of interface GigabitEthernet0/0/1: Message Received Advertise 1 Reply 1 Reconfigure 0 Invalid 0 Message Sent Solicit 1 Request 1 Confirm 0 Renew 0 Rebind 0 Release 0 Decline 0 Information-request 0