配置环境
win11,ensp
主拓扑图
配置思路
(1)创建vlan并将相应接口划入vlan。
(2)在交换机和路由器上启用ipv6功能,配置ipv6地址。
(3)配置ipv6汇总路由。
步骤一:创建vlan并将相应接口划入vlan。
[LSW1]vlan batch 10 20 30 100
[LSW1]int e0/0/1
[LSW1-Ethernet0/0/1]port link-type access
[LSW1-Ethernet0/0/1]port default vlan 100
[LSW1-Ethernet0/0/1]int e0/0/2
[LSW1-Ethernet0/0/2]port link-type access
[LSW1-Ethernet0/0/2]port default vlan 10
[LSW1-Ethernet0/0/2]int e0/0/3
[LSW1-Ethernet0/0/3]port link-type access
[LSW1-Ethernet0/0/3]port default vlan 20
[LSW1-Ethernet0/0/3]int e0/0/4
[LSW1-Ethernet0/0/4]port link-type access
[LSW1-Ethernet0/0/4]port default vlan 30
[LSW1-Ethernet0/0/4]q
步骤二:在交换机和路由器上启用ipv6功能,配置ipv6地址。
[LSW1]ipv6
[LSW1]int vlan 100
[LSW1-Vlanif100]ipv6 enable
[LSW1-Vlanif100]ipv6 address 2001::1/64
[LSW1-Vlanif100]int vlan 10
[LSW1-Vlanif10]ipv6 enable
[LSW1-Vlanif10]ipv6 address 2001:0:10::1/64
[LSW1-Vlanif10]int vlan 20
[LSW1-Vlanif20]ipv6 enable
[LSW1-Vlanif20]ipv6 address 2001:0:20::1/64
[LSW1-Vlanif20]int vlan 30
[LSW1-Vlanif30]ipv6 enable
[LSW1-Vlanif30]ipv6 address 2001:0:30::1/64
[LSW1-Vlanif30]q
[R1]ipv6
[R1]int e0/0/0
[R1-Ethernet0/0/0]ipv6 enable
[R1-Ethernet0/0/0]ipv6 address 2001::2/64
[R1-Ethernet0/0/0]q
步骤三:配置ipv6的路由和汇总路由。
[LSW1]ipv6 route-static :: 0 2001::2
[R1]ipv6 route-static 2001:: 32 2001::1
步骤四:验证结果