04-MSR系列路由器6to4中继及ISATAP隧道功能配置举例
本章节下载: 04-MSR系列路由器6to4中继及ISATAP隧道功能配置举例 (151.72 KB)
MSR系列路由器6to4中继及ISATAP隧道功能配置举例
Copyright © 2014杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
目 录
本文档介绍了通过6to4中继实现6to4网络和其它IPv6网络的通信的功能及ISATAP隧道实现IPv4网络中的IPv6主机和IPv6网络的通信功能的配置举例。
本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解6to4中继和ISATAP隧道的特性。
如图1所示,Router B为6to4路由器,其IPv6侧的网络使用6to4地址。Router A作为6to4中继路由器和ISATAP路由器,它和IPv6网络相连。Host C侧IPv4网络中分布着一些IPv6主机,要求在Router A和Router B之间配置6to4隧道,使得Host A与Host B互通;Host C通过ISATAP隧道接入到IPv6网络。
图1 MSR路由器6to4中继及ISATAP隧道功能配置组网图
· 在Router B上配置一条静态路由,下一跳地址指向Router A的6to4地址,这样,所有去往IPv6网络的报文都会被转发到Router A,之后再由Router A转发到IPv6网络中,从而实现6to4网络与IPv6网络的互通。
· 通过配置ISATAP隧道将IPv4网络中的IPv6主机接入IPv6网络
本举例是在Release 2317版本上进行配置和验证的。
· Router A的ISATAP隧道需要取消ND路由器通告的抑制。
· Router B要配置2条静态路由,一条6to4静态路由,另一条是访问其他IPv6站点的,下一跳是Router A的6to4隧道地址。
# 使能IPv6转发功能。
<RouterB> system-view
[RouterB] ipv6
# 配置接口Ethernet1/2的地址。
[RouterB] interface ethernet 1/2
[RouterB-Ethernet1/2] ip address 2.1.1.1 255.255.255.0
[RouterB-Ethernet1/2] quit
# 配置接口Ethernet1/1的地址。
[RouterB] interface ethernet 1/1
[RouterB-Ethernet1/1] ipv6 address 2002:0201:0101:1::1/64
[RouterB-Ethernet1/1] quit
# 配置6to4隧道。
[RouterB] interface tunnel 0
[RouterB-Tunnel0] ipv6 address 2002:0201:0101::1/64
[RouterB-Tunnel0] source ethernet 1/2
[RouterB-Tunnel0] tunnel-protocol ipv6-ipv4 6to4
[RouterB-Tunnel0] quit
# 配置到6to4中继的静态路由。
[RouterB] ipv6 route-static 2002:0601:0101:: 64 tunnel 0
# 配置到纯IPv6网络的缺省路由。
[RouterB] ipv6 route-static :: 0 2002:0601:0101::1
# 使能IPv6转发功能。
<RouterA> system-view
[RouterA] ipv6
# 配置接口Ethernet1/2的地址。
[RouterA] interface ethernet 1/2
[RouterA-Ethernet1/2] ip address 6.1.1.1 255.255.255.0
[RouterA-Ethernet1/2] quit
# 配置接口Ethernet1/0的地址。
[RouterA] interface ethernet 1/0
[RouterA-Ethernet1/0] ipv6 address 2001::1/64
[RouterA-Ethernet1/0] quit
# 配置接口Ethernet1/1的地址。
[RouterA] interface ethernet 1/1
[RouterA-Ethernet1/1] ip address 1.1.1.1 255.0.0.0
[RouterA-Ethernet1/1] quit
# 配置6to4隧道。
[RouterA] interface tunnel 0
[RouterA-Tunnel0] ipv6 address 2002:0601:0101::1/64
[RouterA-Tunnel0] source ethernet 1/2
[RouterA-Tunnel0] tunnel-protocol ipv6-ipv4 6to4
[RouterA-Tunnel0] quit
# 配置到目的地址2002::/16,下一跳为Tunnel接口的静态路由。
[RouterA] ipv6 route-static 2002:: 16 tunnel 0
# 配置ISATAP隧道。
[RouterA] interface tunnel 1
[RouterA-Tunnel1] ipv6 address 2001::5efe:0101:0101 64
[RouterA-Tunnel1] source ethernet 1/1
[RouterA-Tunnel1] tunnel-protocol ipv6-ipv4 isatap
# 取消对RA消息发布的抑制,使主机可以通过路由器发布的RA消息获取地址前缀等信息。
[RouterA-Tunnel1] undo ipv6 nd ra halt
[RouterA-Tunnel1] quit
# 配置到ISATAP主机的静态路由。
[RouterA] ipv6 route-static 2001:: 16 tunnel 1
# 可以通过如下显示,查看6to4隧道接口状态。
<RouterB> display ipv6 interface tunnel 0
Tunnel0 current state :UP
Line protocol current state :UP
IPv6 is enabled, link-local address is FE80::201:101
Global unicast address(es):
2002:201:101::1, subnet is 2002:201:101::/64
Joined group address(es):
FF02::1:FF01:101
FF02::1:FF00:1
FF02::1:FF00:0
FF02::2
FF02::1
MTU is 1480 bytes
ND reachable time is 30000 milliseconds
ND retransmit interval is 1000 milliseconds
Hosts use stateless autoconfig for addresses
IPv6 Packet statistics:
InReceives: 0
InTooShorts: 0
InTruncatedPkts: 0
InHopLimitExceeds: 0
InBadHeaders: 0
InBadOptions: 0
ReasmReqds: 0
ReasmOKs: 0
InFragDrops: 0
InFragTimeouts: 0
OutFragFails: 0
InUnknownProtos: 0
InDelivers: 0
OutRequests: 0
OutForwDatagrams: 0
InNoRoutes: 0
InTooBigErrors: 0
OutFragOKs: 0
OutFragCreates: 0
InMcastPkts: 0
InMcastNotMembers: 0
OutMcastPkts: 0
InAddrErrors: 0
InDiscards: 0
OutDiscards: 0
# Host A可以ping通Host B,说明6to4隧道建立成功。
C:\>ping6 -s 2002:201:101:1::2 2001::2
Pinging 2001::2
from 2002:201:101:1::2 with 32 bytes of data:
Reply from 2001::2: bytes=32 time=13ms
Reply from 2001::2: bytes=32 time=1ms
Reply from 2001::2: bytes=32 time=1ms
Reply from 2001::2: bytes=32 time<1ms
Ping statistics for 2001::2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 13ms, Average = 3ms
# Host C可以ping通tunnel1接口IPv6地址,表明ISATAP隧道已经成功建立。
C:\>ping 2001::5efe:1.1.1.1
Pinging 2001::5efe:1.1.1.1 with 32 bytes of data:
Reply from 2001::5efe:1.1.1.1: time=1ms
Reply from 2001::5efe:1.1.1.1: time=1ms
Reply from 2001::5efe:1.1.1.1: time=1ms
Reply from 2001::5efe:1.1.1.1: time=1ms
Ping statistics for 2001::5efe:1.1.1.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
· Router B:
#
ipv6
#
interface Ethernet1/2
port link-mode route
ip address 2.1.1.1 255.255.255.0
#
interface Ethernet1/1
port link-mode route
ipv6 address 2002:201:101:1::1/64
#
interface Tunnel0
ipv6 address 2002:201:101::1/64
tunnel-protocol ipv6-ipv4 6to4
source Ethernet1/2
#
ipv6 route-static :: 0 2002:601:101::1
ipv6 route-static 2002:601:101:: 64 Tunnel0
#
· Router A:
#
ipv6
#
interface Ethernet1/1
port link-mode route
ip address 1.1.1.1 255.0.0.0
#
interface Ethernet1/2
ip address 6.1.1.1 255.255.255.0
#
interface Ethernet1/0
[RouterA-Ethernet1/0] ipv6 address 2001::1/64
#
interface Tunnel0
ipv6 address 2002:601:101::1/64
tunnel-protocol ipv6-ipv4 6to4
source Ethernet1/2
#
interface Tunnel1
undo ipv6 nd ra halt
ipv6 address 2001::5EFE:101:101/64
tunnel-protocol ipv6-ipv4 isatap
source Ethernet1/1
#
ipv6 route-static 2001:: 16 Tunnel1
ipv6 route-static 2002:: 16 Tunnel0
· H3C MSR 系列路由器 命令参考(V5)-R2311
· H3C MSR 系列路由器 配置指导(V5)-R2311
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!