如果大量的企业用户IPv6地址都是手动配置,那么网络管理员工作量大,而且可管理性很差。管理员希望实现公司用户IPv6地址和网络配置参数的自动获取,便于统一管理,实现IPv6的层次布局。
图1?DHCPv6服务器组网图
DHCPv6服务器的配置思路如下:
使能接口的IPv6功能,实现设备之间的IPv6通信。
使能DHCPv6服务器功能,实现设备通过DHCPv6方式分配IPv6地址。
<Huawei> system-view [Huawei] sysname RouterA [RouterA] dhcp enable
[RouterA] dhcpv6 pool pool1 [RouterA-dhcpv6-pool-pool1] address prefix fc00:3::/64 [RouterA-dhcpv6-pool-pool1] dns-server fc00:3::1 [RouterA-dhcpv6-pool-pool1] excluded-address fc00:3::1 [RouterA-dhcpv6-pool-pool1] quit
[RouterA] ipv6 [RouterA] interface gigabitethernet 0/0/1 [RouterA-GigabitEthernet0/0/1] ipv6 enable [RouterA-GigabitEthernet0/0/1] ipv6 address fc00:3::1/64
[RouterA-GigabitEthernet0/0/1] dhcpv6 server pool1
[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
# 在路由器上使用display dhcpv6 pool命令用来查看DHCPv6地址池信息。
<RouterA> display dhcpv6 pool pool1 DHCPv6 pool: pool1 Address prefix: FC00:3::/64 Lifetime valid 172800 seconds, preferred 86400 seconds 0 in use, 0 conflicts Excluded-address FC00:3::1 1 excluded addresses Information refresh time: 86400 DNS server address: FC00:3::1 Conflict-address expire-time: 172800 Active normal clients: 0
# 在路由器上使用display dhcpv6 server命令用来查看DHCPv6服务器信息。
<RouterA> display dhcpv6 server Interface DHCPv6 pool GigabitEthernet0/0/1 pool1