隧道6in4 和隧道6to4(GNS3)
隧道6in4實驗配置
拓?fù)鋱D
?
| Device | Interface | IP Address(IPv6) |
| R1 | F 0/0 | 10.1.81.1 |
| F 0/1 | 2001:db8:cafe:81::10 | |
| R2 | F 0/0 | 10.81.1.2 |
| F 0/1 | 172.81.1.2 | |
| R3 | F 0/0 | 172.81.1.3 |
| F 0/1 | 2001:DB8:ACE:81::20 | |
| R4 | F 0/0 | 2001:db8:cafe:81::40 |
| R5 | F 0/0 | 2001:DB8:ACE:81::50 |
?
手工隧道是雙向點到點隧道,但兩臺邊界路由器之間的純IPv4網(wǎng)絡(luò)不必是點到點網(wǎng)絡(luò),且IPv4網(wǎng)絡(luò)一定要ping通,手工隧道可以用靜態(tài)路由或者動態(tài)路由,我這里使用ospf動態(tài)路由配置。
R1與R3同理
R1(config)#int f 0/0
R1(config-if)#ip add 10.81.1.1 255.255.255.0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#no shut
R1(config-if)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#ip ospf 1 area 0
R1(config-if)#ex
R1(config)#router ospf 1
R1(config-rtr)#router-id 1.1.1.1
R1(config-rtr)#network 1.1.1.1 0.0.0.0 area 0
R1(config-rtr)#network 10.81.1.0 0.0.0.255 area 0
?
R2(config)#int f 0/0
R2(config-if)#ip add 10.81.1.2 255.255.255.0
R2(config-if)#ip ospf 1 area 0
R2(config-if)#no shut
R2(config-if)#int f 0/1
R2(config-if)#ip add 172.81.1.2 255.255.255.0
R2(config-if)#ip ospf 1 area 0
R2(config-if)#no shut
?
R2(config-if)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#ip ospf 1 area 0
R2(config-if)#ex
R2(config)#router ospf 1
R2(config-rtr)#router-id 2.2.2.2
R2(config-rtr)#network 2.2.2.2 0.0.0.0 area 0
R2(config-rtr)#network 10.81.1.0 0.0.0.255 area 0
R2(config-rtr)#network 172.81.1.0 0.0.0.255 area 0
?
查看R1路由表,驗證ospf是否配置成功
?
?
?
Ospf配置完成后去邊界路由配置隧道
R1與R3同理
R1(config)#ipv6 unicast-routing
R1(config)#int f 0/1
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 add 2001:db8:café:81::10/64
R1(config-if)#no shut
R1(config-if)#int tunnel 0
R1(config-if)#ipv6 enable
R1(config-if)#tunnel source f 0/0
R1(config-if)#tunnel mode ipv6ip
R1(config-if)#tunnel destination 172.81.1.3
R1(config-if)#exit
R1(config)#ipv6 route 2001:db8:cafe::/48 tunnel 0
?
?
?
?
配置完R3后試ping R1 f0/1接口
?
?
?
?
最后配置R4(R5同理)
R4(config)#ipv6 unicast-routing
R4(config)#int f 0/0
R4(config-if)#ipv6 enable
R4(config-if)#ipv6 add 2001:db8:cafe:81::40/64
R4(config-if)#no shut
R4(config-if)#ex
R4(config)#ipv6 route ::0/0 2001:db8:café:81::10
?
配置完R5后,從R4ping到 R5
?
?
?
從R5 ping 到 R4
?
?
隧道配置完成。
?
?
?
6to4隧道配置
拓?fù)鋱D
?
| Device | Interface | IP Address(IPv6) |
| R1 | F 0/0 | 172.10.81.1 |
| F 0/1 | 2002:AC0A:5101::1 | |
| R2 | F 0/0 | 10.81.1.1 |
| F 0/1 | 2002:A01:5101::1 | |
| R3 | F 0/0 | 218.224.81.1 |
| F 0/1 | 2002:DAE0:5101::1 | |
| R4 | F 0/0 | 172.10.81.4 |
| F 0/1 | 10.1.81.4 | |
| F 1/0 | 218.224.81.4 | |
| R5 | F 0/0 | 2002:AC0A:5101::5 |
| R6 | F 0/0 | 2002:A01:5101::6 |
| R5 | F 0/0 | 2002:DAE0:5101::7 |
?
6to4隧道內(nèi)部路由只能配置靜態(tài)路由
R1(config)#int f 0/0
R1(config-if)#ip add 172.10.81.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#ex
R1(config)#ip route 10.1.81.0 255.255.255.0 172.10.81.4
R1(config)#ip route 218.224.81.0 255.255.255.0 172.10.81.4
?
R2(config)#int f 0/0
R2(config-if)#ip add 10.1.81.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#ex
R2(config)#ip route 172.10.81.0 255.255.255.0 10.1.81.4
R2(config)#ip route 218.224.81.0 255.255.255.0 10.1.81.4
?
R3(config)#int f 0/0
R3(config-if)#ip add 218.224.81.1 255.255.255.0
R3(config-if)#no shut
R3(config-if)#ex
R3(config)#ip route 10.1.81.0 255.255.255.0 218.224.81.4
R3(config)#ip route 172.10.81.0 255.255.255.0 218.224.81.4
?
R4(config)#int f 0/0
R4(config-if)#ip add 172.10.81.4 255.255.255.0
R4(config-if)#no shut
R4(config-if)#int f 0/1
R4(config-if)#ip add 10.1.81.4 255.255.255.0
R4(config-if)#no shut
R4(config-if)#int f 1/0
R4(config-if)#ip add 218.224.81.4 255.255.255.0
R4(config-if)#no shut
?
靜態(tài)路由配置完成,show路由表驗證
?
?
試從R1ping到R3、R4
?
?
?
繼續(xù)配置隧道
R2、R3配置與R1同理
R1(config)#ipv6 unicast-routing
R1(config)#int f 0/1
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 add 2002:ac0a:5101::1/48
R1(config-if)#no shut
R1(config-if)#int tunnel 0
R1(config-if)#ipv6 enable
R1(config-if)#tunnel source f 0/0
R1(config-if)#tunnel mode ipv6ip 6to 4
R1(config-if)#exit
R1(config)#ipv6 route 2002::/16 tunnel 0
?
配置完后從R1ping到R2、R3
?
?
?
最后配置R5(R6、R7同理)
R5(config)#ipv6 unicast-routing
R5(config)#int f 0/0
R5(config-if)#ipv6 enable
R5(config-if)#ipv6 add 2002:ac0a:5101::5/48
R5(config-if)#no shut
R5(config-if)#ex
R5(config)#ipv6 route ::0/0 2002:ac0a:5101::1
?
配置完成R6、R7后,試從R5ping 通 R6、R7
?
?
6to4隧道實驗完成
?
轉(zhuǎn)載于:https://www.cnblogs.com/JokerKe/p/10786078.html
總結(jié)
以上是生活随笔為你收集整理的隧道6in4 和隧道6to4(GNS3)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c++ 数组的输入遇到特定字符停止输入_
- 下一篇: BLE无线信号的调制方式