R1#ping baidu.com Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2012::2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
ACL
1 2
ipv6 access-list x # 进入acl配置模式 ipv6 traffic-filter # 在接口下应用
R1#ping 2045::5 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2045::5, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/10/46 ms
R2(config)#int tu 0 R2(config-if)#no tu des 192.168.34.4 R2(config-if)#tu mo ipv6ip 6to4 R2(config-if)#int e0/0 R2(config-if)#ipv add 2002:c0a8:1702::2/64 # 这个地址中的c0a8:1701是计算R2的IPv4地址得到的 R2(config-if)#no ipv nd ra su R2(config-if)#no ipv route ::/0 tu 0 R2(config)#ipv route 2002::/16 tu 0
R1#ping 2002:C0A8:2204:0:A8BB:CCFF:FE00:5000 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2002:C0A8:2204:0:A8BB:CCFF:FE00:5000, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/18 ms
R1 ipv6 unicast-routing interface Loopback0 ip address 1.1.1.1 255.255.255.255 interface Ethernet0/0 ipv6 address 2012::1/64 ospfv3 1 ipv6 area 0 =============================== R2 ipv6 unicast-routing interface Loopback0 ip address 2.2.2.2 255.255.255.255 interface Tunnel0 ipv6 enable ospfv3 1 ipv6 area 0 tunnel source Ethernet0/1 tunnel destination 192.168.34.4 interface Ethernet0/0 ipv6 address 2012::2/64 ospfv3 1 ipv6 area 0 interface Ethernet0/1 ip address 192.168.23.2 255.255.255.0 ip route 0.0.0.0 0.0.0.0 192.168.23.3 ====================================== R3 interface Ethernet0/0 ip address 192.168.23.3 255.255.255.0 interface Ethernet0/1 ip address 192.168.34.3 255.255.255.0 =================================== R4 ipv6 unicast-routing interface Loopback0 ip address 4.4.4.4 255.255.255.255 interface Tunnel0 ipv6 enable ospfv3 1 ipv6 area 0 tunnel source Ethernet0/0 tunnel destination 192.168.23.2 interface Ethernet0/0 ip address 192.168.34.4 255.255.255.0 interface Ethernet0/1 ipv6 address 2045::4/64 ospfv3 1 ipv6 area 0 ip route 0.0.0.0 0.0.0.0 192.168.34.3 ======================================= R5 ipv6 unicast-routing interface Loopback0 ip address 5.5.5.5 255.255.255.255 interface Ethernet0/0 ipv6 address 2045::5/64 ospfv3 1 ipv6 area 0
测试连通性
1 2 3 4 5
R1#ping 2045::5 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2045::5, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms