• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

H3C 园区盒式交换机典型配置举例-6W105

目录

13-IPv6手动隧道+OSPFv3功能的典型配置举例

本章节下载 13-IPv6手动隧道+OSPFv3功能的典型配置举例  (242.24 KB)

13-IPv6手动隧道+OSPFv3功能的典型配置举例


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 over IPv4隧道,通过隧道使总部与各分支机构可以穿越IPv4网络实现互访;同时,配置OSPFv3协议使网关上存在通过Tunnel接口到达目的IPv6地址的转发路由,并实现分支机构与分支机构之间能够通过总部互访。

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

 

设备

接口

IP地址

设备

接口

IP地址

Device A

Vlan-int10

20.1.1.1/24

Device B

Vlan-int10

30.1.1.1/24

 

Vlan-int20

2001::1/64

 

Vlan-int20

5001::1/64

 

Tunnel1

3001::1/64

 

Tunnel1

3001::2/64

 

Tunnel2

4001::1/64

 

 

 

Device C

Vlan-int10

40.1.1.1/24

 

 

 

 

Vlan-int20

6001::1/64

 

 

 

 

Tunnel2

4001::2/64

 

 

 

 

3.2  适用产品及版本

表1 适用产品及版本

产品

软件版本

S6812系列

S6813系列

Release 6615Pxx系列、Release 6628Pxx系列

S6550XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S6525XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S5850系列

Release 8005及以上版本、Release 8106Pxx

S5570S-EI系列

Release 11xx

S5560X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5560X-HI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5500V2-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30F

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30C

MS4520V2-54C

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-28S

MS4520V2-24TP

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5000-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4600系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

ES5500系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5500V3-24P-SI

S5500V3-48P-SI

Release 63xx系列

S5500V3-SI系列(除S5500V3-24P-SI、S5500V3-48P-SI)

Release 11xx

S5170-EI系列

不支持

S5130S-HI系列

S5130S-EI[-R]系列

S5130S-SI系列

S5130S-LI系列

不支持

S5120V2-SI系列

S5120V2-LI系列

不支持

S5120V3-EI系列

不支持

S5120V3-36F-SI

S5120V3-28P-HPWR-SI

S5120V3-54P-PWR-SI

不支持

S5120V3-SI系列(除S5120V3-36F-SI、S5120V3-28P-HPWR-SI、S5120V3-54P-PWR-SI)

不支持

S5120V3-LI系列

不支持

S3600V3-EI系列

不支持

S3600V3-SI系列

不支持

S3100V3-EI系列

S3100V3-SI系列

不支持

S5110V2系列

不支持

S5110V2-SI系列

不支持

S5000V3-EI系列

S5000V5-EI系列

不支持

S5000E-X系列

S5000X-EI系列

不支持

E128C

E152C

E500C系列

E500D系列

不支持

MS4320V2系列

MS4320V3系列

MS4300V2系列

MS4320系列

MS4200系列

不支持

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

不支持

WAS6000系列

不支持

IE4300-12P-AC & IE4300-12P-PWR

IE4300-M系列

IE4320系列

不支持

IE4520系列

Release 66xx系列

S5135S-EI

不支持

 

3.3  配置步骤

说明

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

 

(1)     配置IPv6 over IPv4隧道

·     配置Device A

# 配置接口Vlan-interface10的IP地址。

<DeviceA> system-view

[DeviceA] vlan 10

[DeviceA-vlan10] port GigabitEthernet 1/0/1

[DeviceA-vlan10] quit

[DeviceA] interface vlan-interface 10

[DeviceA-Vlan-interface10] ip address 20.1.1.1 24

[DeviceA-Vlan-interface10] quit

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

# 创建业务环回组1,配置服务类型为tunnel,将接口GigabitEthernet1/0/3加入业务环回组1。(对于S6550XE-HI、S6525XE-HI、S5850和IE4520系列交换机,为实现隧道报文的接收和发送需要创建tunnel类型的业务环回组)

[DeviceA] service-loopback group 1 type tunnel

[DeviceA] interface gigabitethernet 1/0/3

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

[DeviceA-GigabitEthernet1/0/3] quit

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

[DeviceA] interface tunnel 1 mode ipv6-ipv4

# 配置Tunnel1接口的IPv6地址。

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

# 配置Tunnel1接口的源接口为Vlan-interface10(封装后的IPv4报文头中的源IP地址为配置的源接口的IP地址)。

[DeviceA-Tunnel1] source vlan-interface 10

# 配置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接口的源接口为Vlan-interface10。

[DeviceA-Tunnel2] source Vlan-interface 10

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

[DeviceA-Tunnel2] destination 40.1.1.1

[DeviceA-Tunnel2] quit

·     配置Device B

# 配置接口Vlan-interface10的IP地址。

<DeviceB> system-view

[DeviceB] vlan 10

[DeviceB-vlan10] port GigabitEthernet 1/0/1

[DeviceB-vlan10] quit

[DeviceB] interface vlan-interface 10

[DeviceB-Vlan-interface10] ip address 30.1.1.1 24

[DeviceB-Vlan-interface10] quit

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

# 创建业务环回组1,配置服务类型为tunnel,将接口GigabitEthernet1/0/3加入业务环回组1。(对于S6550XE-HI、S6525XE-HI、S5850和IE4520系列交换机,为实现隧道报文的接收和发送需要创建tunnel类型的业务环回组)

[DeviceB] service-loopback group 1 type tunnel

[DeviceB] interface gigabitethernet 1/0/3

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

[DeviceB-GigabitEthernet1/0/3] quit

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

[DeviceB] interface tunnel 1 mode ipv6-ipv4

# 配置Tunnel1接口的IPv6地址。

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

# 配置Tunnel1接口的源接口为Vlan-interface10(封装后的IPv4报文头中的源IP地址为配置的源接口的IP地址)。

[DeviceB-Tunnel1] source vlan-interface 10

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

[DeviceB-Tunnel1] destination 20.1.1.1

[DeviceB-Tunnel1] quit

·     配置Device C

# 配置接口Vlan-interface10的IP地址。

<DeviceC> system-view

[DeviceC] vlan 10

[DeviceC-vlan10] port GigabitEthernet 1/0/1

[DeviceC-vlan10] quit

[DeviceC] interface vlan-interface 10

[DeviceC-Vlan-interface10] ip address 40.1.1.1 24

[DeviceC-Vlan-interface10] quit

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

# 创建业务环回组1,配置服务类型为tunnel,将接口GigabitEthernet1/0/3加入业务环回组1。(对于S6550XE-HI、S6525XE-HI和S5850系列交换机,为实现隧道报文的接收和发送需要创建tunnel类型的业务环回组)

[DeviceC] service-loopback group 1 type tunnel

[DeviceC] interface gigabitethernet 1/0/3

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

[DeviceC-GigabitEthernet1/0/3] quit

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

[DeviceC] interface tunnel 2 mode ipv6-ipv4

# 配置Tunnel2接口的IPv6地址。

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

# 配置Tunnel2接口的源接口为Vlan-interface10(封装后的IPv4报文头中的源IP地址为配置的源接口的IP地址)。

[DeviceC-Tunnel2] source vlan-interface 10

# 配置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

# 在Vlan-interface20上开启OSPFv3

[DeviceA] interface vlan-interface 20

[DeviceA-Vlan-interface20] ospfv3 1 area 0

[DeviceA-Vlan-interface20] 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

# 在Vlan-interface20上开启OSPFv3

[DeviceB] interface vlan-interface 20

[DeviceB-Vlan-interface20] ospfv3 1 area 0

[DeviceB-Vlan-interface20] 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

# 在Vlan-interface20上开启OSPFv3

[DeviceC] interface vlan-interface 20

[DeviceC-Vlan-interface20] ospfv3 1 area 0

[DeviceC-Vlan-interface20] quit

3.4  验证配置

# 从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.5  配置文件

说明

部分交换机的配置文件中会显示port link-mode bridge命令,请以实际情况为准。

 

·     Device A

#                                                                              

 service-loopback group 1 type tunnel  

#

ospfv3 1

 router-id 1.1.1.1

 area 0.0.0.0

#

vlan 10

#

vlan 20

#

interface Vlan-interface10

 ip address 20.1.1.1 255.255.255.0

#

interface Vlan-interface20

 ospfv3 1 area 0.0.0.0

 ipv6 address 2001::1/64

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#                                                                              

interface GigabitEthernet1/0/3                                                  

 port link-mode bridge                                                         

 port service-loopback group 1                                                 

#

interface Tunnel1 mode ipv6-ipv4

 ospfv3 1 area 0.0.0.0

 source Vlan-interface10

 destination 30.1.1.1

 ipv6 address 3001::1/64

#

interface Tunnel2 mode ipv6-ipv4

 ospfv3 1 area 0.0.0.0

 source Vlan-interface10

 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

#

vlan 10

#

vlan 20

#

interface Vlan-interface10

 ip address 30.1.1.1 255.255.255.0

#

interface Vlan-interface20

 ospfv3 1 area 0.0.0.0

 ipv6 address 5001::1/64

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#                                                                              

interface GigabitEthernet1/0/3                                                  

 port link-mode bridge                                                          

 port service-loopback group 1                                                 

#

interface Tunnel1 mode ipv6-ipv4

 ospfv3 1 area 0.0.0.0

 source Vlan-interface10

 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

#

vlan 10

#

vlan 20

#

interface Vlan-interface10

 ip address 40.1.1.1 255.255.255.0

#

interface Vlan-interface20

 ospfv3 1 area 0.0.0.0

 ipv6 address 6001::1/64

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#                                                                              

interface GigabitEthernet1/0/3                                                  

 port link-mode bridge                                                         

 port service-loopback group 1                                                 

#

interface Tunnel2 mode ipv6-ipv4

 ospfv3 1 area 0.0.0.0

 source Vlan-interface10

 destination 20.1.1.1

 ipv6 address 4001::2/64

#

 

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

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

新华三官网
联系我们