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

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

目錄

70-MPLS TE典型配置舉例

本章節下載 70-MPLS TE典型配置舉例  (368.87 KB)

70-MPLS TE典型配置舉例

H3C S6800產品 MPLS TE配置舉例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

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

H3C_彩色.emf

 



1  簡介

本文檔介紹MPLS TE相關典型配置舉例。

2  配置前提

本文檔不嚴格與具體軟、硬件版本對應,如果使用過程中與產品實際情況有差異,請參考相關產品手冊,或以設備實際情況為準。

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

本文檔假設您已了解MPLS TE特性。

3  使用RSVP-TE配置MPLS TE隧道典型配置舉例

3.1  組網需求

企業A和企業B分別有總部和分支機構兩個站點,均通過運營商的MPLS網絡進行互聯。兩企業的分支機構均有重要數據,需要穿越MPLS網絡備份到總部服務器上。企業A的數據流量的最大帶寬為20000kbps,企業B的數據流量的最大帶寬為30000kbps。

在如圖1所示的網絡環境中,每條鏈路的最大帶寬為50000kbps,最大可預留帶寬為40000kbps,可通過部署RSVP-TE服務,自動為兩個用戶分別建立滿足其帶寬需求的MPLS TE隧道。

圖1 使用RSVP-TE配置MPLS TE隧道典型配置舉例組網圖

 

3.2  配置思路

·     為了使用RSVP-TE配置MPLS TE隧道,需要在骨幹網的設備上配置MPLS、MPLS TE和RSVP-TE功能。

·     為了滿足兩個企業用戶同時在運營商MPLS網絡中傳輸數據,並且擁有足夠的隧道帶寬,需要在MPLS TE隧道的Ingress節點上為兩個用戶分別創建Tunnel接口,並指定隧道帶寬。

·     為了保證每條鏈路具有足夠的帶寬和最大可預留帶寬,需要在MPLS TE隧道經過的各個接口上配置鏈路的MPLS TE屬性,指定鏈路最大帶寬和最大可預留帶寬。

·     為了在各個節點上生成TEDB,從而計算出到達某個節點的符合約束條件的最短路徑,需要在骨幹網中配置OSPF支持MPLS TE,以便各個節點通過OSPF路由協議發布鏈路的MPLS TE相關屬性。

·     為了實現使用RSVP-TE分發MPLS TE標簽並建立CRLSP,需要在MPLS TE隧道的Ingress節點上配置通過RSVP-TE自動建立CRLSP。

·     為了使流量沿著MPLS TE隧道轉發,需要在MPLS TE隧道的Ingress節點上配置靜態路由,將流量引入MPLS TE隧道。

3.3  使用版本

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

3.4  配置注意事項

·     對於S6800-54HF、S6800-54HT、S6800-2C-FC,以及產品代碼為LS-6800-32Q-H1、LS-6800-54QF-H1、LS-6800-54QF-H3、LS-6800-54QT-H1、LS-6800-54QT-H3、LS-6800-2C-H1或LS-6800-4C-H1的機型,MPLS與VXLAN共用硬件資源,可用的硬件資源受VXLAN硬件資源模式影響。使用MPLS TE功能時,建議將VXLAN硬件資源模式配置為二層網關模式,此模式可用的硬件資源較多。

·     在采用RSVP-TE動態建立CRLSP時,必須配置IGP的TE擴展(目前支持OSPF TE和ISIS TE),否則,不能形成TEDB(TE DataBase,流量工程數據庫)。在不配置IGP的TE擴展時計算出的路徑是由IGP路由得到的,而不是CSPF(Constraint-based Shortest Path First,基於約束的最短路徑優先)計算出來的。

·     進行本案例配置之前,需要先全局關閉STP功能,或為每個VLAN映射一個MSTP實例,否則可能會阻斷環路中的一條鏈路。

3.5  配置步驟

(1)     配置各接口的IP地址

# 按照圖1配置各接口的IP地址和掩碼,包括LoopBack接口,下麵以Switch A為例,其它設備配置方法類似,具體配置過程略。

<SwitchA> system-view

[SwitchA] vlan 10

[SwitchA-vlan10] port ten-gigabitethernet 1/0/1

[SwitchA-vlan10] quit

[SwitchA] interface vlan-interface 10

[SwitchA-Vlan-interface10] ip address 10.1.1.1 24

[SwitchA] vlan 30

[SwitchA-vlan30] port ten-gigabitethernet 1/0/2

[SwitchA-vlan30] quit

[SwitchA] interface vlan-interface 30

[SwitchA-Vlan-interface30] ip address 30.1.1.1 24

[SwitchA-Vlan-interface30] quit

[SwitchA] vlan 70

[SwitchA-vlan70] port ten-gigabitethernet 1/0/3

[SwitchA-vlan70] quit

[SwitchA] interface vlan-interface 70

[SwitchA-Vlan-interface70] ip address 70.1.1.1 24

[SwitchA] vlan 80

[SwitchA-vlan80] port ten-gigabitethernet 1/0/4

[SwitchA-vlan80] quit

[SwitchA] interface vlan-interface 80

[SwitchA-Vlan-interface80] ip address 80.1.1.1 24

[SwitchA-vlan80] quit

[SwitchA] interface loopback 0

[SwitchA-LoopBack0] ip address 1.1.1.1 32

[SwitchA-LoopBack0] quit

(2)     配置OSPF協議,以保證各交換機之間路由可達

# 配置Switch A。

[SwitchA] ospf

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] quit

# 配置Switch B。

[SwitchB] ospf

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[SwitchB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# 配置Switch C。

[SwitchC] ospf

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

[SwitchC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# 配置Switch D。

[SwitchD] ospf

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0

[SwitchD-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

# 配置完成後,在各交換機上執行display ip routing-table命令,可以看到相互之間都學到了對方的主機路由,包括Loopback接口對應的主機路由。以Switch A為例:

[SwitchA] display ip routing-table

 

Destinations : 26        Routes : 26

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.2.2.2/32          OSPF   10   1            10.1.1.2        Vlan10

3.3.3.3/32          OSPF   10   1            30.1.1.3        Vlan30

4.4.4.4/32          OSPF   10   2            10.1.1.2        Vlan10

8.1.1.0/24          Direct 0    0            8.1.1.1         Tun2

8.1.1.0/32          Direct 0    0            8.1.1.1         Tun2

8.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

8.1.1.255/32        Direct 0    0            8.1.1.1         Tun2

10.1.1.0/24         Direct 0    0            10.1.1.1        Vlan10

10.1.1.0/32         Direct 0    0            10.1.1.1        Vlan10

10.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

10.1.1.255/32       Direct 0    0            10.1.1.1        Vlan10

20.1.1.0/24         OSPF   10   2            10.1.1.2        Vlan10

30.1.1.0/24         Direct 0    0            30.1.1.1        Vlan30

30.1.1.0/32         Direct 0    0            30.1.1.1        Vlan30

30.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

30.1.1.255/32       Direct 0    0            30.1.1.1        Vlan30

40.1.1.0/24         Static 1    0            0.0.0.0         Tun2

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

(3)     配置LSR ID,開啟MPLS、MPLS TE和RSVP-TE能力

# 配置Switch A。

[SwitchA] mpls lsr-id 1.1.1.1

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 10

[SwitchA-Vlan-interface10] mpls enable

[SwitchA-Vlan-interface10] mpls te enable

[SwitchA-Vlan-interface10] rsvp enable

[SwitchA-Vlan-interface10] quit

[SwitchA] interface vlan-interface 30

[SwitchA-Vlan-interface30] mpls enable

[SwitchA-Vlan-interface30] mpls te enable

[SwitchA-Vlan-interface30] rsvp enable

[SwitchA-Vlan-interface30] quit

# 配置Switch B。

[SwitchB] mpls lsr-id 2.2.2.2

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 10

[SwitchB-Vlan-interface10] mpls enable

[SwitchB-Vlan-interface10] mpls te enable

[SwitchB-Vlan-interface10] rsvp enable

[SwitchB-Vlan-interface10] quit

[SwitchB] interface vlan-interface 20

[SwitchB-Vlan-interface20] mpls enable

[SwitchB-Vlan-interface20] mpls te enable

[SwitchB-Vlan-interface20] rsvp enable

[SwitchB-Vlan-interface20] quit

# 配置Switch C。

[SwitchC] mpls lsr-id 3.3.3.3

[SwitchC] mpls te

[SwitchC-te] quit

[SwitchC] rsvp

[SwitchC-rsvp] quit

[SwitchC] interface vlan-interface 30

[SwitchC-Vlan-interface30] mpls enable

[SwitchC-Vlan-interface30] mpls te enable

[SwitchC-Vlan-interface30] rsvp enable

[SwitchC-Vlan-interface30] quit

[SwitchC] interface vlan-interface 40

[SwitchC-Vlan-interface40] mpls enable

[SwitchC-Vlan-interface40] mpls te enable

[SwitchC-Vlan-interface40] rsvp enable

[SwitchC-Vlan-interface40] quit

# 配置Switch D。

[SwitchD] mpls lsr-id 4.4.4.4

[SwitchD] mpls te

[SwitchD-te] quit

[SwitchD] rsvp

[SwitchD-rsvp] quit

[SwitchD] interface vlan-interface 20

[SwitchD-Vlan-interface20] mpls enable

[SwitchD-Vlan-interface20] mpls te enable

[SwitchD-Vlan-interface20] rsvp enable

[SwitchD-Vlan-interface20] quit

[SwitchD] interface vlan-interface 40

[SwitchD-Vlan-interface40] mpls enable

[SwitchD-Vlan-interface40] mpls te enable

[SwitchD-Vlan-interface40] rsvp enable

[SwitchD-Vlan-interface40] quit

(4)     配置鏈路的MPLS TE屬性

# 在Switch A上配置鏈路的最大帶寬和最大可預留帶寬。

[SwitchA] interface vlan-interface 10

[SwitchA-Vlan-interface10] mpls te max-link-bandwidth 50000

[SwitchA-Vlan-interface10] mpls te max-reservable-bandwidth 40000

[SwitchA-Vlan-interface10] quit

[SwitchA] interface vlan-interface 30

[SwitchA-Vlan-interface30] mpls te max-link-bandwidth 50000

[SwitchA-Vlan-interface30] mpls te max-reservable-bandwidth 40000

[SwitchA-Vlan-interface30] quit

# Switch B上配置鏈路的最大帶寬和最大可預留帶寬。

[SwitchB] interface vlan-interface 10

[SwitchB-Vlan-interface10] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface10] mpls te max-reservable-bandwidth 40000

[SwitchB-Vlan-interface10] quit

[SwitchB] interface vlan-interface 20

[SwitchB-Vlan-interface20] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface20] mpls te max-reservable-bandwidth 40000

[SwitchB-Vlan-interface20] quit

# Switch C上配置鏈路的最大帶寬和最大可預留帶寬。

[SwitchC] interface vlan-interface 30

[SwitchC-Vlan-interface30] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface30] mpls te max-reservable-bandwidth 40000

[SwitchC-Vlan-interface30] quit

[SwitchC] interface vlan-interface 40

[SwitchC-Vlan-interface40] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface40] mpls te max-reservable-bandwidth 40000

[SwitchC-Vlan-interface40] quit

# Switch D上配置鏈路的最大帶寬和最大可預留帶寬。

[SwitchD] interface vlan-interface 20

[SwitchD-Vlan-interface20] mpls te max-link-bandwidth 50000

[SwitchD-Vlan-interface20] mpls te max-reservable-bandwidth 40000

[SwitchD-Vlan-interface20] quit

[SwitchD] interface vlan-interface 40

[SwitchD-Vlan-interface40] mpls te max-link-bandwidth 50000

[SwitchD-Vlan-interface40] mpls te max-reservable-bandwidth 40000

[SwitchD-Vlan-interface40] quit

(5)     配置OSPF TE,發布鏈路的MPLS TE屬性

# 在Switch A上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[SwitchA] ospf

[SwitchA-ospf-1] opaque-capability enable

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] mpls te enable

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] quit

# 在Switch B上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[SwitchB] ospf

[SwitchB-ospf-1] opaque-capability enable

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] mpls te enable

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# 在Switch C上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[SwitchC] ospf

[SwitchC-ospf-1] opaque-capability enable

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] mpls te enable

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# 在Switch D上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[SwitchD] ospf

[SwitchD-ospf-1] opaque-capability enable

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] mpls te enable

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

(6)     配置MPLS TE隧道

# 在Switch A上配置MPLS TE隧道Tunnel1,用於傳輸企業A的數據:目的地址為Switch D的LSR ID(4.4.4.4);采用RSVP-TE信令協議建立MPLS TE隧道;隧道所需的帶寬為20000kbps;開啟路由記錄功能。

[SwitchA] interface tunnel 1 mode mpls-te

[SwitchA-Tunnel1] ip address 7.1.1.1 255.255.255.0

[SwitchA-Tunnel1] destination 4.4.4.4

[SwitchA-Tunnel1] mpls te signaling rsvp-te

[SwitchA-Tunnel1] mpls te bandwidth 20000

[SwitchA-Tunnel1] mpls te record-route

[SwitchA-Tunnel1] quit

# Switch A上配置MPLS TE隧道Tunnel2,用於傳輸企業B的數據:目的地址為Switch DLSR ID4.4.4.4);采用RSVP-TE信令協議建立MPLS TE隧道;隧道所需的帶寬為30000kbps;開啟路由記錄功能。

[SwitchA] interface tunnel 2 mode mpls-te

[SwitchA-Tunnel2] ip address 8.1.1.1 255.255.255.0

[SwitchA-Tunnel2] destination 4.4.4.4

[SwitchA-Tunnel2] mpls te signaling rsvp-te

[SwitchA-Tunnel2] mpls te bandwidth 30000

[SwitchA-Tunnel2] mpls te record-route

[SwitchA-Tunnel2] quit

(7)     配置靜態路由使流量沿MPLS TE隧道轉發

# 在Switch A上配置靜態路由,使得到達網絡50.1.1.0/24的流量通過MPLS TE隧道接口Tunnel1轉發。

[SwitchA] ip route-static 50.1.1.0 24 tunnel 1 preference 1

# 在Switch A上配置靜態路由,使得到達網絡60.1.1.0/24的流量通過MPLS TE隧道接口Tunnel2轉發。

[SwitchA] ip route-static 60.1.1.0 24 tunnel 2 preference 1

3.6  驗證配置

# 配置完成後,在Switch A上執行display interface tunnel brief命令可以看到2個隧道接口的狀態為UP。

[SwitchA] display interface tunnel brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun1                 UP   UP       7.1.1.1         Tunnel1 Interface

Tun2                 UP   UP       8.1.1.1         Tunnel2 Interface

# 在Switch A上執行display mpls te tunnel-interface命令可以看到2條隧道的詳細信息。

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 1

Tunnel State           : Up (Main CRLSP up, Shared-resource CRLSP down)

Tunnel Attributes      :

  LSP ID               : 27415           Tunnel ID            : 1

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 4.4.4.4

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : SE

  Tunnel mode          : -

  Reverse-LSP name     : -

  Reverse-LSP LSR ID   : -               Reverse-LSP Tunnel ID: -

  Class Type           : CT0             Tunnel Bandwidth     : 20000 kbps

  Reserved Bandwidth   : 20000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : -

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Enabled         Record Label         : Disabled

  FRR Flag             : Disabled        Bandwidth Protection : Disabled

  Backup Bandwidth Flag: Disabled        Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : No              Auto Created         : No

  Route Pinning        : Disabled

  Retry Limit          : 3               Retry Interval       : 2 sec

  Reoptimization       : Disabled        Reoptimization Freq  : -

  Backup Type          : None            Backup LSP ID        : -

  Auto Bandwidth       : Disabled        Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -

 

Tunnel Name            : Tunnel 2

Tunnel State           : Up (Main CRLSP up, Shared-resource CRLSP down)

Tunnel Attributes      :

  LSP ID               : 27302           Tunnel ID            : 2

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 4.4.4.4

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : SE

  Tunnel mode          : -

  Reverse-LSP name     : -

  Reverse-LSP LSR ID   : -               Reverse-LSP Tunnel ID: -

  Class Type           : CT0             Tunnel Bandwidth     : 30000 kbps

  Reserved Bandwidth   : 30000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : -

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Enabled         Record Label         : Disabled

  FRR Flag             : Disabled        Bandwidth Protection : Disabled

  Backup Bandwidth Flag: Disabled        Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : No              Auto Created         : No

  Route Pinning        : Disabled

  Retry Limit          : 3               Retry Interval       : 2 sec

  Reoptimization       : Disabled        Reoptimization Freq  : -

  Backup Type          : None            Backup LSP ID        : -

  Auto Bandwidth       : Disabled        Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -

# 在Switch A上執行display ip routing-table命令,可以看到路由表中有以Tunnel1和Tunnel2為出接口的靜態路由信息。

[SwitchA] display ip routing-table

 

Destinations : 30        Routes : 31

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.2.2.2/32          OSPF   10   1            10.1.1.2        Vlan10

3.3.3.3/32          OSPF   10   1            30.1.1.3        Vlan30

4.4.4.4/32          OSPF   10   2            10.1.1.2        Vlan10

                                             30.1.1.3        Vlan30

7.1.1.0/24          Direct 0    0            7.1.1.1         Tun1

7.1.1.0/32          Direct 0    0            7.1.1.1         Tun1

7.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

7.1.1.255/32        Direct 0    0            7.1.1.1         Tun1

8.1.1.0/24          Direct 0    0            8.1.1.1         Tun2

8.1.1.0/32          Direct 0    0            8.1.1.1         Tun2

8.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

8.1.1.255/32        Direct 0    0            8.1.1.1         Tun2

10.1.1.0/24         Direct 0    0            10.1.1.1        Vlan10

10.1.1.0/32         Direct 0    0            10.1.1.1        Vlan10

10.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

10.1.1.255/32       Direct 0    0            10.1.1.1        Vlan10

50.1.1.0/24         Static 1    0            0.0.0.0         Tun1

30.1.1.0/24         Direct 0    0            30.1.1.1        Vlan30

30.1.1.0/32         Direct 0    0            30.1.1.1        Vlan30

30.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

30.1.1.255/32       Direct 0    0            30.1.1.1        Vlan30

60.1.1.0/24         Static 1    0            0.0.0.0         Tun2

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

# 在Switch A上執行display rsvp lsp verbose命令,可以看到Tunnel 1的CRLSP使用了Switch A—Switch B—Switch D的路徑;Tunnel 2的CRLSP使用了Switch A—Switch C—Switch D的路徑。

[SwitchA] display rsvp lsp verbose

Tunnel name: Tunnel1

Destination: 4.4.4.4                      Source: 1.1.1.1

Tunnel ID: 1                              LSP ID: 27415

LSR type: Ingress                         Direction: Unidirectional

Setup priority: 7                         Holding priority: 7

In-Label: -                               Out-Label: 1146

In-Interface: -                           Out-Interface: Vlan10

Nexthop: 10.1.1.2                         Exclude-any: 0

Include-Any: 0                            Include-all: 0

Mean rate (CIR): 20000 kbps               Mean burst size (CBS): 1000.00 bytes

Path MTU: 1500                            Class type: CT0

RRO number: 6

  10.1.1.1/32        Flag: 0x00 (No FRR)

  10.1.1.2/32        Flag: 0x00 (No FRR)

  2.2.2.2/32         Flag: 0x20 (No FRR/Node-ID)

  20.1.1.2/32        Flag: 0x00 (No FRR)

  20.1.1.4/32        Flag: 0x00 (No FRR)

  4.4.4.4/32         Flag: 0x20 (No FRR/Node-ID)

Fast Reroute protection: None

 

Tunnel name: Tunnel2

Destination: 4.4.4.4                      Source: 1.1.1.1

Tunnel ID: 2                              LSP ID: 27302

LSR type: Ingress                         Direction: Unidirectional

Setup priority: 7                         Holding priority: 7

In-Label: -                               Out-Label: 1150

In-Interface: -                           Out-Interface: Vlan30

Nexthop: 30.1.1.3                         Exclude-any: 0

Include-Any: 0                            Include-all: 0

Mean rate (CIR): 30000 kbps               Mean burst size (CBS): 1000.00 bytes

Path MTU: 1500                            Class type: CT0

RRO number: 6

  30.1.1.1/32        Flag: 0x00 (No FRR)

  30.1.1.3/32        Flag: 0x00 (No FRR)

  3.3.3.3/32         Flag: 0x20 (No FRR/Node-ID)

  40.1.1.3/32        Flag: 0x00 (No FRR)

  40.1.1.4/32        Flag: 0x00 (No FRR)

  4.4.4.4/32         Flag: 0x20 (No FRR/Node-ID)

Fast Reroute protection: None

經過驗證,可以看到通過部署RSVP-TE服務,自動為兩個用戶分別建立了兩條CRLSP:經過Switch A—Switch B—Switch D的帶寬為20000kbps的CRLSP和經過Switch A—Switch C—Switch D的帶寬為30000kbps的CRLSP。

3.7  配置文件

·     Switch A

#

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 30.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 1.1.1.1

#

vlan 10

#

vlan 30

#

vlan 70

#

vlan 80

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface10

 ip address 10.1.1.1 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Vlan-interface30

 ip address 30.1.1.1 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Vlan-interface70

 ip address 70.1.1.1 255.255.255.0

#

interface Vlan-interface80

 ip address 80.1.1.1 255.255.255.0

#

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 30

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 70

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 port access vlan 80

#

interface Tunnel1 mode mpls-te

 ip address 7.1.1.1 255.255.255.0

 mpls te bandwidth ct0 20000

 mpls te record-route

 destination 4.4.4.4

#

interface Tunnel2 mode mpls-te

 ip address 8.1.1.1 255.255.255.0

 mpls te bandwidth ct0 30000

 mpls te record-route

 destination 4.4.4.4

#

 ip route-static 20.1.1.0 24 Tunnel1 preference 1

 ip route-static 40.1.1.0 24 Tunnel2 preference 1

#

·     Switch B

#

ospf 1

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 20.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 2.2.2.2

#

vlan 10

#

vlan 20

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface10

 ip address 10.1.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Vlan-interface20

 ip address 20.1.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

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

#

·     Switch C

#

ospf 1

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 30.1.1.0 0.0.0.255

  network 40.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 3.3.3.3

#

vlan 30

#

vlan 40

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.0

#

interface Vlan-interface30

 ip address 30.1.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Vlan-interface40

 ip address 40.1.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 40

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 30

#

·     Switch D

#

ospf 1

 area 0.0.0.0

  network 4.4.4.4 0.0.0.0

  network 20.1.1.0 0.0.0.255

  network 40.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 4.4.4.4

#

vlan 20

#

vlan 40

#

#

vlan 50

#

vlan 60

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

interface Vlan-interface20

 ip address 20.1.1.4 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Vlan-interface40

 ip address 40.1.1.4 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Vlan-interface50

 ip address 50.1.1.4 255.255.255.0

#

interface Vlan-interface60

 ip address 60.1.1.4 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 40

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 50

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 port access vlan 60

#

4  MPLS TE轉發鄰接典型配置舉例

4.1  組網需求

圖2所示,各設備之間通過OSPF協議實現互通,各鏈路的度量值已在鏈路中標注。缺省情況下,Device A發往Device D的流量會通過Vlan-interface23轉發。現要求在Device B上創建一條經過Device C到達Device D的MPLS TE隧道,並通過配置MPLS TE轉發鄰接,實現:

·     MPLS TE隧道被當作一條鏈路發布出去,OSPF網絡中的其他設備在路由計算時都會考慮MPLS TE隧道;

·     配置MPLS TE隧道的開銷,使Device A發往Device D的流量通過MPLS TE隧道轉發。

圖2 轉發鄰接配置組網圖

 

 

4.2  配置思路

·     創建MPLS TE隧道前,需要在MPLS TE隧道經過的各個節點和接口上開啟MPLS TE能力。

·     要想使轉發鄰接功能生效,需要創建方向相反的兩條MPLS TE隧道,並在隧道的兩端同時配置轉發鄰接功能;

·     為了控製MPLS TE隧道的實際轉發路徑經過Device C,需要配置顯式路徑;

·     為了保證Device A發往Device D的流量通過MPLS TE隧道轉發,必須在OSPF計算中使包含MPLS TE隧道的路徑度量值小於25,即MPLS TE隧道度量值小於15,本例中我們選擇12。

4.3  使用版本

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

4.4  配置注意事項

對於S6800-54HF、S6800-54HT、S6800-2C-FC,以及產品代碼為LS-6800-32Q-H1、LS-6800-54QF-H1、LS-6800-54QF-H3、LS-6800-54QT-H1、LS-6800-54QT-H3、LS-6800-2C-H1或LS-6800-4C-H1的機型,MPLS與VXLAN共用硬件資源,可用的硬件資源受VXLAN硬件資源模式影響。使用MPLS TE功能時,建議將VXLAN硬件資源模式配置為二層網關模式,此模式可用的硬件資源較多。

4.5  配置步驟

說明

本文隻介紹MPLS TE隧道及轉發鄰的相關配置,網需求中已存在的配置(包括:各接口IP地址、OSPF基本功能和各鏈OSPF開銷)本中省略,具體配置可參考4.7  配置文件

 

1. 在MPLS TE隧道經過的各個節點和接口上開啟MPLS TE能力

# 配置Device B的LSR ID,開啟MPLS、MPLS TE和RSVP-TE能力。

<DeviceB> system-view

[DeviceB] mpls lsr-id 2.2.2.2

[DeviceB] mpls te

[DeviceB-te] quit

[DeviceB] rsvp

[DeviceB-rsvp] quit

[DeviceB] interface vlan-interface 23

[DeviceB-Vlan-interface23] mpls enable

[DeviceB-Vlan-interface23] mpls te enable

[DeviceB-Vlan-interface23] rsvp enable

[DeviceB-Vlan-interface23] quit

# 配置Device CLSR ID,開啟MPLSMPLS TERSVP-TE能力。

<DeviceC> system-view

[DeviceC] mpls lsr-id 3.3.3.3

[DeviceC] mpls te

[DeviceC-te] quit

[DeviceC] rsvp

[DeviceC-rsvp] quit

[DeviceC] interface vlan-interface 23

[DeviceC-Vlan-interface23] mpls enable

[DeviceC-Vlan-interface23] mpls te enable

[DeviceC-Vlan-interface23] rsvp enable

[DeviceC-Vlan-interface23] ospf cost 10

[DeviceC-Vlan-interface23] quit

[DeviceC] interface vlan-interface 34

[DeviceC-Vlan-interface34] mpls enable

[DeviceC-Vlan-interface34] mpls te enable

[DeviceC-Vlan-interface34] rsvp enable

[DeviceC-Vlan-interface34] ospf cost 10

[DeviceC-Vlan-interface34] quit

# 配置Device DLSR ID,開啟MPLSMPLS TERSVP-TE能力。

<DeviceD> system-view

[DeviceD] mpls lsr-id 4.4.4.4

[DeviceD] mpls te

[DeviceD-te] quit

[DeviceD] rsvp

[DeviceD-rsvp] quit

[DeviceD] interface vlan-interface 34

[DeviceD-Vlan-interface34] mpls enable

[DeviceD-Vlan-interface34] mpls te enable

[DeviceD-Vlan-interface34] rsvp enable

[DeviceD-Vlan-interface34] quit

2. 配置OSPF TE,發布鏈路的MPLS TE屬性

# 在Device B上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[DeviceB] ospf

[DeviceB-ospf-1] opaque-capability enable

[DeviceB-ospf-1] area 0

[DeviceB-ospf-1-area-0.0.0.0] mpls te enable

[DeviceB-ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

# 在Device C上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[DeviceC] ospf

[DeviceC-ospf-1] opaque-capability enable

[DeviceC-ospf-1] area 0

[DeviceC-ospf-1-area-0.0.0.0] mpls te enable

[DeviceC-ospf-1-area-0.0.0.0] quit

[DeviceC-ospf-1] quit

# 在Device D上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[DeviceD] ospf

[DeviceD-ospf-1] opaque-capability enable

[DeviceD-ospf-1] area 0

[DeviceD-ospf-1-area-0.0.0.0] mpls te enable

[DeviceD-ospf-1-area-0.0.0.0] quit

[DeviceD-ospf-1] quit

3. 配置MPLS TE隧道

(1)     在Device B上配置MPLS TE隧道

# 在Device B上使用RSVP-TE信令協議建立MPLS TE隧道Tunnel1,目的地址為Device D的LSR ID(4.4.4.4)。

[DeviceB] interface tunnel 1 mode mpls-te

[DeviceB-Tunnel1] ip address 9.2.2.2 255.255.255.0

[DeviceB-Tunnel1] destination 4.4.4.4

[DeviceB-Tunnel1] mpls te signaling rsvp-te

[DeviceB-Tunnel1] quit

# 創建隧道的顯式路徑,指定Tunnel1的流量從Device C轉發。

[DeviceB] explicit-path tun1

[DeviceB-explicit-path-tun1] nexthop 23.23.23.3

[DeviceB-explicit-path-tun1] nexthop 34.34.34.4

[DeviceB-explicit-path-tun1]quit

[DeviceB] interface tunnel 1

[DeviceB–Tunnel1] mpls te path preference 1 explicit-path tun1

# 開啟隧道的IGP轉發鄰接功能,使MPLS TE隧道加入IGP路由計算。

[DeviceB-Tunnel1] mpls te igp advertise

# 在隧道接口tunnel 1上使能OSPF,設置隧道接口的OSPF開銷為12。

[DeviceB-Tunnel1] ospf 1 area 0

[DeviceB-Tunnel1] ospf cost 12

[DeviceB-Tunnel1] quit

(2)     在Device D上配置MPLS TE隧道

# 在Device D上使用RSVP-TE信令協議建立MPLS TE隧道Tunnel1,目的地址為Device B的LSR ID(2.2.2.2)。

[DeviceD] interface tunnel 1 mode mpls-te

[DeviceD-Tunnel1] ip address 9.4.4.4 255.255.255.0

[DeviceD-Tunnel1] destination 2.2.2.2

[DeviceD-Tunnel1] mpls te signaling rsvp-te

[DeviceD-Tunnel1] quit

# 創建隧道的顯式路徑,指定Tunnel1的流量從Device C轉發。

[DeviceD] explicit-path tun1

[DeviceD-explicit-path-tun1] nexthop 34.34.34.3

[DeviceD-explicit-path-tun1] nexthop 23.23.23.2

[DeviceD-explicit-path-tun1]quit

[DeviceD] interface tunnel 1

[DeviceD–Tunnel1] mpls te path preference 1 explicit-path tun1

# 開啟隧道的IGP轉發鄰接功能,使MPLS TE隧道加入IGP路由計算。

[DeviceD-Tunnel1] mpls te igp advertise

# 在隧道接口tunnel 1上使能OSPF,設置隧道接口的OSPF開銷為12。

[DeviceD-Tunnel1] ospf 1 area 0

[DeviceD-Tunnel1] ospf cost 12

[DeviceD-Tunnel1] quit

4.6  驗證配置

# Device BDevice D上執行display interface tunnel brief命令,可以看到Tunnel1的狀態為up,以DeviceB為例:

[DeviceB] display interface tunnel brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun1                 UP   UP       9.2.2.2         Tunnel1 Interface

# 在Device A上查看路由表,可以看到去往Device D(4.4.4.4)的下一跳為Device B(12.12.12.2),開銷為22(10+12),說明MPLS TE隧道已加入OSPF路由計算。

[Device A] display ip routing-table

 

Destinations : 24        Routes : 24

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.2.2.2/32          OSPF   10   10           12.12.12.2      Vlan12

3.3.3.3/32          OSPF   10   20           12.12.12.2      Vlan12

4.4.4.4/32          OSPF   10   22           12.12.12.2      Vlan12

9.2.2.0/24          OSPF   10   22           12.12.12.2      Vlan12

9.4.4.0/24          OSPF   10   34           12.12.12.2      Vlan12

12.12.12.0/24       Direct 0    0            12.12.12.1      Vlan12

12.12.12.0/32       Direct 0    0            12.12.12.1      Vlan12

12.12.12.1/32       Direct 0    0            127.0.0.1       InLoop0

12.12.12.255/32     Direct 0    0            12.12.12.1      Vlan12

14.14.14.0/24       Direct 0    0            14.14.14.1      Vlan14

14.14.14.0/32       Direct 0    0            14.14.14.1      Vlan14

14.14.14.1/32       Direct 0    0            127.0.0.1       InLoop0

14.14.14.255/32     Direct 0    0            14.14.14.1      Vlan14

23.23.23.0/24       OSPF   10   20           12.12.12.2      Vlan12

34.34.34.0/24       OSPF   10   30           12.12.12.2      Vlan12

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

4.7  配置文件

·     Device A:

#

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 12.12.12.0 0.0.0.255

  network 14.14.14.0 0.0.0.255

#

vlan 12

#

vlan 14

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface12

 ip address 12.12.12.1 255.255.255.0

 ospf cost 10

#

interface Vlan-interface14

 ip address 14.14.14.1 255.255.255.0

 ospf cost 25

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 12

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 14

#

·     Device B :

#

ospf 1

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 12.12.12.0 0.0.0.255

  network 23.23.23.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 2.2.2.2

#

vlan 12

#

vlan 23

#

mpls te

#

explicit-path tun1

 nexthop index 1 23.23.23.3 include strict

 nexthop index 101 34.34.34.4 include strict

#

rsvp

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface12

 ip address 12.12.12.2 255.255.255.0

 ospf cost 10

#

interface Vlan-interface23

 ip address 23.23.23.2 255.255.255.0

 ospf cost 10

 mpls enable

 mpls te enable

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 12

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 23

#

interface Tunnel1 mode mpls-te

 ip address 9.2.2.2 255.255.255.0

 ospf cost 12

 ospf 1 area 0.0.0.0

 mpls te path preference 1 explicit-path tun1

 mpls te igp advertise

 destination 4.4.4.4

#

·     Device C :

#

ospf 1

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 23.23.23.0 0.0.0.255

  network 34.34.34.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 3.3.3.3

#

vlan 23

#

vlan 34

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

interface Vlan-interface23

 ip address 23.23.23.3 255.255.255.0

 ospf cost 10

 mpls enable

 mpls te enable

 rsvp enable

#

interface Vlan-interface34

 ip address 34.34.34.3 255.255.255.0

 ospf cost 10

 mpls enable

 mpls te enable

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 34

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 23

#

·     Device D:

#

ospf 1

 area 0.0.0.0

  network 4.4.4.4 0.0.0.0

  network 14.14.14.0 0.0.0.255

  network 34.34.34.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 4.4.4.4

#

vlan 14

#

vlan 34

#

mpls te

#

explicit-path tun1

 nexthop index 1 34.34.34.3 include strict

 nexthop index 101 23.23.23.2 include strict

#

rsvp

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

interface Vlan-interface14

 ip address 14.14.14.4 255.255.255.0

 ospf cost 25

#

interface Vlan-interface34

 ip address 34.34.34.4 255.255.255.0

 ospf cost 10

 mpls enable

 mpls te enable

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 34

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 14

#

interface Tunnel1 mode mpls-te

 ip address 9.4.4.4 255.255.255.0

 ospf cost 12

 ospf 1 area 0.0.0.0

 mpls te path preference 1 explicit-path tun1

 mpls te igp advertise

 destination 2.2.2.2

#

5  MPLS TE FRR典型配置舉例

5.1  組網需求

圖3所示,Switch A->Switch B->Switch C->Switch D之間建立了一條CRLSP,承載著某公司的語音業務。由於Switch B和Switch C兩台設備相隔較遠,中間連有多台二層交換機,鏈路不太穩定,可能會發生故障,現要求使用MPLS TE FRR功能對Switch B->Switch C這段鏈路進行保護,當鏈路出現故障時,能快速切換到Bypass CRLSP(Switch A->Switch B->Switch E->Switch C->Switch D)。(假設Primary隧道和Bypass隧道的所需帶寬均為30000kbps;每條鏈路的最大帶寬為50000kbps,最大可預留帶寬為40000kbps)

圖3 MPLS TE FRR典型配置舉例組網圖

 

5.2  配置思路

·     為建立主備CRLSP,需要在各Switch上使能MPLS、MPLS TE和RSVP-TE基本能力。

·     由於組網需求中已經明確主CRLSP的路徑和Bypass CRLSP的路徑,需要通過顯式路徑的方式指定MPLS TE的主CRLSP和Bypass CRLSP。

·     為實現被保護的主CRLSP鏈路發生故障後,PLR能快速感知到,需要在主CRLSP保護鏈路兩端的節點上(Switch B和Switch C)配置BFD聯動RSVP-TE,使BFD能夠快速檢測並通告RSVP-TE協議,以便將流量快速切換到Bypass隧道。

·     為實現當BFD檢測到被保護鏈路故障後,主CRLSP上的流量能快速切換到Bypass CRLSP,需在主CRLSP的Ingress節點上使能MPLS TE FRR功能。

·     為了保證主CRLSP鏈路故障時,MPLS TE能在多條Bypass隧道可能同時並存的情況下,選擇出最優的Bypass隧道,需要在PLR節點上配置FRR的Bypass隧道的優選時間間隔為5秒(缺省為300秒)。

5.3  使用版本

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

5.4  配置注意事項

·     對於S6800-54HF、S6800-54HT、S6800-2C-FC,以及產品代碼為LS-6800-32Q-H1、LS-6800-54QF-H1、LS-6800-54QF-H3、LS-6800-54QT-H1、LS-6800-54QT-H3、LS-6800-2C-H1或LS-6800-4C-H1的機型,MPLS與VXLAN共用硬件資源,可用的硬件資源受VXLAN硬件資源模式影響。使用MPLS TE功能時,建議將VXLAN硬件資源模式配置為二層網關模式,此模式可用的硬件資源較多。

·     進行本案例配置之前,需要先全局關閉STP功能,或為每個VLAN映射一個MSTP實例,否則可能會阻斷環路中的一條鏈路。

·     隻有使用RSVP-TE信令協議建立的MPLS TE隧道支持FRR功能。

·     不要在同一個接口同時配置快速重路由功能和RSVP認證功能。

·     由於FRR使用的Bypass隧道需要預先建立,占用額外的帶寬,因此,在網絡帶寬餘量不多的情況下,應該隻對關鍵的接口或鏈路進行快速重路由保護。

·     用戶在配置時應保證Bypass隧道的帶寬不小於被保護的所有主CRLSP所需帶寬之和,否則可能導致部分主CRLSP不能被Bypass隧道保護。

·     Bypass隧道一般不轉發數據。如果Bypass隧道在保護主CRLSP的同時轉發流量,需要為Bypass隧道提供足夠的帶寬。

·     Bypass隧道不能作為VPN等業務的承載隧道。

·     不能為Bypass隧道配置快速重路由功能。也就是說,Bypass隧道不能同時作為主CRLSP被其他Bypass隧道保護,隧道不能被嵌套保護。

·     Bypass隧道不能經過被保護的接口或節點。

·     不要求帶寬保護的主CRLSP和提供保護帶寬的Bypass隧道綁定成功後,主CRLSP占用Bypass隧道的保護帶寬。提供帶寬保護的Bypass隧道的保護帶寬先到先得,需要帶寬保護的主CRLSP並不能搶占不需要帶寬保護的主CRLSP。

·     發生FRR切換後,如果修改Bypass隧道的保護帶寬,使得保護帶寬類型不同、保護帶寬不夠或者引起FRR保護類型(是否為主CRLSP提供帶寬保護)變化,都將導致主CRLSP Down。

5.5  配置步驟

(1)     配置各接口的IP地址

# 按照圖3配置各接口的IP地址和掩碼,包括LoopBack接口,下麵以Switch A為例,其它設備配置方法類似,具體配置過程略。

<SwitchA> system-view

[SwitchA] vlan 2

[SwitchA-vlan2] port ten-gigabitethernet 1/0/1

[SwitchA-vlan2] quit

[SwitchA] interface vlan-interface 2

[SwitchA-Vlan-interface2] ip address 2.1.1.1 24

[SwitchA] interface loopback 0

[SwitchA-LoopBack0] ip address 1.1.1.1 32

[SwitchA-LoopBack0] quit

(2)     配置OSPF協議,以保證各交換機之間路由可達

# 配置Switch A。

[SwitchA] ospf

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[SwitchA-ospf-1-area-0.0.0.0] network 2.1.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] quit

# 配置Switch B。

[SwitchB] ospf

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[SwitchB-ospf-1-area-0.0.0.0] network 2.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] network 3.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] network 3.2.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# 配置Switch C。

[SwitchC] ospf

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

[SwitchC-ospf-1-area-0.0.0.0] network 3.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] network 3.3.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] network 4.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# 配置Switch D。

[SwitchD] ospf

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0

[SwitchD-ospf-1-area-0.0.0.0] network 4.1.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

# 配置Switch E。

[SwitchE] ospf

[SwitchE-ospf-1] area 0

[SwitchE-ospf-1-area-0.0.0.0] network 5.5.5.5 0.0.0.0

[SwitchE-ospf-1-area-0.0.0.0] network 3.2.1.0 0.0.0.255

[SwitchE-ospf-1-area-0.0.0.0] network 3.3.1.0 0.0.0.255

[SwitchE-ospf-1-area-0.0.0.0] quit

[SwitchE-ospf-1] quit

# 配置完成後,在各交換機上執行display ip routing-table命令,可以看到相互之間都學到了對方的主機路由,包括Loopback接口對應的主機路由。以Switch A為例:

[SwitchA] display ip routing-table

 

Destinations : 21        Routes : 21

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.1.1.0/24          Direct 0    0            2.1.1.1         Vlan2

2.1.1.0/32          Direct 0    0            2.1.1.1         Vlan2

2.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.1.1.255/32        Direct 0    0            2.1.1.1         Vlan2

2.2.2.2/32          OSPF   10   1            2.1.1.2         Vlan2

3.1.1.0/24          OSPF   10   2            2.1.1.2         Vlan2

3.2.1.0/24          OSPF   10   2            2.1.1.2         Vlan2

3.3.1.0/24          OSPF   10   3            2.1.1.2         Vlan2

3.3.3.3/32          OSPF   10   2            2.1.1.2         Vlan2

4.1.1.0/24          OSPF   10   3            2.1.1.2         Vlan2

4.4.4.4/32          OSPF   10   3            2.1.1.2         Vlan2

5.5.5.5/32          OSPF   10   2            2.1.1.2         Vlan2

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

(3)     配置LSR ID,開啟MPLS、MPLS TE和RSVP-TE能力,並在Switch B和Switch C上配置RSVP-TE與BFD聯動,以檢測Switch B和Switch C之間鏈路的狀態

# 配置Switch A

[SwitchA] mpls lsr-id 1.1.1.1

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 2

[SwitchA-Vlan-interface2] mpls enable

[SwitchA-Vlan-interface2] mpls te enable

[SwitchA-Vlan-interface2] rsvp enable

[SwitchA-Vlan-interface2] quit

# 配置Switch B。

[SwitchB] mpls lsr-id 2.2.2.2

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] mpls enable

[SwitchB-Vlan-interface2] mpls te enable

[SwitchB-Vlan-interface2] rsvp enable

[SwitchB-Vlan-interface2] quit

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] mpls enable

[SwitchB-Vlan-interface3] mpls te enable

[SwitchB-Vlan-interface3] rsvp enable

[SwitchB-Vlan-interface3] rsvp bfd enable

[SwitchB-Vlan-interface3] quit

[SwitchB] interface vlan-interface 5

[SwitchB-Vlan-interface5] mpls enable

[SwitchB-Vlan-interface5] mpls te enable

[SwitchB-Vlan-interface5] rsvp enable

[SwitchB-Vlan-interface5] quit

# 配置Switch C。

[SwitchC] mpls lsr-id 3.3.3.3

[SwitchC] mpls te

[SwitchC-te] quit

[SwitchC] rsvp

[SwitchC-rsvp] quit

[SwitchC] interface vlan-interface 3

[SwitchC-Vlan-interface3] mpls enable

[SwitchC-Vlan-interface3] mpls te enable

[SwitchC-Vlan-interface3] rsvp enable

[SwitchC-Vlan-interface3] quit

[SwitchC] interface vlan-interface 4

[SwitchC-Vlan-interface4] mpls enable

[SwitchC-Vlan-interface4] mpls te enable

[SwitchC-Vlan-interface4] rsvp enable

[SwitchC-Vlan-interface4] rsvp bfd enable

[SwitchC-Vlan-interface4] quit

[SwitchC] interface vlan-interface 6

[SwitchC-Vlan-interface6] mpls enable

[SwitchC-Vlan-interface6] mpls te enable

[SwitchC-Vlan-interface6] rsvp enable

[SwitchC-Vlan-interface6] quit

# 配置Switch D。

[SwitchD] mpls lsr-id 4.4.4.4

[SwitchD] mpls te

[SwitchD-te] quit

[SwitchD] rsvp

[SwitchD-rsvp] quit

[SwitchD] interface vlan-interface 4

[SwitchD-Vlan-interface4] mpls enable

[SwitchD-Vlan-interface4] mpls te enable

[SwitchD-Vlan-interface4] rsvp enable

[SwitchD-Vlan-interface4] quit

# 配置Switch E。

[SwitchE] mpls lsr-id 5.5.5.5

[SwitchE] mpls te

[SwitchE-te] quit

[SwitchE] rsvp

[SwitchE-rsvp] quit

[SwitchE] interface vlan-interface 5

[SwitchE-Vlan-interface5] mpls enable

[SwitchE-Vlan-interface5] mpls te enable

[SwitchE-Vlan-interface5] rsvp enable

[SwitchE-Vlan-interface5] quit

[SwitchE] interface vlan-interface 6

[SwitchE-Vlan-interface6] mpls enable

[SwitchE-Vlan-interface6] mpls te enable

[SwitchE-Vlan-interface6] rsvp enable

[SwitchE-Vlan-interface6] quit

(4)     配置鏈路的MPLS TE屬性

# 在Switch A上配置鏈路的最大帶寬和最大可預留帶寬。

[SwitchA] interface vlan-interface 2

[SwitchA-Vlan-interface2] mpls te max-link-bandwidth 50000

[SwitchA-Vlan-interface2] mpls te max-reservable-bandwidth 40000

[SwitchA-Vlan-interface2] quit

# Switch B上配置鏈路的最大帶寬和最大可預留帶寬。

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface2] mpls te max-reservable-bandwidth 40000

[SwitchB-Vlan-interface2] quit

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface3] mpls te max-reservable-bandwidth 40000

[SwitchB-Vlan-interface3] quit

[SwitchB] interface vlan-interface 5

[SwitchB-Vlan-interface5] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface5] mpls te max-reservable-bandwidth 40000

[SwitchB-Vlan-interface5] quit

# Switch C上配置鏈路的最大帶寬和最大可預留帶寬。

[SwitchC] interface vlan-interface 3

[SwitchC-Vlan-interface3] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface3] mpls te max-reservable-bandwidth 40000

[SwitchC-Vlan-interface3] quit

[SwitchC] interface vlan-interface 4

[SwitchC-Vlan-interface4] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface4] mpls te max-reservable-bandwidth 40000

[SwitchC-Vlan-interface4] quit

[SwitchC] interface vlan-interface 6

[SwitchC-Vlan-interface6] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface6] mpls te max-reservable-bandwidth 40000

[SwitchC-Vlan-interface6] quit

# Switch D上配置鏈路的最大帶寬和最大可預留帶寬。

[SwitchD] interface vlan-interface 4

[SwitchD-Vlan-interface4] mpls te max-link-bandwidth 50000

[SwitchD-Vlan-interface4] mpls te max-reservable-bandwidth 40000

[SwitchD-Vlan-interface4] quit

# Switch E上配置鏈路的最大帶寬和最大可預留帶寬。

[SwitchE] interface vlan-interface 5

[SwitchE-Vlan-interface5] mpls te max-link-bandwidth 50000

[SwitchE-Vlan-interface5] mpls te max-reservable-bandwidth 40000

[SwitchE-Vlan-interface5] quit

[SwitchE] interface vlan-interface 6

[SwitchE-Vlan-interface6] mpls te max-link-bandwidth 50000

[SwitchE-Vlan-interface6] mpls te max-reservable-bandwidth 40000

[SwitchE-Vlan-interface6] quit

(5)     配置OSPF TE,發布鏈路的MPLS TE屬性

# Switch A上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[SwitchA] ospf

[SwitchA-ospf-1] opaque-capability enable

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] mpls te enable

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] quit

# Switch B上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[SwitchB] ospf

[SwitchB-ospf-1] opaque-capability enable

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] mpls te enable

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# Switch C上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[SwitchC] ospf

[SwitchC-ospf-1] opaque-capability enable

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] mpls te enable

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# Switch D上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[SwitchD] ospf

[SwitchD-ospf-1] opaque-capability enable

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] mpls te enable

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

# Switch E上使能OSPF的Opaque LSA發布接收能力(缺省情況下處於開啟狀態),並在OSPF區域0內使能MPLS TE能力。

[SwitchE] ospf

[SwitchE-ospf-1] opaque-capability enable

[SwitchE-ospf-1] area 0

[SwitchE-ospf-1-area-0.0.0.0] mpls te enable

[SwitchE-ospf-1-area-0.0.0.0] quit

[SwitchE-ospf-1] quit

(6)     在主CRLSP的Ingress節點Switch A上建立MPLS TE隧道

# 配置主CRLSP的顯式路徑,缺省采用嚴格下一跳方式。

[SwitchA] explicit-path pri-path

[SwitchA-explicit-path-pri-path] nexthop 2.1.1.2

[SwitchA-explicit-path-pri-path] nexthop 3.1.1.3

[SwitchA-explicit-path-pri-path] nexthop 4.1.1.4

[SwitchA-explicit-path-pri-path] nexthop 4.4.4.4

[SwitchA-explicit-path-pri-path] quit

# 配置主CRLSP的MPLS TE隧道Tunnel4:目的地址為Switch D的LSR ID(4.4.4.4);采用RSVP-TE信令協議建立MPLS TE隧道;隧道所需帶寬為30000kbps;隧道引用顯式路徑pri-path。

[SwitchA] interface tunnel4 mode mpls-te

[SwitchA-Tunnel4] ip address 10.1.1.1 255.255.255.0

[SwitchA-Tunnel4] destination 4.4.4.4

[SwitchA-Tunnel4] mpls te signaling rsvp-te

[SwitchA-Tunnel4] mpls te bandwidth 30000

[SwitchA-Tunnel4] mpls te path preference 1 explicit-path pri-path

# 開啟MPLS TE隧道的FRR功能。

[SwitchA-Tunnel4] mpls te fast-reroute

[SwitchA-Tunnel4] quit

# 配置完成後,在Switch A上執行display interface tunnel brief命令,可以看到Tunnel4的狀態為UP

[SwitchA] display interface tunnel brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun4                 UP   UP       10.1.1.1        Tunnel4 Interface

# 在Switch A上執行display mpls te tunnel-interface命令,可以看到隧道接口的詳細信息。

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 4

Tunnel State           : Up (Main CRLSP up, Shared-resource CRLSP down)

Tunnel Attributes      :

  LSP ID               : 37325           Tunnel ID            : 4

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 4.4.4.4

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : SE

  Tunnel mode          : -

  Reverse-LSP name     : -

  Reverse-LSP LSR ID   : -               Reverse-LSP Tunnel ID: -

  Class Type           : CT0             Tunnel Bandwidth     : 30000 kbps

  Reserved Bandwidth   : 30000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : pri-path

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Enabled         Record Label         : Enabled

  FRR Flag             : Enabled         Bandwidth Protection : Disabled

  Backup Bandwidth Flag: Disabled        Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : No              Auto Created         : No

  Route Pinning        : Disabled

  Retry Limit          : 3               Retry Interval       : 2 sec

  Reoptimization       : Disabled        Reoptimization Freq  : -

  Backup Type          : None            Backup LSP ID        : -

  Auto Bandwidth       : Disabled        Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -

(7)     在作為PLR的Switch B上配置Bypass隧道

# 配置Bypass隧道的顯式路徑。

[SwitchB] explicit-path by-path

[SwitchB-explicit-path-by-path] nexthop 3.2.1.5

[SwitchB-explicit-path-by-path] nexthop 3.3.1.3

[SwitchB-explicit-path-by-path] nexthop 3.3.3.3

[SwitchB-explicit-path-by-path] quit

# 配置Bypass隧道Tunnel5:目的地址為Switch C的LSR ID3.3.3.3);采用RSVP-TE信令協議建立MPLS TE隧道;隧道所需帶寬為30000kbps;隧道引用顯式路徑by-path

[SwitchB] interface tunnel 5 mode mpls-te

[SwitchB-Tunnel5] ip address 11.1.1.1 255.255.255.0

[SwitchB-Tunnel5] destination 3.3.3.3

[SwitchB-Tunnel5] mpls te signaling rsvp-te

[SwitchA-Tunnel5] mpls te backup bandwidth 30000

[SwitchB-Tunnel5] mpls te path preference 1 explicit-path by-path

# 將Bypass隧道綁定到被保護的接口。

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] mpls te fast-reroute bypass-tunnel tunnel 5

[SwitchB-Vlan-interface3] quit

# 配置完成後,在Switch B上執行display interface tunnel brief命令可以看到接口Tunnel5的狀態為UP

[SwitchB] display interface tunnel brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun5                 UP   DOWN     11.1.1.1        Tunnel5 Interface

(8)     配置靜態路由使流量沿MPLS TE隧道轉發

# 在Switch A上配置靜態路由,使得到達網絡4.1.1.0/24的流量通過MPLS TE隧道接口Tunnel4轉發。

[SwitchA] ip route-static 4.1.1.0 24 tunnel 4 preference 1

5.6  驗證配置

# 在所有設備上執行display mpls lsp命令,可以看到LSP表項。在Switch B上存在兩條LSP,通過Bypass隧道保護主CRLSP。

[SwitchA] display mpls lsp

FEC                         Proto    In/Out Label    Interface/Out NHLFE

1.1.1.1/4/37325             RSVP     -/1150          Vlan2

2.1.1.2                     Local    -/-             Vlan2

Tunnel4                     Local    -/-             NHLFE1026

[SwitchB] display mpls lsp

FEC                         Proto    In/Out Label    Interface/Out NHLFE

1.1.1.1/4/37325             RSVP     1150/1147       Vlan3

Backup                               1150/1147       Tun5

2.2.2.2/5/18928             RSVP     -/1149          Vlan5

3.1.1.3                     Local    -/-             Vlan3

3.2.1.5                     Local    -/-             Vlan5

Tunnel5                     Local    -/-             NHLFE1027

[SwitchC] display mpls lsp

FEC                         Proto    In/Out Label    Interface/Out NHLFE

1.1.1.1/4/37325             RSVP     1147/3          Vlan4

2.2.2.2/5/18928             RSVP     3/-             -

4.1.1.4                     Local    -/-             Vlan4

# 在PLR上shutdown被保護的出接口Vlan-interface 3

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] shutdown

[SwitchB-Vlan-interface3] quit

# Switch A上執行display interface tunnel 4 brief命令查看主CRLSP的狀態,可以看到Tunnel接口仍然處於UP狀態。

[SwitchA] display interface tunnel 4 brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun4                 UP   UP       10.1.1.1        Tunnel4 Interface

# 在Switch A上執行display mpls te tunnel-interface命令,可以看到隧道接口的詳細信息。

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 4

Tunnel State           : Up (Main CRLSP up, Shared-resource CRLSP being set up)

Tunnel Attributes      :

  LSP ID               : 37325           Tunnel ID            : 4

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 4.4.4.4

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : SE

  Tunnel mode          : -

  Reverse-LSP name     : -

  Reverse-LSP LSR ID   : -               Reverse-LSP Tunnel ID: -

  Class Type           : CT0             Tunnel Bandwidth     : 30000 kbps

  Reserved Bandwidth   : 30000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : pri-path

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Enabled         Record Label         : Enabled

  FRR Flag             : Enabled         Bandwidth Protection : Disabled

  Backup Bandwidth Flag: Disabled        Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : No              Auto Created         : No

  Route Pinning        : Disabled

  Retry Limit          : 3               Retry Interval       : 2 sec

  Reoptimization       : Disabled        Reoptimization Freq  : -

  Backup Type          : None            Backup LSP ID        : -

  Auto Bandwidth       : Disabled        Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -

# 在Switch B上執行display mpls lsp命令,可以看到Bypass隧道被使用。

[SwitchB] display mpls lsp

FEC                         Proto    In/Out Label    Interface/Out NHLFE

1.1.1.1/4/37325             RSVP     1150/1147       Tun5

2.2.2.2/5/18928             RSVP     -/1149          Vlan5

3.2.1.5                     Local    -/-             Vlan5

Tunnel5                     Local    -/-             NHLFE1027

# 在PLR上配置在多條旁路隧道中進行優選的時間間隔為5秒。

[SwitchB] mpls te

[SwitchB-te] fast-reroute timer 5

[SwitchB-te] quit

# PLRundo shutdown被保護的出接口Vlan-interface 3

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] undo shutdown

[SwitchB-Vlan-interface3] quit

# Switch A上執行display interface tunnel 4 brief命令查看主CRLSP的狀態,可以看到Tunnel接口處於up狀態。

[SwitchA] display interface tunnel 4 brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun4                 UP   UP       10.1.1.1        Tunnel4 Interface

# 等待約5秒鍾後,在Switch B上執行display mpls lsp verbose命令,可以看到Tunnel5仍綁定到出接口Vlan-interface 3,但未被使用。

[SwitchB] display mpls lsp verbose

Destination  : 4.4.4.4

FEC          : 1.1.1.1/4/53319

Protocol     : RSVP

LSR Type     : Transit

Service      : -

In-Label     : 1150

Path ID      : 0x540000003.1

State        : Active

Out-Label    : 1150

Nexthop      : 3.1.1.3

Out-Interface: Vlan3

BkLabel      : 1150

BkInterface  : Tun5

 

Destination  : 3.3.3.3

FEC          : 2.2.2.2/5/16429

Protocol     : RSVP

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1025

State        : Active

Out-Label    : 1151

Nexthop      : 3.2.1.5

Out-Interface: Vlan5

 

Destination  : 3.1.1.3

FEC          : 3.1.1.3

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1027

State        : Active

Nexthop      : 3.1.1.3

Out-Interface: Vlan3

 

Destination  : 3.2.1.5

FEC          : 3.2.1.5

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1024

State        : Active

Nexthop      : 3.2.1.5

Out-Interface: Vlan5

 

Destination  : 3.3.3.3

FEC          : Tunnel5

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 268435461

State        : Active

Out-Interface: NHLFE1025

# 在Switch A上執行display ip routing-table命令,可以看到路由表中有以Tunnel4為出接口的靜態路由信息。

[SwitchA] display ip routing-table

 

Destinations : 25        Routes : 25

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.1.1.0/24          Direct 0    0            2.1.1.1         Vlan2

2.1.1.0/32          Direct 0    0            2.1.1.1         Vlan2

2.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.1.1.255/32        Direct 0    0            2.1.1.1         Vlan2

2.2.2.2/32          OSPF   10   1            2.1.1.2         Vlan2

3.1.1.0/24          OSPF   10   2            2.1.1.2         Vlan2

3.2.1.0/24          OSPF   10   2            2.1.1.2         Vlan2

3.3.1.0/24          OSPF   10   3            2.1.1.2         Vlan2

3.3.3.3/32          OSPF   10   2            2.1.1.2         Vlan2

4.1.1.0/24          Static 1    0            0.0.0.0         Tun4

4.4.4.4/32          OSPF   10   3            2.1.1.2         Vlan2

5.5.5.5/32          OSPF   10   2            2.1.1.2         Vlan2

10.1.1.0/24         Direct 0    0            10.1.1.1        Tun4

10.1.1.0/32         Direct 0    0            10.1.1.1        Tun4

10.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

10.1.1.255/32       Direct 0    0            10.1.1.1        Tun4

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

5.7  配置文件

·     Switch A

#

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 2.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 1.1.1.1

#

vlan 2

#

mpls te

#

explicit-path pri-path

 nexthop index 1 2.1.1.2 include strict

 nexthop index 101 3.1.1.3 include strict

 nexthop index 201 4.1.1.4 include strict

 nexthop index 301 4.4.4.4 include strict

#

rsvp

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface2

 ip address 2.1.1.1 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 2

#

interface Tunnel4 mode mpls-te

 ip address 10.1.1.1 255.255.255.0

 mpls te bandwidth ct0 30000

 mpls te path preference 1 explicit-path pri-path

 mpls te fast-reroute

 destination 4.4.4.4

#

ip route-static 4.1.1.0 24 Tunnel4 preference 1

#

·     Switch B

#

ospf 1

 area 0.0.0.0

  network 2.1.1.0 0.0.0.255

  network 2.2.2.2 0.0.0.0

  network 3.1.1.0 0.0.0.255

  network 3.2.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 2.2.2.2

#

vlan 2 to 3

#

vlan 5

#

mpls te

  fast-reroute timer 5

#

explicit-path by-path

 nexthop index 1 3.2.1.5 include strict

 nexthop index 101 3.3.1.3 include strict

 nexthop index 201 3.3.3.3 include strict

#

rsvp

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface2

 ip address 2.1.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Vlan-interface3

 ip address 3.1.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 mpls te fast-reroute bypass-tunnel Tunnel5

 rsvp enable

 rsvp bfd enable

#

interface Vlan-interface5

 ip address 3.2.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 2

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 3

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 5

#

interface Tunnel5 mode mpls-te

 ip address 11.1.1.1 255.255.255.0

 mpls te backup bandwidth ct0 30000

 mpls te path preference 1 explicit-path by-path

 destination 3.3.3.3

#

·     Switch C

#

ospf 1

 area 0.0.0.0

  network 3.1.1.0 0.0.0.255

  network 3.3.1.0 0.0.0.255

  network 3.3.3.3 0.0.0.0

  network 4.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 3.3.3.3

#

vlan 3 to 4

#

vlan 6

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

interface Vlan-interface3

 ip address 3.1.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

 rsvp bfd enable

#

interface Vlan-interface4

 ip address 4.1.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Vlan-interface6

 ip address 3.3.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 4

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 3

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 6

#

·     Switch D

#

ospf 1

 area 0.0.0.0

  network 4.1.1.0 0.0.0.255

  network 4.4.4.4 0.0.0.0

  mpls te enable

#

 mpls lsr-id 4.4.4.4

#

vlan 4

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

interface Vlan-interface4

 ip address 4.1.1.4 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 4

#

·     Switch E

#

ospf 1

 area 0.0.0.0

  network 3.2.1.0 0.0.0.255

  network 3.3.1.0 0.0.0.255

  network 5.5.5.5 0.0.0.0

  mpls te enable

#

 mpls lsr-id 5.5.5.5

#

vlan 5 to 6

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 5.5.5.5 255.255.255.255

#

interface Vlan-interface5

 ip address 3.2.1.5 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Vlan-interface6

 ip address 3.3.1.5 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te max-reservable-bandwidth 40000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 5

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 6

#

6  相關資料

·     H3C S6800係列以太網交換機 MPLS配置指導-Release 26xx係列

·     H3C S6800係列以太網交換機 MPLS命令參考-Release 26xx係列

 

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

BOB登陆
官網
聯係我們