MSR系列路由器 6to4隧道功能 的配置
关键字: MSR;IPv6;6to4;隧道
试验设备:RTA(MSR20-21),RTB(MSR20-20),RTC(MSR30-20)
6to4隧道可将多个IPv6孤岛网络通过IPv4网络连接到IPv6网络,本配置通过在RTA与RTC上建立6to4隧道,穿越IPv4网络RTB,使两端的IPv6主机互通(用loopback地址模拟),举例说明如何建立6to4隧道,同时如何测试配置是否成功。
图1 IPv6 6to4隧道组网图
1.RTA配置:
#
router id
#
ipv6
#
interface
Ethernet0/0
port link-mode route
ip address
undo ipv6 nd ra halt
#
interface
Ethernet0/1
port link-mode route
ipv6 address 2002:303:303:1::1/64
#
//用loopBack地址做为隧道入口地址
interface LoopBack1
ip address
#
//建立6to4隧道
#
interface Tunnel1
ipv6 address
2002:303:303:2::1/64
tunnel-protocol
ipv6-ipv4 6to4
//以loopback地址做为隧道源地址,可以保证隧道始终UP
source LoopBack1
//启动ipv4 ospf 以保证v4网络是连通的
#
ospf 1
are
network
network
//将所有访问2002前缀的路由均指向隧道1
#
ipv6
route-static 2002:: 16 Tunnel1
#
2.配置RTB:
//RTB在实例中模拟Ipv4网络,配置简单
//只需启动ospf 保证网络连通即可
#
router id
#
ipv6
#
interface
Ethernet0/0
port link-mode route
ip address
#
interface Ethernet0/1
port link-mode
route
ip
address
#
ospf 1
are
network
network
#
3.RTC配置:
#
router id
#
ipv6
#
//用loopBack地址做为隧道入口地址
interface LoopBack1
ip address
#
interface GigabitEthernet0/0
port link-mode route
ip address
#
interface GigabitEthernet0/1
port link-mode route
ipv6 address 2002:404:404:1::1/64
undo ipv6 nd ra halt
#
interface Tunnel1
ipv6 address 2002:404:404:2::1/64
tunnel-protocol ipv6-ipv4 6to4
source LoopBack1
#
ospf 1
are
network
network
#
ipv6 route-static 2002:: 16 Tunnel1
#
1.
注意6to4地址的格式:2002:××:××:。。。。
2. 注意静态路由的格式,只定义前缀长度为16的就可以。
配置完成后,在RTC上ping路由器RTA 6to4的入口地址有如下结果:
[RTC-2921]ping ipv6 2002:0303:0303:2::1
PING 2002:0303:0303:2::1
: 56 data bytes, press CTRL_C to
break
Reply from 2002:303:303:2::1
bytes=56
Sequence=1 hop limit=64 time = 3 ms
Reply from 2002:303:303:2::1
bytes=56
Sequence=2 hop limit=64 time = 2 ms
Reply from 2002:303:303:2::1
bytes=56
Sequence=3 hop limit=64 time = 2 ms
Reply from 2002:303:303:2::1
bytes=56
Sequence=4 hop limit=64 time = 2 ms
Reply from 2002:303:303:2::1
bytes=56
Sequence=5 hop limit=64 time = 2 ms
--- 2002:0303:0303:2::1
ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet
loss
round-trip
min/avg/max =