• 產品與解決方案
  • 行業解決方案
  • 服務
  • 支持
  • 合作夥伴
  • 關於我們

H3C S6800係列以太網交換機 典型配置舉例-Release 26xx係列-6W100

目錄

14-IPv6手動隧道+OSPFv3功能的典型配置舉例

本章節下載 14-IPv6手動隧道+OSPFv3功能的典型配置舉例  (183.28 KB)

14-IPv6手動隧道+OSPFv3功能的典型配置舉例

H3C S6800產品IPv6手動隧道+OSPFv3功能配置舉例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2018bobty下载软件 版權所有,保留一切權利。

非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,

H3C_彩色.emf

 

 



1  簡介

本文檔介紹了IPv6手動隧道+OSPFv3功能組合的配置舉例。

2  配置前提

本文檔中的配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下舉例中的配置不衝突。

本文假設您已了解IPv6手動隧道和OSPFv3相關特性。

3  IPv6手動隧道+OSPFv3功能組合的配置舉例

3.1  組網需求

圖1所示,某公司總部和分支機構的網絡均為IPv6網絡,Device A為公司總部網關,Device B和Device C分別為分支機構Branch 1和Branch 2的網關。要求在總部與各分支機構之間建立IPv6手動隧道,通過隧道使總部與各分支機構可以穿越IPv4網絡實現互訪;同時,配置OSPFv3協議使網關上存在通過Tunnel接口到達目的IPv6地址的轉發路由,並實現分支機構與分支機構之間能夠通過總部互訪。

圖1 IPv6手動隧道+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  使用版本

本舉例是在S6800-CMW710-R2609版本上進行配置和驗證的。

3.3  配置注意事項

隧道封裝後的報文不能根據目的地址和路由表進行第二次三層轉發,需要將封裝後的報文發送給業務環回組,由業務環回組將報文回送給轉發模塊後,再進行三層轉發。因此,需要創建tunnel類型的業務環回組,以實現隧道報文的接收和發送。

3.4  配置步驟

說明

配置之前,請確保網關設備之間IPv4報文路由可達。

 

(1)     配置IPv6手動隧道

·     配置Device A

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

<DeviceA> system-view

[DeviceA] vlan 10

[DeviceA-vlan10] port Ten-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。

[DeviceA] service-loopback group 1 type tunnel

# 將接口Ten-GigabitEthernet1/0/3加入業務環回組1。

[DeviceA] interface Ten-GigabitEthernet 1/0/3

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

[DeviceA-Ten-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 Ten-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。

[DeviceB] service-loopback group 1 type tunnel

# 將接口Ten-GigabitEthernet1/0/3加入業務環回組1。

[DeviceB] interface Ten-GigabitEthernet 1/0/3

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

[DeviceB-Ten-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 Ten-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。

[DeviceC] service-loopback group 1 type tunnel

# 將接口Ten-GigabitEthernet1/0/3加入業務環回組1。

[DeviceC] interface Ten-GigabitEthernet 1/0/3

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

[DeviceC-Ten-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.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

#

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 Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#

interface Ten-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 Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#

interface Ten-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 Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#

interface Ten-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

#

4  相關資料

·     H3C S6800係列以太網交換機 三層技術-IP業務配置指導-Release 26xx係列

·     H3C S6800係列以太網交換機 三層技術-IP業務命令參考-Release 26xx係列

不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!

BOB登陆
官網
聯係我們