Example for Configuring a DHCPv6 PD Server
Networking Requirements
In Figure 9-16, the RouterIndustrial Switch Router is required to function as a DHCPv6 PD server and assign an IPv6 address prefix to the DHCPv6 PD client. Configure the RouterIndustrial Switch Router as a DHCPv6 PD server to assign IPv6 addresses and other network configuration parameters to DHCPv6 clients. This facilitates centralized management and layered IPv6 network deployment. The DHCPv6 PD server assigns DNS server address fc00:2::1/64 to a client. 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 server function so that DHCPv6 PD server can assign IPv6 address using DHCPv6.
Procedure
- Enable the DHCP service.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] dhcp enable
- Configure a DHCPv6 PD server.
[Huawei] dhcpv6 pool pool1 [RouterA-dhcpv6-pool-pool1] prefix-delegation fc00:1::/60 63 [RouterA-dhcpv6-pool-pool1] dns-server fc00:2::1 [RouterA-dhcpv6-pool-pool1] quit
- Configure IPv6 functions on an interface.
[RouterA] ipv6 [RouterA] interface gigabitethernet 0/0/1 [RouterA-GigabitEthernet0/0/1] ipv6 enable [RouterA-GigabitEthernet0/0/1] ipv6 address fc00:1::1/64
- Enable the DHCPv6 PD server function on an interface.
[RouterA-GigabitEthernet0/0/1] dhcpv6 server pool1
- Configure M and O flag bits of RA messages through which the DHCPv6 PD client learns the route to the IPv6 gateway.
[RouterA-GigabitEthernet0/0/1] undo ipv6 nd ra halt [RouterA-GigabitEthernet0/0/1] ipv6 nd autoconfig managed-address-flag [RouterA-GigabitEthernet0/0/1] ipv6 nd autoconfig other-flag [RouterA-GigabitEthernet0/0/1] quit [RouterA] quit
- Configure an IPv6 static route destined for the network segment fc00:1:: where the hosts reside and set the next-hop IPv6 address to the global IPv6 unicast address FC00:3::865B:12FF:FE36:595B of the interconnected interface.
[RouterA] ipv6 route-static fc00:1:: 64 FC00:3::865B:12FF:FE36:595B
- Verify the configuration.
# Run the display dhcpv6 pool command on the RouterIndustrial Switch Router to check information about the DHCPv6 address pool.
<RouterA> display dhcpv6 pool pool1 DHCPv6 pool: pool1 Prefix delegation: FC00:1::/60 63 Lifetime valid 172800 seconds, preferred 86400 seconds 0 in use Information refresh time: 86400 DNS server address: FC00:2::1 Conflict-address expire-time: 172800 renew-time-percent : 50 rebind-time-percent : 80 Active pd clients: 0 Logging : Disable
# Run the display dhcpv6 server command on the RouterIndustrial Switch Router to check information about the DHCPv6 server.
<RouterA> display dhcpv6 server Interface DHCPv6 pool GigabitEthernet0/0/1 pool1
Configuration File
Configuration file of RouterA
# sysname RouterA # ipv6 # dhcp enable # dhcpv6 pool pool1 prefix-delegation FC00:1::/60 63 dns-server FC00:2::1 # interface GigabitEthernet0/0/1 ipv6 enable ipv6 address FC00:1::1/64 undo ipv6 nd ra halt ipv6 nd autoconfig managed-address-flag ipv6 nd autoconfig other-flag dhcpv6 server pool1 # return