#配置SWA(DHCPv6服务器)与SWB(DHCPv6中继)的IPV6互联接口所属vlan 1的虚接口地址。取消设备发布RA消息的抑制。配置被管理地址的配置标志位为1,即主机通过DHCPv6服务器获取IPv6地址。配置其他信息配置标志位为1,即主机通过DHCPv6服务器获取除IPv6地址以外的其他信息。
<SWA>system-view
System View: return to User View with Ctrl+Z.
[SWA]int vlan 1
[SWA-Vlan-interface1] ipv6 address 1::1/64
[SWA-Vlan-interface1] ipv6 nd autoconfig managed-address-flag
[SWA-Vlan-interface1] ipv6 nd autoconfig other-flag
[SWA-Vlan-interface1] undo ipv6 nd ra halt
#配置接口Vlan-interface1工作在DHCPv6服务器模式。
[SWA-Vlan-interface1] ipv6 dhcp select server
[SWA-Vlan-interface1] quit
#配置不参与自动分配的IPv6地址,以避免分配DNS服务器的地址。
[SWA]ipv6 dhcp server forbidden-address 2::1
[SWA]ipv6 dhcp server forbidden-address 3::1
#配置DHCPv6服务器地址池为1,为客户端分配2::/64的IPv6地址。
[SWA]ipv6 dhcp pool 1
[SWA-dhcp6-pool-1] network 2::/64
[SWA-dhcp6-pool-1] dns-server 2::1
[SWA-dhcp6-pool-1] gateway-list 2::1
[SWA-dhcp6-pool-1]quit
#配置DHCPv6服务器地址池为2,为客户端分配3::/64的IPv6地址。
[SWA]ipv6 dhcp pool 2
[SWA-dhcp6-pool-2] network 3::/64
[SWA-dhcp6-pool-2] dns-server 3::1
[SWA-dhcp6-pool-2] gateway-list 3::1
[SWA-dhcp6-pool-2]quit
#SWA上添加到DHCPv6中继的IPv6静态路由。
[SWA] ipv6 route-static 2:: 64 1::2
[SWA] ipv6 route-static 3:: 64 1::2
#保存配置
[SWA] save for
#配置SWB上创建vlan 2、vlan 3,将接口Ethernet 1/0/2加入vlan 2,接口Ethernet 1/0/3加入vlan 3。
<SWB>sys
System View: return to User View with Ctrl+Z.
[SWB]vlan 2 to 3
[SWB]int Ethernet 1/0/2
[SWB-Ethernet1/0/2]port access vlan 2
[SWB-Ethernet1/0/2]quit
[SWB]int Ethernet 1/0/3
[SWB-Ethernet1/0/3]port access vlan 3
[SWB-Ethernet1/0/3]quit
#配置SWB与SWA的互联接口所属vlan1虚接口的IPv6地址。
[SWB]interface Vlan-interface1
[SWB-Vlan-interface1] ipv6 address 1::2/64
#配置vlan 2和vlan 3虚接口IPv6地址。取消设备发布RA消息的抑制。配置被管理地址的配置标志位为1,即主机通过DHCPv6服务器获取IPv6地址。配置其他信息配置标志位为1,即主机通过DHCPv6服务器获取除IPv6地址以外的其他信息。
[SWB]int vlan 2
[SWB-Vlan-interface2] ipv6 address 2::1/64
[SWB-Vlan-interface2] ipv6 nd autoconfig managed-address-flag
[SWB-Vlan-interface2] ipv6 nd autoconfig other-flag
[SWB-Vlan-interface2] undo ipv6 nd ra halt
[SWB-Vlan-interface2]quit
[SWB]int vlan 3
[SWB-Vlan-interface3] ipv6 address 3::1/64
[SWB-Vlan-interface3] ipv6 nd autoconfig managed-address-flag
[SWB-Vlan-interface3] ipv6 nd autoconfig other-flag
[SWB-Vlan-interface3] undo ipv6 nd ra halt
[SWB-Vlan-interface3]quit
#SWB上添加到DHCPv6服务器的IPv6静态路由。
[SWB] ipv6 route-static :: 0 1::1
#分别配置vlan 2、vlan 3虚接口工作在DHCPv6中继模式,指定1::1为DHCPv6服务器地址。
[SWB] int vlan 2
[SWB-Vlan-interface2]ipv6 dhcp select relay
[SWB-Vlan-interface2]ipv6 dhcp relay server-address 1::1
[SWB-Vlan-interface2]quit
[SWB] int vlan 3
[SWB-Vlan-interface3]ipv6 dhcp select relay
[SWB-Vlan-interface3]ipv6 dhcp relay server-address 1::1
[SWB-Vlan-interface3]quit
#保存配置
[SWA] save for
#在SWA上DHCPv6分配ipv6地址情况如下,PC1获取到2::2/64的IPv6地址,PC2获取到3::2/64的IPv6地址。
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作