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

H3C S6850&S9850&S9820-64H 典型配置舉例-Release 655x係列-6W100

目錄

67-MPLS TE典型配置舉例

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

67-MPLS TE典型配置舉例

H3C S6850&S9850&S9820-64H MPLS TE典型配置舉例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

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

除bobty下载软件 的商標外,本手冊中出現的其它公司的商標、產品標識及商品名稱,由各自權利人擁有。

本文檔中的信息可能變動,恕不另行通知。



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  適用產品及版本

表1 適用產品及版本

產品

軟件版本

S6850係列

S9850係列

Release 6555P01

S9820-64H

Release 6555P01

 

3.4  配置注意事項

·            在采用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 hundredgige 1/0/1

[SwitchA-vlan10] quit

[SwitchA] interface vlan-interface 10

[SwitchA-Vlan-interface10] ip address 10.1.1.1 24

[SwitchA-Vlan-interface10] quit

[SwitchA] vlan 30

[SwitchA-vlan30] port hundredgige 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 hundredgige 1/0/3

[SwitchA-vlan70] quit

[SwitchA] interface vlan-interface 70

[SwitchA-Vlan-interface70] ip address 70.1.1.1 24

[SwitchA-Vlan-interface70] quit

[SwitchA] vlan 80

[SwitchA-vlan80] port hundredgige 1/0/4

[SwitchA-vlan80] quit

[SwitchA] interface vlan-interface 80

[SwitchA-Vlan-interface80] ip address 80.1.1.1 24

[SwitchA-Vlan-interface80] 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          O_INTRA 10   1            10.1.1.2        Vlan10

3.3.3.3/32          O_INTRA 10   1            30.1.1.3        Vlan30

4.4.4.4/32          O_INTRA 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         O_INTRA 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

Tun2                 UP   UP       8.1.1.1

# 在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          O_INTRA 10   1            10.1.1.2        Vlan10

3.3.3.3/32          O_INTRA 10   1            30.1.1.3        Vlan30

4.4.4.4/32          O_INTRA 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: SwitchA_t1

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: SwitchA_t2

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 HundredGigE1/0/1

 port link-mode bridge

 port access vlan 10

#

interface HundredGigE1/0/2

 port link-mode bridge

 port access vlan 30

#

interface HundredGigE1/0/3

 port link-mode bridge

 port access vlan 70

#

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

 port link-mode bridge

 port access vlan 10

#

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

 port link-mode bridge

 port access vlan 40

#

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

 port link-mode bridge

 port access vlan 40

#

interface HundredGigE1/0/2

 port link-mode bridge

 port access vlan 20

#

interface HundredGigE1/0/3

 port link-mode bridge

 port access vlan 50

#

interface HundredGigE1/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  適用產品及版本

表2 適用產品及版本

產品

軟件版本

S6850係列

S9850係列

Release 6555P01

S9820-64H

Release 6555P01

 

4.4  配置步驟

說明

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

 

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] 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] 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.2.2.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.5  驗證配置

# 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

# 在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         O_INTRA 10  10          12.12.12.2      Vlan12

3.3.3.3/32         O_INTRA 10  20          12.12.12.2      Vlan12

4.4.4.4/32         O_INTRA 10  22          12.12.12.2      Vlan12

9.2.2.0/24         O_INTRA 10  22          12.12.12.2      Vlan12

10.1.0.3/32        Direct  0   0           127.0.0.1       InLoop0

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      O_INTRA 10  20          12.12.12.2      Vlan12

34.34.34.0/24      O_INTRA 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.6  配置文件

·            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 HundredGigE1/0/1

 port link-mode bridge

 port access vlan 12

#

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

 port link-mode bridge

 port access vlan 12

#

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

 port link-mode bridge

 port access vlan 34

#

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

 port link-mode bridge

 port access vlan 34

#

interface HundredGigE1/0/2

 port link-mode bridge

 port access vlan 14

#

interface Tunnel1 mode mpls-te

 ip address 9.2.2.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  相關資料

·            H3C S6850 & S9850係列以太網交換機 MPLS配置指導-Release 655x係列

·            H3C S6850 & S9850係列以太網交換機 MPLS命令參考-Release 655x係列

·            H3C S9820-64H交換機 MPLS配置指導-Release 655x係列

·            H3C S9820-64H交換機 MPLS命令參考-Release 655x係列

 

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

BOB登陆
官網
聯係我們