好消息,超酷的在线虚拟网络实验室上线了!点击开始实验

为获得更好的浏览效果,建议您使用 Firefox 或者 Chrome 浏览器



MSR系列路由器

IPv6隧道技术之手工隧道的配置

 

关键词:手工隧道;MSR;IPv6

试验设备:MSR 20-21/1台;MSR 20-20/1台;MSR 30-20/1台;PCOSWinXP

/2台;

一、组网需求

通过在路由器RT_ART_B上配置IPv6手工隧道达到穿越中间的Ipv4网络RT_C模拟),使IPv6孤岛PC_A,PC_B互通的目的。

二、组网图:

                   1- IPv6手工隧道组网图

三、配置步骤:

1.如图示,正确连接路由器与PC,

2.依次进行如下配置:

RT_A】配置:

<RT_A>sys

System View: return to User View with Ctrl+Z.

 //全局视图下使能IPv6

[RT_A]ipv6                           

[RT_A]interface Ethernet 0/1

[RT_A-Ethernet0/1] ipv6 address 3FFE::1/64

//使能v6地址自动广播功能默认关闭

[RT_A-Ethernet0/1]undo ipv6 nd ra halt     

//查看配置结果

[RT_A-Ethernet0/1]dis th  

//退出接口视图返回系统视图

[RT_A-Ethernet0/1]quit       

[RT_A]interface Ethernet 0/0

//配置E0/0Ipv4地址(如果已经配了就跳过该步)

[RT_A-Ethernet0/0]ip add 192.168.0.10 24   

//退出接口视图返回系统视图

[RT_A-Ethernet0/0]quit                   

//建立隧道2

[RT_A]interface Tunnel 2                 

//设定隧道2v6地址

[RT_A-Tunnel2]ipv6 address 650::1/64      

//设定隧道类型为6to4

[RT_A-Tunnel2]tunnel-protocol ipv6-ipv4    

//指定隧道起始点为端口E0/0

[RT_A-Tunnel2]source Ethernet 0/0          

//设定隧道目的地此处为隧道在远端RT_B的接口E0/0v4地址

[RT_A-Tunnel2]destination 192.168.1.11    

//查看隧道配置结果

[RT_A-Tunnel1]dis th                  

#

interface Tunnel2

 ipv6 address 650::1/64

 tunnel-protocol ipv6-ipv4

 source Ethernet0/0

 destination 192.168.1.11                 

#

return

[RT_ A -Tunnel1]quit

//RT_Bv4静态路由

[RT_ A ]ip route-static 192.168.1.0 255.255.255.0 192.168.0.12 

//配静态路由将到达RT_B端的PC网段的v6地址的下一跳指向本地隧道

[RT_A] ipv6 route-static 2001:: 64 Tunnel2  

RT_B】配置:

< RT_B >sys

System View: return to User View with Ctrl+Z.

//全局视图下使能IPv6

[RT_ B]ipv6                            

[RT_ B]interface Ethernet 0/1

//PC

[RT_ B-Ethernet0/1] ipv6 address 2001::1/64   

//使能IPv6的路由广播功能默认关闭

[RT_B-Ethernet0/1]undo ipv6 nd ra halt     

//查看配置结果

[RT_B-Ethernet0/1]dis th                

#

interface Ethernet0/1

 port link-mode route

 ipv6 address 2001::1/64

 undo ipv6 nd ra halt

#

return

[RT_B-Ethernet0/1]quit                 

[RT_B]interface Ethernet 0/0

//配置E0/0Ipv4地址

[RT_B-Ethernet0/0]ip add 192.168.1.11 24    

//退出接口视图返回系统视图

[RT_B-Ethernet0/0]quit            

//建立隧道1

[RT_B]interface Tunnel 1                

//设定隧道1v6地址

[RT_B-Tunnel1]ipv6 address 650::2/64     

//设定隧道类型为6to4

[RT_B-Tunnel1]tunnel-protocol ipv6-ipv4   

//设定隧道起始地址接口ip均可

[RT_B-Tunnel1]source Ethernet0/0        

//设定隧道目的地,此处为隧道在源端RT_A的接口E0/0v4地址

[RT_B-Tunnel1]destination 192.168.0.10      

//查看隧道配置结果

[RT_B-Tunnel1]dis th                   

#

interface Tunnel1

 ipv6 address 650::2/64

 tunnel-protocol ipv6-ipv4

 source Ethernet0/0

 destination 192.168.0.10

#

return

[RT_ B -Tunnel1]quit

//RT_Av4静态路由

[RT_ B ]ip route-static 192.168.0.0 255.255.255.0 192.168.1.13 

//配到达对端主机网段的静态路由将下一跳地址指向本地隧道

[RT_B] ipv6 route-static 3FFE:: 64 Tunnel1 

 

RT_C】配置:       //RT_C上全为Ipv4地址,只要保证与RT_A,RT_B联通即可

< RT_C >sys

[RT_C]interface GigabitEthernet 0/0

[RT_C] ip address 192.168.0.12 255.255.255.0

[RT_C]quit

 

[RT_C]interface GigabitEthernet 0/1

[RT_C] ip address 192.168.1.13 255.255.255.0

[RT_C]quit

 

 

3.  配置完成后通过PC_A ping PC_B,显示如下:

 

C:\>ping6  3ffe::213:72ff:fe8e:5225

//PC_B自动获得的v6地址

Pinging 3ffe::213:72ff:fe8e:5225           

from 2001::f571:8207:a392:14e8 with 32 bytes of data:

 

Reply from 3ffe::213:72ff:fe8e:5225: bytes=32 time=3ms

Reply from 3ffe::213:72ff:fe8e:5225: bytes=32 time=3ms

Reply from 3ffe::213:72ff:fe8e:5225: bytes=32 time=3ms

Reply from 3ffe::213:72ff:fe8e:5225: bytes=32 time=3ms

 

Ping statistics for 3ffe::213:72ff:fe8e:5225:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 3ms, Maximum = 3ms, Average = 3ms

1.  至此手动隧道配置完成

 

四、配置关键点

1在隧道两端的路由器上先全局启动IPv6协议

2.做隧道验证前请保证路由器间的v4网络是连通的,及RT_A可以ping

RT_B

3.注意隧道的目的地址均为对端隧道出口的v4地址

4.隧道两端的路由器均有指向对端PC网段的路由,且下一跳都是本地隧道

5.两台PCping通,需要添加指向对方网段的路由。*

X Close
X Close