H3C_S7500E_IPv6_over_IPv4_GRE隧道典型配置举例

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
3 配ห้องสมุดไป่ตู้举例
3.1 组网需求
如 图 1 所示,Device A、Device B、Device C之间通过IPv4 网络互连。Device A和Device B分别 连接IPv6 主机PC A和PC B。 要求通过在边界的双栈设备(Device A、Device B)之间建立 GRE 隧道,实现两台 IPv6 主机 PC A 和 PC B 的通信。 图1 IPv6 over IPv4 GRE 隧道配置组网图
3.1 组网需求 ··············································································································································· 1 3.2 配置思路 ··············································································································································· 1 3.3 使用版本 ··············································································································································· 2 3.4 配置注意事项········································································································································ 2 3.5 配置步骤 ··············································································································································· 2
# 配置从 Device A 经过 Tunnel0 接口到 PC B 的静态路由。
[DeviceA] ipv6 route-static 2001:: 64 tunnel 0
# 配置从 DeviceA 到达隧道目的端的静态路由。
2
[DeviceA] ip route-static 131.108.5.2 255.255.255.0 192.13.2.1
• 对于 GRE 隧道,必须确保隧道源端和目的端之间 IPv4 路由可达,因此需要在 Device A 和 Device B 上分别配置到对端的静态路由。
3.3 使用版本
本举例是在 S7500E-CMW710-R7150 版本上进行配置和验证的。
3.4 配置注意事项
Tunnel 两端必须都配置隧道的源端地址和目的端地址,且本端配置的源端地址应该与对端配置的目 的端地址相同、本端配置的目的端地址应该与对端配置的源端地址相同。
# 创建业务环回组 1,并配置服务类型为 tunnel。
[DeviceA] service-loopback group 1 type tunnel
# 将接口 GigabitEthernet3/0/2 加入业务环回组 1。
[DeviceA] interface gigabitethernet 3/0/2 [DeviceA-GigabitEthernet3/0/2] port service-loopback group 1 [DeviceA-GigabitEthernet3/0/2] quit
# 配置从 DeviceB 经过 Tunnel0 接口到 PC A 的静态路由。
[DeviceB] ipv6 route-static 1001:: 64 Tunnel 0
# 配置 DeviceB 到达隧道目的端的静态路由。
[DeviceB-Tunnel0] ipv6 address 3001::2 64
# 配置 Tunnel0 接口的源端地址。
[DeviceB-Tunnel0] source 131.108.5.2
# 配置 Tunnel0 接口的目的端地址。
[DeviceB-Tunnel0] destination 192.13.2.2 [DeviceB-Tunnel0] quit
# 请参考以上方法配置上图中 Device A 其它接口的 IP 地址,配置步骤这里省略。 # 创建隧道接口 Tunnel0,并指定隧道模式为 GRE over IPv4 隧道。
[DeviceA] interface tunnel 0 mode gre
# 配置 Tunnel0 接口的 IPv6 地址。
# 请参考以上方法配置上图中 Device B 其它接口的 IP 地址,配置步骤这里省略。 # 创建隧道接口 Tunnel0,并指定隧道模式为 GRE over IPv4 隧道。
[DeviceB] interface tunnel 0 mode gre
# 配置 Tunnel0 接口的 IPv6 地址。
3.2 配置思路
• 为实现两台 IPv6 主机 PC A 和 PC B 的通信,需要将 GRE 隧道模式为 GRE over IPv4,隧道 接口配置为 IPv6 地址;
1
• 为了使 PC A 发往 PC B 的报文经由 GRE 隧道进行转发,需要在边界设备 Device A 上建立 Tunnel 转发的路由表项:目的地址是未进行 GRE 封装的报文的目的地址(即 PC B 的 IPv6 地址),下一跳是 GRE 隧道对端 Device B 的 Tunnel 接口地址或者直接指定出接口为 GRE 隧 道接口。该路由表项可以通过配置静态路由来建立,也可以在 Tunnel 接口上和与 PC A 相连 的三层接口上分别使能动态路由协议,由动态路由协议来建立。本例中选择配置静态路由方 式。同理,Device B 上也需进行相应配置;
i
1 简介
本文档介绍了 IPv6 over IPv4 GRE 隧道的典型配置举例。
2 配置前提
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺 省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置 不冲突。 本文假设您已了解 IPv6 over IPv4 GRE 隧道的相关特性。
H3C S7500E IPv6 over IPv4 GRE 隧道典型配 置举例
Copyright © 2015 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。
3.5.1 配置Device A ····························································································································· 2 3.5.2 配置Device B ····························································································································· 3 3.5.3 配置Device C····························································································································· 3 3.6 验证配置 ··············································································································································· 4 3.7 配置文件 ··············································································································································· 4 4 相关资料 ··············································································································································· 6
3.5 配置步骤
3.5.1 配置Device A
# 配置接口 Vlan-interface 10 的 IP 地址。
<DeviceA> system-view [DeviceA] vlan 10 [DeviceA-vlan 10] port gigabitethernet2/0/1 [DeviceA-vlan 10] quit [DeviceA] interface vlan-interface 10 [DeviceA-Vlan-interface10] ip address 192.13.2.2 24 [DeviceA-Vlan-interface10] quit
[DeviceA-Tunnel0] ipv6 address 3001::1 64
# 配置 Tunnel0 接口的源端地址。
[DeviceA-Tunnel0] source 192.13.2.2
# 配置 Tunnel0 接口的目的端地址。
[DeviceA-Tunnel0] destination 131.108.5.2 [DeviceA-Tunnel0] quit
目录
1 简介 ······················································································································································ 1 2 配置前提 ··············································································································································· 1 3 配置举例 ··············································································································································· 1
3.5.2 配置Device B
# 配置接口 Vlan-interface 11 的 IP 地址。
<DeviceB> system-view [DeviceB] vlan 11 [DeviceB-vlan 11] port gigabitethernet2/0/2 [DeviceB-vlan 11] quit [DeviceB] interface vlan-interface 11 [DeviceB-Vlan-interface11] ip address 131.108.5.2 24 [DeviceB-Vlan-interface11] quit
相关文档
最新文档