• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C S12500R系列交换路由器 典型配置举例-Release 36xx系列-6W100

目录

11-IPv6 over IPv4 隧道+OSPFv3功能的典型配置举例

本章节下载 11-IPv6 over IPv4 隧道+OSPFv3功能的典型配置举例  (231.15 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500R/Configure/Typical_Configuration_Example/H3C_S12500R_CE_36xx/202104/1400489_30005_0.htm

11-IPv6 over IPv4 隧道+OSPFv3功能的典型配置举例

H3C S12500R产品 IPv6 over IPv4隧道+OSPFv3功能典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2021 新华三技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。

除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。

本文档中的信息可能变动,恕不另行通知

 



1  简介

本文档介绍了IPv6 over IPv4隧道+OSPFv3功能组合的配置举例。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文假设您已了解IPv6 over IPv4隧道和OSPFv3相关特性。

3  IPv6 over IPv4隧道+OSPFv3功能组合的配置举例

3.1  组网需求

图1所示,某公司总部和分支机构的网络均为IPv6网络,Device A为公司总部网关,Device B和Device C分别为分支机构Branch 1和Branch 2的网关。要求在总部与各分支机构之间建立IPv6手动隧道,通过隧道使总部与各分支机构可以穿越IPv4网络实现互访;同时,配置OSPFv3协议使网关上存在通过Tunnel接口到达目的IPv6地址的转发路由,并实现分支机构与分支机构之间能够通过总部互访。

图1 IPv6 over IPv4隧道+OSPFv3功能组合配置组网图

 

设备

接口

IP地址

设备

接口

IP地址

Device A

HGE1/0/1

20.1.1.1/24

Device B

HGE1/0/1

30.1.1.1/24

 

HGE1/0/2

2001::1/64

 

HGE1/0/2

5001::1/64

 

Tunnel1

3001::1/64

 

Tunnel1

3001::2/64

 

Tunnel2

4001::1/64

 

 

 

Device C

HGE1/0/1

40.1.1.1/24

 

 

 

 

HGE1/0/2

6001::1/64

 

 

 

 

Tunnel2

4001::2/64

 

 

 

 

3.2  使用版本

本举例是在R3606版本上进行配置和验证的。

3.3  配置注意事项

隧道封装后的报文不能根据目的地址和路由表进行第二次三层转发,需要将封装后的报文发送给业务环回组,由业务环回组将报文回送给转发模块后,再进行三层转发。因此,需要创建tunnel类型的业务环回组,以实现隧道报文的接收和发送。

缺省情况下,接口处于ADM(Administratively Down)状态,请根据实际需要在对应接口视图下使用undo shutdown命令开启接口。

3.4  配置步骤

说明

配置之前,请确保网关设备之间IPv4报文路由可达。

 

(1)     配置IPv6 over IPv4隧道

·     配置Device A

# 配置接口HundredGigE1/0/1的IP地址。

<DeviceA> system-view

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] ip address 20.1.1.1 24

[DeviceA-HundredGigE1/0/1] quit

# 请参考以上方法配置图1中Device A其它接口的IP地址,配置步骤这里省略。

# 创建业务环回组1,并配置服务类型为tunnel。

[DeviceA] service-loopback group 1 type tunnel

# 将接口HundredGigE1/0/3加入业务环回组1。

[DeviceA] interface hundredgige 1/0/3

[DeviceA-HundredGigE1/0/3] port link-mode bridge

[DeviceA-HundredGigE1/0/3] port service-loopback group 1

[DeviceA-HundredGigE1/0/3] quit

# 创建模式为IPv6 over IPv4隧道的接口Tunnel1。

[DeviceA] interface tunnel 1 mode ipv6-ipv4

# 配置Tunnel1接口的IPv6地址。

[DeviceA-Tunnel1] ipv6 address 3001::1/64

# 配置Tunnel1接口的源接口为HundredGigE1/0/1(封装后的IPv4报文头中的源IP地址为配置的源接口的IP地址)。

[DeviceA-Tunnel1] source hundredgige 1/0/1

# 配置Tunnel1接口的目的端地址(封装后的IPv4报文头中的目的IP地址为配置的目的端地址)。

[DeviceA-Tunnel1] destination 30.1.1.1

[DeviceA-Tunnel1] quit

# 创建模式为IPv6 over IPv4隧道的接口Tunnel2。

[DeviceA] interface tunnel 2 mode ipv6-ipv4

# 配置Tunnel2接口的IPv6地址。

[DeviceA-Tunnel2] ipv6 address 4001::1/64

# 配置Tunnel2接口的源接口为HundredGigE1/0/1。

[DeviceA-Tunnel2] source hundredgige 1/0/1

# 配置Tunnel2接口的目的端地址。

[DeviceA-Tunnel2] destination 40.1.1.1

[DeviceA-Tunnel2] quit

·     配置Device B

# 配置接口HundredGigE1/0/1的IP地址。

<DeviceB> system-view

[DeviceB] interface hundredgige 1/0/1

[DeviceB-HundredGigE1/0/1] ip address 30.1.1.1 24

[DeviceB-HundredGigE1/0/1] quit

# 请参考以上方法配置图1中Device B其它接口的IP地址,配置步骤这里省略。

# 创建业务环回组1,并配置服务类型为tunnel。

[DeviceB] service-loopback group 1 type tunnel

# 将接口HundredGigE1/0/3加入业务环回组1。

[DeviceB] interface hundredgige 1/0/3

[DeviceB-HundredGigE1/0/3] port link-mode bridge

[DeviceB-HundredGigE1/0/3] port service-loopback group 1

[DeviceB-HundredGigE1/0/3] quit

# 创建模式为IPv6 over IPv4隧道的接口Tunnel1。

[DeviceB] interface tunnel 1 mode ipv6-ipv4

# 配置Tunnel1接口的IPv6地址。

[DeviceB-Tunnel1] ipv6 address 3001::2/64

# 配置Tunnel1接口的源接口为HundredGigE1/0/1(封装后的IPv4报文头中的源IP地址为配置的源接口的IP地址)。

[DeviceB-Tunnel1] source hundredgige 1/0/1

# 配置Tunnel1接口的目的端地址(封装后的IPv4报文头中的目的IP地址为配置的目的端地址)。

[DeviceB-Tunnel1] destination 20.1.1.1

[DeviceB-Tunnel1] quit

·     配置Device C

# 配置接口HundredGigE1/0/1的IP地址。

<DeviceC> system-view

[DeviceC] interface hundredgige 1/0/1

[DeviceC-HundredGigE1/0/1] ip address 40.1.1.1 24

[DeviceC-HundredGigE1/0/1] quit

# 请参考以上方法配置图1中Device C其它接口的IP地址,配置步骤这里省略。

# 创建业务环回组1,并配置服务类型为tunnel。

[DeviceC] service-loopback group 1 type tunnel

# 将接口HundredGigE1/0/3加入业务环回组1。

[DeviceC] interface hundredgige 1/0/3

[DeviceC-HundredGigE1/0/3] port link-mode bridge

[DeviceC-HundredGigE1/0/3] port service-loopback group 1

[DeviceC-HundredGigE1/0/3] quit

# 创建模式为IPv6 over IPv4隧道的接口Tunnel2。

[DeviceC] interface tunnel 2 mode ipv6-ipv4

# 配置Tunnel2接口的IPv6地址。

[DeviceC-Tunnel2] ipv6 address 4001::2/64

# 配置Tunnel2接口的源接口为HundredGigE1/0/1(封装后的IPv4报文头中的源IP地址为配置的源接口的IP地址)。

[DeviceC-Tunnel2] source hundredgige 1/0/1

# 配置Tunnel1接口的目的端地址(封装后的IPv4报文头中的目的IP地址为配置的目的端地址)。

[DeviceC-Tunnel2] destination 20.1.1.1

[DeviceC-Tunnel2] quit

(2)     配置OSPFv3

·     配置Device A

# 配置Device A的Router ID为1.1.1.1。

[DeviceA] ospfv3

[DeviceA-ospfv3-1] router-id 1.1.1.1

[DeviceA-ospfv3-1] quit

# 在Tunnel1上开启OSPFv3

[DeviceA] interface Tunnel 1

[DeviceA-Tunnel1] ospfv3 1 area 0

[DeviceA-Tunnel1] quit

# 在Tunnel2上开启OSPFv3

[DeviceA] interface Tunnel 2

[DeviceA-Tunnel2] ospfv3 1 area 0

[DeviceA-Tunnel2] quit

# 在HundredGigE1/0/2上开启OSPFv3

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] ospfv3 1 area 0

[DeviceA-HundredGigE1/0/2] quit

·     配置Device B

# 配置Device B的Router ID为2.2.2.2。

[DeviceB] ospfv3

[DeviceB-ospfv3-1] router-id 2.2.2.2

[DeviceB-ospfv3-1] quit

# 在Tunnel1上开启OSPFv3

[DeviceB] interface Tunnel 1

[DeviceB-Tunnel1] ospfv3 1 area 0

[DeviceB-Tunnel1] quit

# 在接口HundredGigE1/0/2上开启OSPFv3

[DeviceB] interface hundredgige 1/0/2

[DeviceB-HundredGigE1/0/2] ospfv3 1 area 0

[DeviceB-HundredGigE1/0/2] quit

·     配置Device C

# 配置Device C的Router ID为3.3.3.3。

[DeviceC] ospfv3

[DeviceC-ospfv3-1] router-id 3.3.3.3

[DeviceC-ospfv3-1] quit

# 在Tunnel2上开启OSPFv3

[DeviceC] interface Tunnel 2

[DeviceC-Tunnel2] ospfv3 1 area 0

[DeviceC-Tunnel2] quit

# 在接口HundredGigE1/0/2上开启OSPFv3

[DeviceC] interface hundredgige 1/0/2

[DeviceC-HundredGigE1/0/2] ospfv3 1 area 0

[DeviceC-HundredGigE1/0/2] quit

3.5  验证配置

# 从PC2上可以ping通PC1。

D:\>ping6 -s 5001::3 2001::3

 

Pinging 2001::3

from 5001::3 with 32 bytes of data:

 

Reply from 2001::3: bytes=32 time=13ms

Reply from 2001::3: bytes=32 time=1ms

Reply from 2001::3: bytes=32 time=1ms

Reply from 2001::3: bytes=32 time<1ms

 

Ping statistics for 2001::3:

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

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 13ms, Average = 3ms

# 从PC2上可以ping通PC3。

D:\>ping6 -s 5001::3 6001::3

 

Pinging 6001::3

from 6001::3 with 32 bytes of data:

 

Reply from 6001::3: bytes=32 time=13ms

Reply from 6001::3: bytes=32 time=1ms

Reply from 6001::3: bytes=32 time=1ms

Reply from 6001::3: bytes=32 time<1ms

 

Ping statistics for 6001::3:

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

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 13ms, Average = 3ms

3.6  配置文件

·     Device A

#

 service-loopback group 1 type tunnel

#

ospfv3 1

 router-id 1.1.1.1

 area 0.0.0.0

#

interface HundredGigE1/0/1

 ip address 20.1.1.1 255.255.255.0

#

interface HundredGigE1/0/2

 ospfv3 1 area 0.0.0.0

 ipv6 address 2001::1/64

#

interface HundredGigE1/0/3

 port link-mode bridge

 port service-loopback group 1

#

interface Tunnel1 mode ipv6-ipv4

 ospfv3 1 area 0.0.0.0

 source HundredGigE1/0/1

 destination 30.1.1.1

 ipv6 address 3001::1/64

#

interface Tunnel2 mode ipv6-ipv4

 ospfv3 1 area 0.0.0.0

 source HundredGigE1/0/1

 destination 40.1.1.1

 ipv6 address 4001::1/64

#

·     Device B

#

 service-loopback group 1 type tunnel

#

ospfv3 1

 router-id 2.2.2.2

 area 0.0.0.0

#

interface HundredGigE1/0/1

 ip address 30.1.1.1 255.255.255.0

#

interface HundredGigE1/0/2

 ospfv3 1 area 0.0.0.0

 ipv6 address 5001::1/64

#

interface HundredGigE1/0/3

 port link-mode bridge

 port service-loopback group 1

#

interface Tunnel1 mode ipv6-ipv4

 ospfv3 1 area 0.0.0.0

 source HundredGigE1/0/1

 destination 20.1.1.1

 ipv6 address 3001::2/64

#

·     Device C

#

 service-loopback group 1 type tunnel

#

ospfv3 1

 router-id 3.3.3.3

 area 0.0.0.0

#

interface HundredGigE1/0/1

 ip address 40.1.1.1 255.255.255.0

#

interface HundredGigE1/0/2

 ospfv3 1 area 0.0.0.0

 ipv6 address 6001::1/64

#

interface HundredGigE1/0/3

 port link-mode bridge

 port service-loopback group 1

#

interface Tunnel2 mode ipv6-ipv4

 ospfv3 1 area 0.0.0.0

 source HundredGigE1/0/1

 destination 20.1.1.1

 ipv6 address 4001::2/64

#

4  相关资料

·     H3C S12500R系列交换路由器 三层技术-IP业务配置指导-R3606

·     H3C S12500R系列交换路由器 三层技术-IP业务命令参考-R3606

·     H3C S12500R系列交换路由器 三层技术-IP路由配置指导-R3606

·     H3C S12500R系列交换路由器 三层技术-IP路由命令参考-R3606

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们