配置6to4中继示例
配置6to4中继示例
组网需求
如图1所示,RouterA为6to4Router,其IPv6侧连接的是6to4网络。RouterB为6to4中继Router,它和IPv6的Internet网络(2001::/64)相连。RouterA和RouterB通过IPv4骨干网络相连。客户希望在配置RouterA和RouterB之间的6to4隧道,使6to4网络的主机与IPv6网络的主机互通。
配置思路
配置6to4中继思路如下:
在Router上配置IPv4/IPv6双协议栈,使路由器可以同时和IPv4网络以及IPv6网络互通
在Router上配置6to4隧道,使IPv6网络能够通过IPv4骨干网进行互联。
在Router上配置相关的静态路由,使RouterA能够和RouterB通过IPv4网络进行互联。
操作步骤
配置RouterA
# 配置IPv4/IPv6双协议栈。
<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] ipv6
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] ip address 2.1.1.1 255.0.0.0
[RouterA-GigabitEthernet1/0/0] quit
[RouterA] interface gigabitethernet 2/0/0
[RouterA-GigabitEthernet2/0/0] ipv6 enable
[RouterA-GigabitEthernet2/0/0] ipv6 address 2002:0201:0101:1::1/64
[RouterA-GigabitEthernet2/0/0] quit
# 配置6to4隧道。
[RouterA] interface tunnel 0/0/1
[RouterA-Tunnel0/0/1] tunnel-protocol ipv6-ipv4 6to4
[RouterA-Tunnel0/0/1] ipv6 enable
[RouterA-Tunnel0/0/1] ipv6 address 2002:0201:0101::1/64
[RouterA-Tunnel0/0/1] source gigabitethernet 1/0/0
[RouterA-Tunnel0/0/1] quit
# 配置到2002::/16的静态路由。
[RouterA] ipv6 route-static 2002:: 16 tunnel 0/0/1
# 配置到IPv6网络的缺省路由。
[RouterA] ipv6 route-static :: 0 2002:0201:0102::1
配置RouterB
# 配置IPv4/IPv6双协议栈。
<Huawei> system-view
[Huawei] sysname RouterB
[RouterB] ipv6
[RouterB] interface gigabitethernet 1/0/0
[RouterB-GigabitEthernet1/0/0] ip address 2.1.1.2 255.0.0.0
[RouterB-GigabitEthernet1/0/0] quit
[RouterB] interface gigabitethernet 2/0/0
[RouterB-GigabitEthernet2/0/0] ipv6 enable
[RouterB-GigabitEthernet2/0/0] ipv6 address 2001::1/64
[RouterB-GigabitEthernet2/0/0] quit
# 配置6to4隧道。
[RouterB] interface tunnel 0/0/1
[RouterB-Tunnel0/0/1] tunnel-protocol ipv6-ipv4 6to4
[RouterB-Tunnel0/0/1] ipv6 enable
[RouterB-Tunnel0/0/1] ipv6 address 2002:0201:0102::1/64
[RouterB-Tunnel0/0/1] source gigabitethernet 1/0/0
[RouterB-Tunnel0/0/1] quit
# 配置到2002::/16的静态路由。
[RouterB] ipv6 route-static 2002:: 16 tunnel 0/0/1
验证配置结果
# 从RouterA可以Ping通RouterB的接口GE2/0/0的IPv6地址。
[RouterA] ping ipv6 2001::1
PING 2001::1 : 56 data bytes, press CTRL_C to break
Reply from 2001::1
bytes=56 Sequence=1 hop limit=64 time = 29 ms
Reply from 2001::1
bytes=56 Sequence=2 hop limit=64 time = 5 ms
Reply from 2001::1
bytes=56 Sequence=3 hop limit=64 time = 5 ms
Reply from 2001::1
bytes=56 Sequence=4 hop limit=64 time = 5 ms
Reply from 2001::1
bytes=56 Sequence=5 hop limit=64 time = 26 ms
--- 2001::1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 5/14/29 ms
配置文件
RouterA的配置文件
#
sysname RouterA
#
ipv6
#
interface GigabitEthernet1/0/0
ip address 2.1.1.1 255.0.0.0
#
interface GigabitEthernet2/0/0
ipv6 enable
ipv6 address 2002:201:101:1::1/64
#
interface Tunnel 0/0/1
ipv6 enable
ipv6 address 2002:201:101::1/64
tunnel-protocol ipv6-ipv4 6to4
source GigabitEthernet1/0/0
#
ipv6 route-static :: 0 2002:201:102::1
#
ipv6 route-static 2002:: 16 Tunnel 0/0/1
#
return
RouterB的配置文件
#
sysname RouterB
#
ipv6
#
interface GigabitEthernet1/0/0
ip address 2.1.1.2 255.0.0.0
#
interface GigabitEthernet2/0/0
ipv6 enable
ipv6 address 2001::1/64
#
interface Tunnel 0/0/1
ipv6 enable
ipv6 address 2002:201:102::1/64
tunnel-protocol ipv6-ipv4 6to4
source GigabitEthernet1/0/0
#
ipv6 route-static 2002:: 16 Tunnel 0/0/1
#
return
IPv6(列表、list、全)ipv6list
http://www.zh-cjh.com/wenzhangguilei/1534.html
文章归类、所有文章列表、LISTLIST
http://www.zh-cjh.com/wangzhangonggao/2195.html
2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。
转载请保留出处: www.zh-cjh.com珠海陈坚浩博客 » 配置6to4中继示例
作者: cjh
手机扫一扫,手机上查看此文章: |
一切源于价值!
其他 模板文件不存在: ./template/plugins/comment/pc/index.htm