Example for Configuring a DHCPv6 PD Client
Networking Requirements
In Figure 9-19, the industrial switch router is required to function as a DHCPv6 PD client and obtain an IPv6 address prefix from the DHCPv6 PD server. Configure the industrial switch router as a DHCPv6 PD client to assign IPv6 addresses and other network configuration parameters to DHCPv6 clients. This reduces pressure on the DHCPv6 server and facilitates layered IPv6 network deployment. The address of the DHCPv6 PD server is fc00:1::1/64. The DHCPv6 PD 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 PD client function so that devices can obtain IPv6 address prefixes using DHCPv6.
Procedure
- Enable the DHCP service.
<Huawei> system-view [Huawei] sysname Router A [Router A] dhcp enable
- Configure IPv6 functions on an interface.
[Router A] ipv6 [Router A] interface gigabitethernet 0/0/1 [Router A-GigabitEthernet0/0/1] undo portswitch [Router A-GigabitEthernet0/0/1] ipv6 enable [Router A-GigabitEthernet0/0/1] ipv6 address auto link-local
- Enable the DHCPv6 PD client function.
# Enable the DHCPv6 PD client function on GE0/0/1.
[Router A-GigabitEthernet0/0/1] dhcpv6 client pd myprefix [Router A-GigabitEthernet0/0/1] quit
- Configure Router A to send an RA message to assign address
prefixes to hosts.
# Configure the device to send RA messages and configure M and O flag bits.
[Router A] interface gigabitethernet 0/0/2 [Router A-GigabitEthernet0/0/2] undo portswitch [Router A-GigabitEthernet0/0/2] ipv6 enable [Router A-GigabitEthernet0/0/2] ipv6 address auto link-local [Router A-GigabitEthernet0/0/2] undo ipv6 nd ra halt [Router A-GigabitEthernet0/0/2] ipv6 nd autoconfig other-flag [Router A-GigabitEthernet0/0/2] ipv6 address myprefix ::1:0:0:0:1/64 [Router A-GigabitEthernet0/0/2] quit
- 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 DHCPv6-PD client mode. State is BOUND. Preferred server DUID : 000300060819A6CDA894 Reachable via address : FE80::A19:A6FF:FECD:A897 IA PD IA ID 0x00000051 T1 43200 T2 69120 Prefix name : myprefix Obtained : 2012-12-22 09:33:09 Renews : 2012-12-22 21:33:09 Rebinds : 2012-12-23 04:45:09 Prefix : FC00:1::/48 Lifetime valid 172800 seconds, preferred 86400 seconds Expires at 2012-12-24 09:33:09(172792 seconds left) DNS server : FC00:2::1
# Run the display dhcpv6 client statistics on the Router A to check DHCPv6 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
Configuration File
Configuration file of Router A
# sysname Router A # ipv6 # dhcp enable # interface GigabitEthernet0/0/1 undo portswitch ipv6 enable ipv6 address auto link-local dhcpv6 client pd myprefix # interface GigabitEthernet0/0/2 undo portswitch ipv6 enable ipv6 address auto link-local undo ipv6 nd ra halt ipv6 nd autoconfig other-flag ipv6 address myprefix ::1:0:0:0:1/64 # return