IPv6 over IPv4手工Tunnel:
ide
拓撲見QQ收藏spa
R1配置:
ip
[R1]int g0/1路由
[R1-GigabitEthernet0/1]ip add 12.1.1.1 24it
[R1]int g0/0io
[R1-GigabitEthernet0/0]ipv6 address 1::1 100table
[R1]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2class
[R1]int Tunnel 1 mode ipv6-ipv4配置
[R1-Tunnel1]ipv6 address 13::1 100route
[R1-Tunnel1]source 12.1.1.1
[R1-Tunnel1]destination 23.1.1.3
[R1]ipv6 route-static 3:: 100 Tunnel 1
R2配置:
[R2]int g0/0
[R2-GigabitEthernet0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0]int g0/1
[R2-GigabitEthernet0/1]ip add 23.1.1.2 24
R3配置:
[R3]int g0/0
[R3-GigabitEthernet0/0]ip add 23.1.1.3 24
[R3]int g0/1
[R3-GigabitEthernet0/1]ipv6 address 3::1 100
[R3]ip route-static 0.0.0.0 0.0.0.0 23.1.1.2
[R3]int Tunnel 1 mode ipv6-ipv4
[R3-Tunnel1]ipv6 address 13::3 100
[R3-Tunnel1]source 23.1.1.3
[R3-Tunnel1]destination 12.1.1.1
[R3]ipv6 route-static 1:: 100 Tunnel 1
R4配置:
[PC1]int g1/0/1
[PC1-GigabitEthernet1/0/1]port link-mode route
[PC1-GigabitEthernet1/0/1]ipv6 address 1::2 100
[PC1]ipv6 route-static ::0 0 1::1
R5配置:
[PC2]int g1/0/1
[PC2-GigabitEthernet1/0/1]port link-mode route
[PC2-GigabitEthernet1/0/1]ipv6 address 3::2 100
[PC2]ipv6 route-static ::0 0 3::1
查看IPv6的靜態路由:
<R3>dis ipv6 routing-table protocol static
IPv6 over IPv4自動Tunnel:
R1配置:
[R1]undo int Tunnel 1
[R1]int Tunnel 0 mode ipv6-ipv4 auto-tunnel
[R1-Tunnel0]ipv6 address ::12.1.1.1 96
[R1-Tunnel0]source g0/1
[R1]ipv6 route-static 3:: 100 ::23.1.1.3 下一跳地址爲對端Tunnel地址
R3配置:
[R3]undo int Tunnel 1
[R3]int Tunnel 0 mode ipv6-ipv4 auto-tunnel
[R3-Tunnel0]ipv6 address ::23.1.1.3 96
[R3-Tunnel0]source g0/0
[R3]ipv6 route-static 1:: 100 ::12.1.1.1 下一跳地址爲對端Tunnel地址
其餘配置不變
6-to-4 Tunnel:
拓撲見QQ收藏
R1配置:
[R1]int g0/1
[R1-GigabitEthernet0/1]ip add 12.1.1.1 24
[R1-GigabitEthernet0/1]int g0/0
[R1-GigabitEthernet0/0]ipv address 2002:c01:101:2::1 100
[R1]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
[R1]int Tunnel 1 mode ipv6-ipv4 6to4
[R1-Tunnel1]ipv address 2002:c01:101:1::1 100
[R1-Tunnel1]source 12.1.1.1
[R1]ipv6 route-static 2002:: 16 Tunnel 1
R2配置:
[R2]int g0/0
[R2-GigabitEthernet0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0]un sh
[R2-GigabitEthernet0/0]int g0/1
[R2-GigabitEthernet0/1]ip add 23.1.1.2 24
R3配置:
[R3]int g0/0
[R3-GigabitEthernet0/0]ip add 23.1.1.3 24
[R3-GigabitEthernet0/0]un sh
[R3-GigabitEthernet0/0]int g0/1
[R3-GigabitEthernet0/1]ipv6 address 2002:1701:103:2::1 100
[R3]ip route-static 0.0.0.0 0.0.0.0 23.1.1.2
[R3]int Tunnel 1 mode ipv6-ipv4 6to4
[R3-Tunnel1]ipv6 address 2002:1701:103:1::1 100
[R3-Tunnel1]source 23.1.1.3
[R3]ipv6 route-static 2002:: 16 Tunnel 1
R4配置(PC1):
[PC1]int g1/0/1
[PC1-GigabitEthernet1/0/1]port link-mode route
[PC1-GigabitEthernet1/0/1]ipv6 address 2002:c01:101:2::2 100
[PC1]ipv6 route-static :: 0 2002:c01:101:2::1
R5配置(PC2):
[PC2]int g1/0/1
[PC2-GigabitEthernet1/0/1]port link-mode route
[PC2-GigabitEthernet1/0/1]ipv add 2002:1701:103:2::2 100
[PC2]ipv6 route-static :: 0 2002:1701:103:2::1
6-to-4中繼:
R1,R2,R4配置不變,修改R3,R5
R3配置:
[R3]int g0/1
[R3-GigabitEthernet0/1]un ipv6 address
[R3-GigabitEthernet0/1]ipv6 address 3::1 120
R5配置:
[PC2]int g1/0/1
[PC2-GigabitEthernet1/0/1]undo ipv6 address
[PC2-GigabitEthernet1/0/1]ipv6 address 3::2 120
[PC2]undo ipv6 route-static :: 0
[PC2]ipv6 route-static :: 0 3::1
R1添加配置:
[R1]ipv6 route-static :: 0 2002:1701:103:2::1