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

08-MPLS配置指導

目錄

04-MPLS TE配置

本章節下載 04-MPLS TE配置  (1023.34 KB)

04-MPLS TE配置

  錄

1 MPLS TE

1.1 MPLS TE簡介

1.1.1 流量工程與MPLS TE

1.1.2 MPLS TE的基本概念

1.1.3 靜態建立CRLSP

1.1.4 動態建立CRLSP

1.1.5 采用PCE計算的路徑建立CRLSP

1.1.6 流量轉發

1.1.7 make-before-break

1.1.8 路由固定

1.1.9 隧道重優化

1.1.10 CRLSP備份

1.1.11 快速重路由

1.1.12 DiffServ-Aware TE

1.1.13 MPLS TE雙向隧道

1.1.14 協議規範

1.2 MPLS TE配置任務簡介

1.2.1 靜態建立CRLSP

1.2.2 動態建立CRLSP

1.2.3 采用PCE計算的路徑建立CRLSP

1.3 MPLS TE配置準備

1.4 開啟MPLS TE能力

1.5 配置Tunnel接口

1.6 配置DiffServ-Aware TE

1.7 配置MPLS TE隧道采用靜態CRLSP

1.8 配置鏈路的MPLS TE屬性

1.9 配置通過IGP的TE擴展發布鏈路的MPLS TE屬性

1.9.1 功能簡介

1.9.2 配置限製和指導

1.9.3 配置OSPF TE

1.9.4 配置IS-IS TE

1.10 配置MPLS TE隧道的約束條件

1.10.1 配置MPLS TE隧道的帶寬要求

1.10.2 配置MPLS TE隧道的親和屬性

1.10.3 配置MPLS TE隧道的建立優先級和保持優先級

1.10.4 配置顯式路徑

1.11 使用RSVP-TE建立MPLS TE隧道

1.12 調整CRLSP的路徑選擇

1.12.1 功能簡介

1.12.2 配置限製和指導

1.12.3 配置選路使用的度量

1.12.4 配置路由固定

1.12.5 配置隧道重優化

1.12.6 配置TE信息泛洪閾值及泛洪時間間隔

1.13 調整MPLS TE隧道的建立

1.13.1 功能簡介

1.13.2 配置限製和指導

1.13.3 配置環路檢測

1.13.4 配置記錄路由和標簽

1.13.5 配置隧道重建

1.13.6 配置RSVP資源預留風格

1.14 配置MPLS TE隧道采用PCE計算的路徑建立CRLSP

1.14.1 配置PCE

1.14.2 配置PCE發現

1.14.3 配置使用PCE計算路徑

1.14.4 配置PCEP會話參數

1.15 配置流量轉發

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

1.15.2 配置自動路由發布使流量沿MPLS TE隧道轉發

1.16 配置MPLS TE雙向隧道

1.17 配置CRLSP備份

1.17.1 功能簡介

1.17.2 配置RSVP TE方式建立備份路徑

1.17.3 配置使用PCE計算備份路徑

1.18 配置MPLS TE快速重路由

1.18.1 配置限製和指導

1.18.2 開啟快速重路由功能

1.18.3 在PLR上配置Bypass隧道

1.18.4 配置節點故障檢測

1.18.5 配置快速重路由的Bypass隧道優選時間間隔

1.19 開啟告警功能

1.20 MPLS TE顯示和維護

1.21 MPLS TE典型配置舉例

1.21.1 使用靜態CRLSP配置MPLS TE隧道示例

1.21.2 使用RSVP-TE配置MPLS TE隧道示例

1.21.3 使用RSVP-TE配置跨域的MPLS TE隧道示例

1.21.4 使用PCE計算的路徑建立跨區域的MPLS TE隧道示例

1.21.5 配置MPLS TE雙向隧道示例

1.21.6 配置CRLSP備份示例

1.21.7 配置快速重路由示例(手工配置Bypass隧道)

1.21.8 配置自動快速重路由示例

1.21.9 配置IETF DS-TE模式MPLS TE隧道示例

1.22 MPLS TE常見故障處理

1.22.1 不能產生TE LSA

 


1 MPLS TE

1.1  MPLS TE簡介

1.1.1  流量工程與MPLS TE

網絡擁塞是影響骨幹網絡性能的主要問題。擁塞的原因可能是網絡資源不足,也可能是網絡資源負載不均衡導致的局部擁塞。TE(Traffic Engineering,流量工程)可以用來解決負載不均衡導致的擁塞問題。

流量工程通過實時監控網絡的流量和網絡單元的負載,動態調整流量管理參數、路由參數和資源約束參數等,使網絡運行狀態遷移到理想狀態,優化網絡資源的使用,避免負載不均衡導致的擁塞。

MPLS TE結合了MPLS技術與流量工程,通過建立沿著指定路徑的LSP隧道進行資源預留,使網絡流量繞開擁塞節點,達到平衡網絡流量的目的。

MPLS TE是一種可擴展性好、簡單的流量工程解決方案,受到了服務提供商的青睞。通過MPLS TE技術,服務提供商能夠在已有的MPLS骨幹網上簡單地部署流量工程,充分利用現有的網絡資源提供多樣化的服務,同時可以優化網絡資源,並進行科學的網絡管理。

1.1.2  MPLS TE的基本概念

1. CRLSP

CRLSP(Constraint-based Routed Label Switched Paths,基於約束路由的LSP)是基於一定約束條件建立的LSP。與普通LSP不同,CRLSP的建立不僅依賴路由信息,還需要滿足其他一些條件,比如帶寬需求、顯式路徑等。

MPLS TE可以通過靜態方式、動態方式或PCE方式建立CRLSP。

2. SRLSP

SRLSP(Segment Routing Label Switched Path,基於段路由的LSP)是指在SR-MPLS網絡中以MPLS標簽作為SID(Segment Identifier,段標識)對報文進行段路由轉發,報文所經過的路徑稱為SRLSP。SRLSP可以手工配置,也可以通過控製器下發。關於SRLSP的配置請參見“Segment Routing配置指導”中的“SR-MPLS”。

3. MPLS TE隧道

MPLS TE隧道是從頭節點到目的節點的一條虛擬點到點連接。通常情況下,MPLS TE隧道由一條CRLSP或SRLSP構成。在部署轉發路徑備份或需要將流量通過多條路徑傳輸等情況下,需要為同一種流量建立多條CRLSP或SRLSP,在這種情況下,MPLS TE隧道由一組CRLSP或SRLSP構成。

頭節點上MPLS TE隧道由MPLS TE模式的Tunnel接口標識。當流量的出接口為Tunnel接口時,該流量將通過構成MPLS TE隧道的CRLSP或SRLSP來轉發。關於MPLS TE隧道采用SRLSP的配置請參見“Segment Routing配置指導”中的“SR-MPLS”。

1.1.3  靜態建立CRLSP

靜態建立CRLSP是指在流量經過的每一跳設備上(包括Ingress、Transit和Egress)分別手工指定入標簽、出標簽、流量所需的帶寬等信息,從而建立滿足約束條件的CRLSP。該方式的優點是配置簡單,缺點是不能根據網絡的變化動態調整建立的CRLSP。

靜態CRLSP的詳細介紹,請參見“MPLS配置指導”中的“靜態CRLSP”。

1.1.4  動態建立CRLSP

動態建立CRLSP是指根據鏈路狀態信息計算出路徑後,通過標簽分發協議(如RSVP-TE)通告標簽,並在經過的節點上為流量預留所需的帶寬資源,從而建立滿足約束條件的CRLSP。該方式的優點是能根據網絡的變化動態調整建立的CRLSP,且支持CRLSP備份、快速重路由等功能,缺點是配置複雜。

采用動態方式建立CRLSP時,MPLS TE需要實現如下功能:

·     發布包含鏈路TE屬性的信息,以便根據這些信息選擇滿足約束條件的路徑。

·     計算出到達某個節點的滿足TE屬性要求的最短路徑。

·     通過標簽分發協議沿著計算出的路徑建立CRLSP,並預留資源。

1. 發布TE屬性

MPLS TE通過對現有的使用鏈路狀態算法的IGP協議(如OSPF和IS-IS)進行擴展來發布每條鏈路的TE相關屬性,如鏈路的最大帶寬、鏈路的最大可預留帶寬、每個優先級的未被預留帶寬、鏈路屬性等。這些信息通過IGP協議在網絡上泛洪。每台設備收集本區域或本級別所有設備上每條鏈路的TE相關信息,生成TEDB(TE DataBase,流量工程數據庫)。

2. 計算路徑

MPLS TE使用CSPF(Constraint-based Shortest Path First,基於約束的最短路徑優先)算法,根據通過IS-IS或OSPF擴展產生的TEDB,計算出到達某個節點的符合帶寬、親和屬性、建立/保持優先級、顯式路徑等約束條件的最短路徑。

CSPF是一種改進的SPF(Shortest Path First,最短路徑優先)算法。CSPF的計算過程就是針對MPLS TE隧道的要求,先對TEDB中的鏈路進行剪切,把不滿足TE屬性要求的鏈路剪掉;再采用SPF算法,尋找一條到Egress節點的滿足TE屬性要求的最短路徑(即一組LSR地址)。

CSPF計算的結果是一條滿足約束條件的完全明確的路徑,通常隻在MPLS TE隧道的Ingress節點進行CSPF計算。

MPLS TE隧道的約束條件需要在Ingress節點上配置,約束條件包括:

·     帶寬

帶寬要求是指經過MPLS TE隧道的流量所屬的服務類型及其所需的帶寬。隻有鏈路上針對流量所屬服務類型的可預留帶寬大於等於流量所需帶寬時,該鏈路才滿足帶寬約束條件。

·     親和屬性

MPLS TE隧道的親和屬性和鏈路的屬性配合,決定了該隧道可以使用哪些鏈路。

鏈路屬性、親和屬性的掩碼都是32位的二進製數。如果希望某條鏈路能夠被隧道所用,則需要滿足如下要求:

¡     對於掩碼為1的位,親和屬性為1的位中鏈路屬性至少有1位也為1,親和屬性為0的位對應的鏈路屬性位不能為1。

¡     對於掩碼為0的位,不對鏈路屬性的相應位進行檢查。

例如,親和屬性為0xFFFFFFF0,掩碼為0x0000FFFF,則可用鏈路的鏈路屬性高16位可以任意取0或1,17~28位中至少有1位為1,且低4位不能為1。

·     建立和保持優先級

如果在建立MPLS TE隧道時,無法找到滿足所需帶寬要求的路徑,可以拆除另外一條已經建立的MPLS TE隧道,占用為它分配的帶寬資源,這種處理方式稱為搶占。

MPLS TE隧道使用兩個優先級屬性來決定是否可以進行搶占:建立優先級(Setup Priority)和保持優先級(Holding Priority)。建立優先級和保持優先級的取值範圍都是0~7,數值越小則優先級越高。隻有當一條MPLS TE隧道的建立優先級數值小於另一條MPLS TE隧道的保持優先級時,該隧道才可以搶占另一條隧道的資源。

MPLS TE隧道的建立優先級不能高於該隧道的保持優先級,即其在數值上應大於或等於保持優先級,否則可能會導致MPLS TE隧道間無窮盡地互相搶占,造成震蕩。

·     顯式路徑

通過顯式路徑可以指定到達某個目的地所必須經過的節點、不允許經過的節點等。將顯式路徑作為約束條件,可以動態計算出符合規劃要求的路徑。

顯式路徑分為:

¡     嚴格顯式路徑:指定必須經過哪些節點,並且指定的下一跳與前一跳必須直接相連。通過嚴格顯式路徑,可以最精確地控製MPLS TE隧道所經過的路徑。

¡     鬆散顯式路徑:指定必須經過哪些節點,並且指定的下一跳和前一跳之間可以存在其他節點。通過鬆散顯式路徑,可以模糊地限製MPLS TE隧道所經過的路徑。

嚴格顯式路徑和鬆散顯式路徑還可以配合使用,即在顯式路徑中部分節點之間必須直接相連,部分節點之間可以存在其他節點。

3. 通過RSVP-TE建立CRLSP

使用CSPF算法計算出滿足約束條件的路徑後,MPLS TE通過標簽分發協議沿著計算出的路徑建立CRLSP,並在路徑經過的節點上預留資源。

目前,設備上支持的MPLS TE標簽分發協議為RSVP-TE。RSVP(Resource Reservation Protocol,資源預留協議)是一種用來在網絡上請求預留資源的信令協議。RSVP經擴展後可以支持MPLS標簽的分發,並在傳送標簽綁定消息的同時攜帶資源預留信息,這種擴展後的RSVP稱為RSVP-TE。

RSVP的詳細介紹,請參見“MPLS配置指導”中的“RSVP”。

1.1.5  采用PCE計算的路徑建立CRLSP

在MPLS TE網絡中,作為PCC(Path Computation Client,路徑計算客戶端)的LSR需要獲取到達目的地的CRLSP路徑時,向PCE(Path Computation Element,路徑計算單元)發起路徑計算請求,PCE執行路徑計算後對該請求進行應答,並提供計算後的路徑。PCC根據PCE計算後的路徑使用RSVP-TE建立CRLSP。

PCE設備用於為網絡上的設備提供路徑計算服務,可進行區域內的路徑計算,也可在複雜的網絡環境中計算完整的CRLSP路徑,比如,在區域間的ABR上部署PCE,用來計算跨區域的CRLSP。

1. 基本概念

·     PCE(Path Computation Element,路徑計算單元):網絡中的一個實體,能夠根據TEDB並基於帶寬和其它約束條件來計算路徑。

·     PCC(Path Computation Client,路徑計算客戶端):請求PCE執行路徑計算,並根據PCE返回的路徑信息建立CRLSP。

·     PCEP(Path Computation Element Communication Protocol,路徑計算單元通信協議):運行於PCC與PCE之間、或者PCE與PCE之間的通信協議,用於建立PCEP會話,交互PCEP消息。該協議基於TCP。

2. PCE發現機製

PCE的發現有兩種方式:

·     靜態指定:在PCC上靜態指定PCE。

·     動態發現:通過OSPF TE通告PCE信息,使得網絡上的其它LSR可自動發現PCE。

3. PCE路徑計算方式

PCE路徑計算有兩種方式:

·     EPC(External Path Computation,外部路徑計算):此方式由單台PCE獨立完成CRLSP的計算,通常用於區域內的路徑計算。

·     BRPC(Backward-Recursive PCE-Based Computation,反向遞歸路徑計算):此方式通過多台PCE配合完成CRLSP的計算,通常用於跨區域的路徑計算。

以BRPC的計算方式為例,在多區域的網絡環境中,如圖1-1所示,兩台ABR分別被配置為PCE 1和PCE 2。PCE 1可計算Area 0和Area 1內的路徑,PCE 2可計算Area 0和Area 2內的路徑。當PCC需要獲取到達Area 2的CRLSP路徑時,路徑計算步驟為:

(1)     PCC向PCE 1發起路徑計算請求。

(2)     PCE 1收到該請求後,發現無法計算Area 2內路徑,則繼續向PCE 2發起到達Area 2的路徑計算請求。

(3)     PCE 2應答該請求,並提供到達Area 2的路徑。

(4)     PCE 1收到PCE 2的應答後,彙總路徑信息,並對PCC的路徑請求進行應答,提供到達Area 2的路徑。

(5)     PCC根據PCE計算後的路徑使用RSVP-TE建立CRLSP。

圖1-1 路徑計算過程示意圖

 

1.1.6  流量轉發

當MPLS TE隧道建立之後,流量不會自動通過MPLS TE隧道轉發,需要通過如下方法配置流量沿MPLS TE隧道轉發。

1. 靜態路由

使用靜態路由轉發流量,是指定義一條通過Tunnel接口到達目的網絡地址的靜態路由,把流量引入到MPLS TE隧道上進行轉發。

靜態路由是將流量引入MPLS TE隧道的最簡便、直觀的方法。該方法的缺點是:如果多個目的網絡的流量都需要引入到MPLS TE隧道上,則需要配置多條靜態路由,配置和維護難度比較大。

有關靜態路由的介紹請參見“三層技術-IP路由配置指導”中的“靜態路由”。

2. 自動路由發布

自動路由發布是指將MPLS TE隧道發布到IGP(OSPF或IS-IS)路由中,讓MPLS TE隧道參與IGP路由的計算,使得流量可以通過MPLS TE隧道轉發。自動路由發布方式的配置和維護都比較簡單。

自動路由發布包括以下兩種方式:

·     IGP Shortcut:也稱為自動路由宣告(AutoRoute Announce),該功能將MPLS TE隧道當作一條直接連接隧道Ingress節點(頭節點)和Egress節點(尾節點)的鏈路,在隧道的Ingress節點上進行IGP路由計算時考慮該MPLS TE隧道。

·     轉發鄰接:該功能將MPLS TE隧道當作一條直接連接隧道Ingress節點和Egress節點的鏈路,通過IGP路由協議將該鏈路發布到網絡中,以便網絡中的節點在路由計算時使用MPLS TE隧道。

IGP Shortcut和轉發鄰接功能的區別在於:

·     在隧道的Ingress節點上開啟IGP Shortcut功能後,隻有Ingress節點計算IGP路由時會考慮MPLS TE隧道。IGP Shortcut功能不會通過IGP路由協議將MPLS TE隧道作為一條鏈路發布出去。因此,其他設備在路由計算時不會考慮MPLS TE隧道。

·     在隧道的Ingress節點上開啟轉發鄰接功能後,Ingress節點會通過IGP路由協議將MPLS TE隧道作為一條鏈路發布出去。因此,IGP網絡中的所有設備在路由計算時都會考慮MPLS TE隧道。

圖1-2 IGP Shortcut與轉發鄰接示意圖

 

 

圖1-2中,Device D到Device C之間存在一條MPLS TE隧道,IGP Shortcut隻能使Ingress節點Device D在計算IGP路由時利用這條隧道,Device A並不能利用這條隧道到達Device C。如果配置了轉發鄰接功能,則Device A也能夠知道這條MPLS TE隧道的存在,從而可以利用該隧道將到Device C的流量轉發到Device D上。

1.1.7  make-before-break

make-before-break是一種在盡可能不丟失數據,也不占用額外帶寬的前提下改變MPLS TE隧道的機製。

在隧道重優化等情況下,如果在新的CRLSP建立之前拆除舊的CRLSP,則會導致流量轉發中斷。通過make-before-break機製可以確保新CRLSP建立、並將流量切換到新的CRLSP後,再拆除舊CRLSP,從而有效地避免流量轉發中斷。此時,存在的問題是:如果新的CRLSP和舊CRLSP部分路徑相同,則在這些路徑上需要重複為新舊CRLSP預留帶寬,造成帶寬資源的浪費。make-before-break機製采用SE資源預留風格解決這個問題。

資源預留風格是RSVP-TE協議在建立CRLSP時預留帶寬資源的方式。MPLS TE隧道使用的資源預留風格由隧道的Ingress節點決定,並通過RSVP協議通知給各個節點。

目前,設備支持以下兩種資源預留風格:

·     FF(Fixed-Filter,固定過濾器):為每個發送者單獨預留資源,同一會話中的不同發送者不能共享資源。

·     SE(Shared-Explicit,共享顯式):為同一個會話中的不同發送者預留同一個資源,不同發送者之間可以共享資源。該方式主要用於make-before-break。

圖1-3中,假設需要建立一條Device A到Device D的CRLSP,保留30M帶寬,起初建立的路徑是Device A→Device B→Device C→Device D。

現在希望將帶寬增大為40M,Device A→Device B→Device C→Device D路徑不能滿足要求。而如果選擇Device A→Device E→Device C→Device D,則Device C→Device D需要同時預留30M和40M帶寬,也存在帶寬不夠的問題。

采用make-before-break機製,新建立的CRLSP在Device C→Device D可以共享原CRLSP的帶寬,不需要為新CRLSP和舊CRLSP重複預留帶寬。新CRLSP建立成功後,流量切換到新CRLSP上,之後拆除原CRLSP,從而有效地避免了流量中斷。

圖1-3 make-before-break示意圖

 

 

1.1.8  路由固定

路由固定是指CRLSP創建成功後,即使路由發生變化,也不重新選擇最優路徑,而是沿用已創建的CRLSP。

在路由變化頻繁的網絡中,如果不希望CRLSP隨著路由頻繁變化,則可以通過本功能確保隻要已建立的CRLSP可用就不重新創建CRLSP。

1.1.9  隧道重優化

隧道重優化功能是指周期性地或通過命令行手工觸發隧道的Ingress節點重新計算路徑。如果計算出的路徑優於當前路徑,則創建一條新的CRLSP。將流量從舊的CRLSP切換至新的CRLSP後,刪除舊的CRLSP。

MPLS TE利用隧道重優化功能實現CRLSP的動態優化,以便及時地將MPLS TE隧道切換到當前的最優路徑。例如,如果在MPLS TE隧道建立時,最優路徑上的鏈路沒有足夠的可預留帶寬,則會導致MPLS TE隧道未使用最優路徑建立。通過隧道重優化功能,可以實現鏈路上具有足夠的帶寬時將MPLS TE隧道自動切換到最優路徑。

1.1.10  CRLSP備份

CRLSP備份是指通過備份CRLSP對主CRLSP進行保護。當Ingress感知到主CRLSP不可用時,將流量切換到備份CRLSP上,當主CRLSP路徑恢複後再將流量切換回來,以實現對主CRLSP的備份保護。

CRLSP備份有兩種備份方法:

·     熱備份:創建主CRLSP後隨即創建備份CRLSP。主CRLSP失效時,直接將流量切換至備份CRLSP。

·     普通備份:指主CRLSP失效後創建備份CRLSP。

1.1.11  快速重路由

FRR(Fast Reroute,快速重路由)是MPLS TE中實現網絡局部保護的技術。FRR的切換速度可以達到50ms,能夠最大程度減少網絡故障時數據的丟失。

開啟隧道的FRR功能後,當主CRLSP上的某條鏈路或某個節點失效時,流量會被切換到Bypass隧道上。同時,隧道的Ingress節點嚐試建立新的CRLSP。新的CRLSP建立成功後,流量將切換到新的CRLSP。

說明

CRLSP備份是一種端到端的路徑保護,對整條CRLSP提供保護,而FRR則是一種局部保護措施,隻能保護CRLSP中的某條鏈路或某個節點。並且,FRR是一種快速響應的臨時性保護措施,對於切換時間有嚴格要求,CRLSP備份則沒有時間要求。

 

1. 基本概念

下麵介紹FRR中的幾個概念:

·     主CRLSP:被保護的CRLSP。

·     Bypass隧道:旁路隧道,保護主CRLSP中的某條鏈路或某個節點的MPLS TE隧道。

·     PLR(Point of Local Repair,本地修複節點):Bypass隧道的Ingress節點,必須在主CRLSP的路徑上,並且不能是主CRLSP的Egress節點。

·     MP(Merge Point,彙聚點):Bypass隧道的Egress節點,必須在主CRLSP的路徑上,並且不能是主CRLSP的Ingress節點。

2. 保護方式

根據保護的對象不同,FRR分為兩類:

·     鏈路保護:又稱為Next-hop(NHOP)保護。PLR和MP之間有直接鏈路連接,主CRLSP經過這條鏈路。當這條鏈路失效時,流量可以切換到Bypass隧道上。如圖1-4所示,主CRLSP是Device A→Device B→Device C→Device D,Bypass隧道是Device B→Device F→Device C。

圖1-4 FRR鏈路保護示意圖

 

 

·     節點保護:又稱為Next-next-hop(NNHOP)保護。PLR和MP之間通過一台設備連接,主CRLSP經過這台設備。當這台設備失效時,流量可以切換到Bypass隧道上。如圖1-5所示,主CRLSP是Device A→Device B→Device C→Device D→Device E,Bypass隧道是Device B→Device F→Device D,Device C是被保護的設備。

圖1-5 FRR節點保護示意圖

 

 

1.1.12   DiffServ-Aware TE

DiffServ作為一種QoS解決方案,其主要實現機製是對流量按照服務類型(class of service)進行劃分,基於服務類型提供不同的QoS保證。而MPLS TE作為流量工程解決方案,主要用於對網絡資源的使用進行優化。

DiffServ-Aware TE,簡稱DS-TE,結合上述兩者的優勢,能夠基於按服務類型劃分的流量進行網絡資源優化,即對不同的服務類型進行不同的帶寬約束。概括來說,DS-TE將不同服務類型的流量與CRLSP進行映射,使流量經過的路徑符合對其服務類型的流量工程約束條件。

目前,設備支持兩種DS-TE模式:

·     自定義的Prestandard模式

·     根據RFC 4124、RFC 4125、RFC 4127實現的IETF模式

1. DS-TE基本概念

·     CT(Class Type,服務類型):流量所屬的業務類別,用來實現對不同的流量進行分類。DS-TE根據業務流所屬的CT為其分配鏈路帶寬、實施約束路由及進行準入控製。對於一個給定的業務流,在其經過的所有鏈路上,該業務流都屬於相同的CT。

·     BC(Bandwidth Constraint,帶寬約束):用來對各種服務類型流量所能使用的帶寬進行限製。

·     帶寬約束模型(Bandwidth Constraint Model):用來實現對不同CT的業務流進行帶寬約束的算法。帶寬約束模型由兩部分內容決定:最大BC數目、BC與CT的對應關係。DS-TE支持兩種帶寬約束模型RDM(Russian Dolls Model,俄羅斯套娃模型)和MAM(Maximum Allocation Model,最大分配模型)。

·     TE class:CT及優先級的組合。如果流量屬於某個CT,則傳輸該流量的MPLS TE隧道的建立優先級或保持優先級必須是該CT對應的優先級。

說明

Prestandard模式和IETF模式具有如下區別,請根據服務類型的數量、所需帶寬約束模型等選擇合適的DS-TE模式。

·     Prestandard模式支持2個CT(CT 0和CT 1),8種優先級,最大支持16個TE class;IETF模式支持4個CT(CT 0、CT 1、CT 2和CT 3),8種優先級,最大支持8個TE class。

·     Prestandard模式下不可以通過配置改變TE class;IETF模式下可以通過配置改變TE class。

·     Prestandard模式隻支持RDM模型;IETF模式支持RDM模型和MAM模型。

·     Prestandard模式為自定義模式,無法與所有廠商設備互通;IETF模式為根據RFC標準實現的模式,可以與其他廠商設備互通。

 

2. DS-TE工作原理

根據流量的服務類型建立MPLS TE隧道的過程如下:

(1)     判斷流量所屬的CT

設備上根據配置實現不同業務流量的分類:

¡     對於動態建立的MPLS TE隧道,在隧道接口下執行mpls te bandwidth命令,可以配置通過該隧道接口的流量所屬的CT。

¡     對於靜態建立的MPLS TE隧道,配置靜態隧道時,可以通過bandwidth參數指定通過該靜態隧道轉發的流量所屬的CT。

(2)     檢查CT對應的BC中是否存在足夠的帶寬

用戶可以在接口下通過mpls te max-reservable-bandwidth命令,配置該接口的帶寬限製。設備根據流量所屬的CT及接口的帶寬限製,判斷是否存在足夠的帶寬為該流量建立MPLS TE隧道。

不同帶寬約束模型下,BC與CT的關係不同:

¡     RDM:限製多種服務類型流量(CT)的共用帶寬,允許多種CT間共享使用帶寬,而不是限製某一種CT的帶寬。如圖1-6所示,以三個CT(CT 0、CT 1和CT 2)為例,BC 2為CT 2的帶寬限製,即屬於CT 2流量的帶寬總和不能超過BC 2;BC 1為CT 2和CT 1兩種業務的帶寬限製,即屬於CT 2和CT 1流量的帶寬總和不能超過BC 1;BC 0為CT 2、CT 1和CT 0三種業務的帶寬限製,即屬於CT 2、CT 1和CT 0流量的帶寬總和不能超過BC 0。在RDM中,BC 0即為鏈路的最大可預留帶寬。RDM與建立優先級/保持優先級配合,可以實現CT間的帶寬隔離。RDM比較適用於屬於CT的流量不平穩、可能存在突發流量的情況。

圖1-6 RDM帶寬約束模型示意圖

 

¡     MAM:限製某一CT在接口上占用的帶寬總和,即隔離CT之間的帶寬使用。如圖1-7所示,以三個CT(CT 0、CT 1和CT 2)為例,BC 0為CT 0的帶寬限製,即屬於CT 0流量的帶寬總和不能超過BC 0;BC 1為CT 1的帶寬限製,即屬於CT 1流量的帶寬總和不能超過BC 1;以此類推。並且,屬於CT 0、CT 1和CT 2流量的帶寬總和不能超過最大可預留帶寬。MAM不需要與建立優先級/保持優先級配合,就可以實現CT間的帶寬隔離。MAM的特點是比較直觀,配置較為容易。MAM比較適用於屬於CT的流量較為平穩、不存在突發流量的情況。

圖1-7 MAM帶寬約束模型示意圖

 

(3)     檢查流量是否與已經存在的TE class匹配

根據服務類型建立MPLS TE隧道時,還需要檢查流量所屬的CT及LSP的建立優先級/保持優先級是否與已經存在的TE class匹配。要想為該流量建立隧道,必須同時滿足下麵兩個條件:

¡     隧道經過的節點上都存在與流量所屬CT、LSP建立優先級匹配的TE class;

¡     隧道經過的節點上都存在與流量所屬CT、LSP保持優先級匹配的TE class。

1.1.13  MPLS TE雙向隧道

MPLS TE隧道作為MPLS-TP(MPLS Transport Profile,MPLS傳送技術架構)的分組傳送隧道,需要實現雙向隧道功能,以支持1:1和1+1保護倒換,承載MPLS傳送所需要的OAM(Operations, Administration, and Maintenance,操作、管理和維護)和PSC(Protection State Coordination,保護狀態協調)等帶內檢測工具和信令。

一條MPLS TE雙向隧道由方向相反的一對單向CRLSP組成。MPLS TE雙向隧道的建立有如下幾種方式:

·     Co-routed方式:對RSVP-TE協議進行擴展,通過RSVP-TE信令協議建立MPLS TE雙向隧道,即通過Path消息將上遊LSR分配的標簽通告給下遊LSR,在Path消息傳遞的過程中建立一個方向的CRLSP,再通過Resv消息將下遊LSR分配的標簽通告給上遊LSR,在Resv消息傳遞的過程中建立另一個方向的CRLSP。Co-routed方式建立的MPLS TE雙向隧道的正、反兩個方向CRLSP使用的是相同的路徑。

·     Associated方式:通過配置手工將兩條方向相反的單向CRLSP綁定,從而形成MPLS TE雙向隧道。綁定在一起的兩條單向CRLSP可以通過不同的方式建立,例如一個方向上的CRLSP使用靜態方式建立,而另一個方向上的CRLSP使用RSVP-TE信令建立。綁定在一起的兩條單向CRLSP使用的路徑可以不同。

通過RSVP-TE信令協議建立MPLS TE隧道、Path消息、Resv消息的詳細介紹,請參見“MPLS配置指導”中的“RSVP”。

1.1.14  協議規範

與MPLS TE相關的協議規範有:

·     RFC 2702:Requirements for Traffic Engineering Over MPLS

·     RFC 3564:Requirements for Support of Differentiated Service-aware MPLS Traffic Engineering

·     RFC 3812:Multiprotocol Label Switching (MPLS) Traffic Engineering (TE) Management Information Base (MIB)

·     RFC 4124:Protocol Extensions for Support of Diffserv-aware MPLS Traffic Engineering

·     RFC 4125:Maximum Allocation Bandwidth Constraints Model for Diffserv-aware MPLS Traffic Engineering

·     RFC 4127:Russian Dolls Bandwidth Constraints Model for Diffserv-aware MPLS Traffic Engineering

·     ITU-T Recommendation Y.1720:Protection switching for MPLS networks

·     RFC 4655:A Path Computation Element (PCE)-Based Architecture

·     RFC 5088:OSPF Protocol Extensions for Path Computation Element Discovery

·     RFC 5440:Path Computation Element (PCE) Communication Protocol (PCEP)

·     RFC 5441:A Backward-Recursive PCE-Based Computation (BRPC) Procedure to Compute Shortest Constrained Inter-Domain Traffic Engineering LSP

·     RFC 5455:Diffserv-Aware Class-Type Object for the Path Computation Element Communication Protocol

·     RFC 5521:Extensions to the Path Computation Element Communication Protocol (PCEP) for Route Exclusions

·     RFC 5886:A Set of Monitoring Tools for Path Computation Element (PCE)-Based Architecture

·     draft-ietf-pce-stateful-pce-07

1.2  MPLS TE配置任務簡介

1.2.1  靜態建立CRLSP

靜態建立CRLSP配置任務如下:

(1)     開啟MPLS TE能力

MPLS TE隧道經過的各個節點和接口上均需進行本配置。

(2)     配置Tunnel接口

在MPLS TE隧道的Ingress節點上執行本配置。

(3)     (可選)配置DiffServ-Aware TE

在MPLS TE隧道經過的所有節點上均可執行本配置。

(4)     創建靜態CRLSP

MPLS TE隧道經過的各個節點上均需進行本配置。

配置方法請參見“MPLS配置指導”中的“靜態CRLSP”。

(5)     配置MPLS TE隧道采用靜態CRLSP

在MPLS TE隧道的Ingress節點上執行本配置。

(6)     配置流量轉發

請選擇以下一項進行配置:

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

¡     配置自動路由發布使流量沿MPLS TE隧道轉發

在MPLS TE隧道的Ingress節點上執行本配置。

(7)     (可選)配置MPLS TE雙向隧道

在MPLS TE隧道的Ingress節點和Egress上執行本配置。

(8)     (可選)開啟告警功能

1.2.2  動態建立CRLSP

動態建立CRLSP配置任務如下:

(1)     開啟MPLS TE能力和RSVP能力

¡     開啟MPLS TE能力

¡     開啟RSVP能力

開啟RSVP能力配置方法請參見“MPLS配置指導”中的“RSVP”。

MPLS TE隧道經過的各個節點和接口上均需進行本配置。

(2)     配置Tunnel接口

在MPLS TE隧道的Ingress節點上執行本配置。

(3)     (可選)配置DiffServ-Aware TE

在MPLS TE隧道經過的所有節點上均可執行本配置。

(4)     配置MPLS TE隧道采用RSVP-TE動態建立的CRLSP

a.     配置鏈路的MPLS TE屬性

在MPLS TE隧道經過的各個接口上均需執行本配置。

b.     配置通過IGP的TE擴展發布鏈路的MPLS TE屬性

在MPLS TE隧道經過的各個節點上均需執行本配置。

c.     配置MPLS TE隧道的約束條件

在MPLS TE隧道的Ingress節點上執行本配置。

d.     使用RSVP-TE建立MPLS TE隧道

在MPLS TE隧道的Ingress節點上執行本配置。

e.     (可選)調整CRLSP的路徑選擇

f.     (可選)調整MPLS TE隧道的建立

在MPLS TE隧道的Ingress節點上執行本配置。

(5)     配置流量轉發

請選擇以下一項進行配置:

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

¡     配置自動路由發布使流量沿MPLS TE隧道轉發

在MPLS TE隧道的Ingress節點上進行配置。

(6)     (可選)配置MPLS TE雙向隧道

在MPLS TE隧道的Ingress節點和Egress上執行本配置。

(7)     (可選)配置MPLS TE高可靠性

¡     配置CRLSP備份

請在MPLS TE隧道的Ingress節點上執行本配置。

¡     配置MPLS TE快速重路由

請在主CRLSP的Ingress節點上開啟快速重路由功能。

(8)     (可選)開啟告警功能

1.2.3  采用PCE計算的路徑建立CRLSP

采用PCE計算的路徑建立CRLSP配置任務如下:

(1)     開啟MPLS TE能力和RSVP能力

¡     開啟MPLS TE能力

¡     開啟RSVP能力

開啟RSVP能力配置方法請參見“MPLS配置指導”中的“RSVP”。

MPLS TE隧道經過的各個節點和接口上均需進行本配置。

(2)     配置Tunnel接口

在MPLS TE隧道的Ingress節點上執行本配置。

(3)     (可選)配置DiffServ-Aware TE

在MPLS TE隧道經過的所有節點上均可執行本配置。

(4)     發布鏈路的MPLS TE屬性,並配置MPLS TE隧道的約束條件

a.     配置鏈路的MPLS TE屬性

在MPLS TE隧道經過的各個接口上均需執行本配置。

b.     配置通過IGP的TE擴展發布鏈路的MPLS TE屬性

在MPLS TE隧道經過的各個節點上均需執行本配置。

c.     配置MPLS TE隧道的約束條件

在MPLS TE隧道的Ingress節點上執行本配置。

(5)     配置MPLS TE隧道采用PCE計算的路徑建立CRLSP

a.     配置PCE

請在作為PCE設備上執行本配置。PCE設備既可以是隧道經過的節點,也可以是隧道未經過的節點。

b.     配置PCE發現

請在PCC設備上執行本配置。

c.     配置使用PCE計算路徑

請在PCC設備上執行本配置。

d.     使用RSVP-TE建立MPLS TE隧道

在MPLS TE隧道的Ingress節點上執行本配置。

e.     (可選)配置PCEP會話參數

請在PCC設備上執行本配置。

(6)     配置流量轉發

請選擇以下一項進行配置:

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

¡     配置自動路由發布使流量沿MPLS TE隧道轉發

在MPLS TE隧道的Ingress節點上進行配置。

(7)     (可選)配置MPLS TE雙向隧道

在MPLS TE隧道的Ingress節點和Egress上執行本配置。

(8)     (可選)配置MPLS TE高可靠性

¡     配置CRLSP備份

請在MPLS TE隧道的Ingress節點上執行本配置。

¡     配置MPLS TE快速重路由

請在主CRLSP的Ingress節點上開啟快速重路由功能。

(9)     (可選)開啟告警功能

1.3  MPLS TE配置準備

在配置MPLS TE前,需要完成以下任務:

·     配置靜態路由或IGP協議保證各LSR之間路由可達。

·     使能MPLS功能,詳細配置請參見“MPLS配置指導”中的“MPLS基礎”。

1.4  開啟MPLS TE能力

(1)     進入係統視圖。

system-view

(2)     開啟本節點的MPLS TE能力,並進入MPLS TE視圖。

mpls te

缺省情況下,MPLS TE能力處於關閉狀態。

(3)     退回係統視圖。

quit

(4)     進入接口視圖。

interface interface-type interface-number

(5)     開啟接口的MPLS TE能力。

mpls te enable

缺省情況下,接口上的MPLS TE能力處於關閉狀態。

1.5  配置Tunnel接口

1. 功能簡介

MPLS TE隧道的屬性都是在Tunnel接口視圖下配置的。因此,在配置MPLS TE隧道之前,需要先創建MPLS TE隧道模式的Tunnel接口。有關Tunnel接口的介紹和更多配置請參見“三層技術-IP業務配置指導”中的“隧道”。

在MPLS TE隧道的Ingress節點上執行本配置。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     創建模式為MPLS TE隧道的Tunnel接口,並進入Tunnel接口視圖。

interface tunnel tunnel-number mode mpls-te

(3)     配置Tunnel接口的IP地址。

ip address ip-address { mask-length | mask }

缺省情況下,未指定Tunnel接口的IP地址。

(4)     配置隧道的目的端地址。

destination ip-address

缺省情況下,未指定隧道的目的端地址。

1.6  配置DiffServ-Aware TE

1. 功能簡介

在MPLS TE隧道經過的所有節點上均可配置DiffServ-Aware TE。

2. 配置指導

(1)     進入係統視圖。

system-view

(2)     進入MPLS TE視圖。

mpls te

(3)     配置DS-TE模式。

¡     配置DS-TE模式為IETF模式。

ds-te mode ietf

¡     配置DS-TE模式為Prestandard模式。

undo ds-te mode ietf

缺省情況下,DS-TE模式為Prestandard模式。

(4)     配置IETF DS-TE模式下的帶寬約束模型。

¡     配置IETF DS-TE模式下的帶寬約束模型為MAM

ds-te bc-model mam

¡     配置IETF DS-TE模式下的帶寬約束模型為RDM

undo ds-te bc-model mam

缺省情況下,IETF DS-TE模式的帶寬約束模型為RDM。

(5)     配置IETF DS-TE模式下TE class與服務類型、優先級的對應關係。

ds-te te-class te-class-index class-type class-type-number priority priority

缺省情況下,IETF模式的TE class如表1-1所示。

表1-1 IETF模式的缺省TE class

TE Class

CT

Priority

0

0

7

1

1

7

2

2

7

3

3

7

4

0

0

5

1

0

6

2

0

7

3

0

 

1.7  配置MPLS TE隧道采用靜態CRLSP

1. 功能簡介

在MPLS TE隧道的Ingress節點上需要配置MPLS TE隧道采用靜態CRLSP。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置使用靜態CRLSP建立MPLS TE隧道。

mpls te signaling static

缺省情況下,MPLS TE使用RSVP-TE信令協議建立隧道。

(4)     指定隧道引用的靜態CRLSP。

mpls te static-cr-lsp lsp-name

缺省情況下,隧道沒有引用任何靜態CRLSP。

引用的CRLSP必須存在。靜態CRLSP的配置方法請參見“MPLS配置指導”中的“靜態CRLSP”。

1.8  配置鏈路的MPLS TE屬性

(1)     進入係統視圖。

system-view

(2)     進入接口視圖。

interface interface-type interface-number

(3)     配置用於轉發MPLS TE流量的鏈路最大帶寬。

mpls te max-link-bandwidth { bandwidth-value| percent percent-bandwidth }

缺省情況下,用於轉發MPLS TE流量的鏈路最大帶寬為0。

(4)     配置最大可預留帶寬。請根據“1.6  配置DiffServ-Aware TE”中配置的DS-TE模式和帶寬約束模型選擇其中一項進行配置。

¡     配置Prestandard DS-TE模式下RDM帶寬約束模型BC 0和BC 1的最大可預留帶寬。

mpls te max-reservable-bandwidth { bandwidth-value [ bc1 bc1-bandwidth ] | percent percent-bandwidth [ bc1 bc1-percent-bandwidth ] }

¡     配置IETF DS-TE模式下MAM帶寬約束模型的MPLS TE鏈路最大可預留帶寬及各BC的最大可預留帶寬。

mpls te max-reservable-bandwidth mam { bandwidth-value { bc0 bc0-bandwidth | bc1 bc1-bandwidth | bc2 bc2-bandwidth | bc3 bc3-bandwidth } * | percent percent-bandwidth { bc0 bc0-percent-bandwidth | bc1 bc1-percent-bandwidth | bc2 bc2-percent-bandwidth | bc3 bc3-percent-bandwidth } * }

¡     配置IETF DS-TE模式RDM帶寬約束模型各BC的最大可預留帶寬。

mpls te max-reservable-bandwidth rdm { bandwidth-value [ bc1 bc1-bandwidth ] [ bc2 bc2-bandwidth ] [ bc3 bc3-bandwidth ] | percent percent-bandwidth [ bc1 bc1-percent-bandwidth ] [ bc2 bc2-percent-bandwidth ] [ bc3 bc3-percent-bandwidth ] }

缺省情況下,最大可預留帶寬均為0。

在RDM模型中,BC 0即為鏈路的最大可預留帶寬。

(5)     配置鏈路的屬性。

mpls te link-attribute attribute-value

缺省情況下,鏈路的屬性值為0x00000000。

1.9  配置通過IGP的TE擴展發布鏈路的MPLS TE屬性

1.9.1  功能簡介

OSPF、IS-IS擴展後可以用來發布鏈路的MPLS TE相關屬性。OSPF、IS-IS的這種擴展分別稱為OSPF TE和IS-IS TE。如果同時配置了OSPF TE和IS-IS TE,則MPLS TE優先根據OSPF TE學習到的MPLS TE屬性信息進行CSPF計算。

1.9.2  配置限製和指導

如果不配置IGP的TE擴展,就不能形成TEDB。這種情況下計算出的路徑是由IGP路由得到的,而不是CSPF計算出來的。

1.9.3  配置OSPF TE

1. 功能簡介

OSPF TE使用Opaque Type 10 LSA攜帶鏈路的TE屬性信息,因此,配置OSPF TE時必須先使能OSPF的Opaque能力。有關OSPF Opaque能力的介紹請參見“三層技術-IP路由配置指導”中的“OSPF”。

2. 配置限製和指導

由於MPLS TE無法在OSPF虛連接上預留資源和分配標簽,即MPLS TE無法通過OSPF虛連接建立CRLSP隧道。因此,配置OSPF TE時,OSPF路由域內不能存在虛連接。

3. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入OSPF協議視圖。

ospf [ process-id ]

(3)     使能OSPF的Opaque LSA發布接收能力。

opaque-capability enable

缺省情況下,OSPF的Opaque LSA發布接收能力處於開啟狀態。

本命令的詳細介紹,請參見“三層技術-IP路由命令參考”中的“OSPF”。

(4)     進入OSPF的區域視圖。

area area-id

(5)     開啟OSPF區域的MPLS TE能力。

mpls te enable

缺省情況下,OSPF區域的MPLS TE能力處於關閉狀態。

1.9.4  配置IS-IS TE

1. 功能簡介

IS-IS TE使用擴展IS可達性TLV(類型為22)的子TLV攜帶TE屬性信息,擴展IS可達性TLV攜帶wide類型的開銷值。因此,配置IS-IS TE時,必須配置IS-IS的開銷值類型為widecompatiblewide-compatible。有關IS-IS的介紹請參見“三層技術-IP路由配置指導”中的“IS-IS”。

2. 配置限製和指導

IS可達性TLV長度不定,為確保IS-IS LSP能順利攜帶此類TLV並在網絡上正確泛洪,建議所有使能IS-IS TE的接口的MTU不要小於512字節。

3. 配置步驟

(1)     進入係統視圖。

system-view

(2)     創建一個IS-IS進程,並進入IS-IS視圖。

isis [ process-id ]

(3)     配置IS-IS開銷值的類型。

cost-style { narrow | wide | wide-compatible | { compatible | narrow-compatible } [ relax-spf-limit ] }

缺省情況下,IS-IS隻接收和發送采用narrow方式表示路徑開銷值的報文。

本命令的詳細介紹,請參見“三層技術-IP路由命令參考”中的“IS-IS”。

(4)     開啟IS-IS進程的MPLS TE能力。

mpls te enable [ level-1 | level-2 ]

缺省情況下,IS-IS進程的MPLS TE能力處於關閉狀態。

(5)     配置攜帶DS-TE參數的子TLV的類型值。

te-subtlv { bw-constraint value | unreserved-subpool-bw value } *

缺省情況下,帶寬約束bw-constraint的子TLV類型值為252;子池未預訂帶寬unreserved-bw-sub-pool的子TLV類型值為251。

1.10  配置MPLS TE隧道的約束條件

1.10.1  配置MPLS TE隧道的帶寬要求

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置隧道所需的帶寬,並指定隧道流量所屬的服務類型。

mpls te bandwidth [ ct0 | ct1 | ct2 | ct3 ] bandwidth

缺省情況下,未配置MPLS TE隧道所需的帶寬,即帶寬為0,隧道流量屬於CT0。

1.10.2  配置MPLS TE隧道的親和屬性

1. 功能簡介

不同廠商實現的鏈路屬性和親和屬性的關係可能有所不同,當在同一網絡中使用不同廠商的設備時,需要事先了解各自的實現方式,正確配置鏈路的屬性和隧道的親和屬性,以便準確建立隧道。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置隧道的親和屬性。

mpls te affinity-attribute attribute-value [ mask mask-value ]

缺省情況下,隧道的親和屬性為0x00000000,掩碼為0x00000000,即隧道可以使用任意屬性的鏈路。

1.10.3  配置MPLS TE隧道的建立優先級和保持優先級

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置MPLS TE隧道的建立優先級和保持優先級。

mpls te priority setup-priority [ hold-priority ]

缺省情況下,建立優先級和保持優先級都為7。

1.10.4  配置顯式路徑

1. 功能簡介

顯式路徑由一係列節點構成,一條顯式路徑上的兩個相鄰節點之間存在兩種關係:

·     嚴格下一跳(strict):兩個節點必須直接相連;

·     鬆散下一跳(loose):兩個節點之間可以存在其他設備。

2. 配置限製和指導

在不同的區域或自治係統之間建立MPLS TE隧道時必須使用鬆散顯式路徑,指定顯式路徑的下一跳為ABR(Area Border Router,區域邊界路由器)或ASBR(Autonomous System Boundary Router,自治係統邊界路由器),並保證隧道Ingress節點與ABR或ASBR之間路由可達。

3. 配置步驟

(1)     進入係統視圖。

system-view

(2)     創建隧道的顯式路徑,並進入顯式路徑視圖。

explicit-path path-name

(3)     啟用顯式路徑。

undo disable

缺省情況下,顯式路徑可用。

(4)     在顯式路徑中添加或修改節點及其屬性。

nexthop [ index index-number ] ip-address [ exclude | include [ loose | strict ] ]

在向顯式路徑中增加或修改節點時,參數include表示建立的CRLSP必須經過指定節點;參數exclude表示建立的CRLSP不能經過指定節點。

缺省情況下,顯式路徑中不存在任何節點。

(5)     退回係統視圖。

quit

(6)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(7)     配置CRLSP應用顯式路徑,並指定顯式路徑的優先級。

mpls te path preference value explicit-path path-name [ no-cspf ]

缺省情況下,使用自動計算的路徑建立CRLSP。

1.11  使用RSVP-TE建立MPLS TE隧道

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置使用RSVP-TE信令協議建立隧道。

mpls te signaling rsvp-te

缺省情況下,MPLS TE使用RSVP-TE信令協議建立隧道。

(4)     配置CRLSP應用的路徑及路徑的優先級。

mpls te path preference value { dynamic | explicit-path path-name } [ no-cspf ]

缺省情況下,使用自動計算的路徑建立CRLSP。

1.12  調整CRLSP的路徑選擇

1.12.1  功能簡介

CSPF使用TEDB和約束條件計算出符合要求的路徑,並通過信令協議建立CRLSP。MPLS TE提供多種方式影響CSPF的計算,從而調整CRLSP的路徑選擇。

1.12.2  配置限製和指導

在實施本節的配置任務之前,需要明確理解這些配置對係統可能造成的影響,以免影響CRLSP的建立。

1.12.3  配置選路使用的度量

1. 功能簡介

在MPLS TE中每條鏈路都具有兩種度量值:IGP度量值和TE度量值。通過合理地規劃兩種度量值,可以實現為不同種類的業務選擇不同的隧道。例如,使用IGP度量值來表示鏈路延遲的大小(IGP度量值越小,鏈路的延遲越小),使用TE度量值來表示鏈路帶寬的大小(TE度量值越小,鏈路的帶寬越大)。建立兩條MPLS TE隧道(Tunnel1和Tunnel2),分別用來承載語音業務和視頻業務。Tunnel1選擇路徑時使用IGP度量值,可以實現為延遲要求較高的語音業務選擇延遲小的路徑;Tunnel2選擇路徑時使用TE度量值,可以實現為數據量較大的視頻業務選擇帶寬大的路徑。

隧道選路時使用的鏈路度量值類型可以在全局配置也可以在接口配置,如果在Tunnel接口視圖下配置了鏈路度量值類型,則該隧道使用本接口下配置的度量值類型選擇路徑;否則,使用MPLS TE視圖下全局配置的度量值類型選擇路徑。

在Ingress節點上全局配置隧道選路時使用的鏈路度量值類型。在Ingress節點的Tunnel接口上配置隧道選路時使用的鏈路度量值類型。

2. 全局配置隧道選路時使用的鏈路度量值類型

(1)     進入係統視圖。

system-view

(2)     進入MPLS TE視圖。

mpls te

(3)     配置全局隧道選路時使用的鏈路度量值類型。

path-metric-type { igp | te }

缺省情況下,未配置度量類型的隧道選路時使用TE度量值。

3. 配置接口隧道選路時使用的鏈路度量值類型

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置接口隧道選路時使用的鏈路度量值類型。

mpls te path-metric-type { igp | te }

缺省情況下,沒有指定隧道選路時使用的鏈路度量值類型,采用MPLS TE視圖下配置的鏈路度量值類型。

4. 配置鏈路的TE度量值。

(1)     進入係統視圖。

system-view

(2)     進入接口視圖。

interface interface-type interface-number

(3)     配置鏈路的TE度量值。

mpls te metric value

缺省情況下,鏈路使用其IGP度量作為TE的度量值。

在隧道經過的所有接口上配置鏈路的TE度量值。

1.12.4  配置路由固定

1. 功能簡介

請在MPLS TE隧道的Ingress節點上配置路由固定。

2. 配置限製和指導

如果使用路由固定功能,則不能同時使用MPLS TE隧道重優化功能。

3. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     開啟路由固定功能。

mpls te route-pinning

缺省情況下,路由固定功能處於關閉狀態。

1.12.5  配置隧道重優化

1. 功能簡介

通過在MPLS TE隧道的Ingress節點上配置隧道功能,周期性地或通過命令行手工觸發隧道的Ingress節點重新計算路徑。如果重計算的路徑優於當前路徑,則沿著計算出的路徑創建一條新的CRLSP,將流量從舊的CRLSP切換至新的CRLSP後,刪除舊的CRLSP。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     開啟隧道重優化功能。

mpls te reoptimization [ frequency seconds ]

缺省情況下,隧道重優化功能處於關閉狀態。

(4)     (可選)立即對所有開啟了重優化功能的MPLS TE隧道進行重優化。

a.     退回用戶視圖。

return

b.     立即對所有開啟了重優化功能的MPLS TE隧道進行重優化。

mpls te reoptimization

1.12.6  配置TE信息泛洪閾值及泛洪時間間隔

1. 功能簡介

可以在MPLS TE隧道經過的所有節點上配置TE信息泛洪閾值及泛洪時間間隔。當MPLS TE相關鏈路的帶寬發生變化時,需要通過IGP泛洪該信息,以便Ingress節點利用CSPF算法重新計算路徑。

為防止鏈路帶寬變化導致的CSPF計算占用過多資源,可以規定當帶寬變化到達一定限度時才通過IGP泛洪鏈路的TE相關信息。用戶可以進行兩種配置:

·     當鏈路可預留帶寬的增加值達到閾值時進行泛洪;

·     當鏈路可預留帶寬的減少值達到閾值時進行泛洪。

如果配置了泛洪閾值,則沒有及時泛洪的鏈路帶寬變化,可以按照配置的時間間隔周期性地通告給網絡中的設備。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入接口視圖。

interface interface-type interface-number

(3)     配置通過IGP泛洪TE信息的帶寬變化閾值。

mpls te bandwidth change thresholds { down | up } percent

缺省情況下,通過IGP泛洪TE信息的帶寬變化閾值為10%,即可預留帶寬增加或減少10%時進行IGP泛洪。

(4)     退回係統視圖。

quit

(5)     進入MPLS TE視圖。

mpls te

(6)     設置通過IGP周期性泛洪TE信息的時間間隔。

link-management periodic-flooding timer interval

缺省情況下,通過IGP周期性泛洪TE信息的時間間隔為180秒。

1.13  調整MPLS TE隧道的建立

1.13.1  功能簡介

可在MPLS TE隧道的Ingress節點上調整MPLS TE隧道的建立。

1.13.2  配置限製和指導

在實施本節的配置任務之前,需要明確理解這些配置對係統可能造成的影響,以免影響MPLS TE隧道的建立。

1.13.3  配置環路檢測

1. 功能簡介

配置隧道建立時進行環路檢測後,將自動啟動該隧道的路由記錄功能,而不管用戶是否配置了mpls te record-route命令。隧道經過的節點根據記錄的路由信息,判斷是否出現環路。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置隧道建立時進行環路檢測。

mpls te loop-detection

缺省情況下,隧道建立時不進行環路檢測。

1.13.4  配置記錄路由和標簽

1. 功能簡介

路由記錄和標簽記錄功能用來記錄MPLS TE隧道經過的各個節點及各個節點分配的標簽值,以便用戶根據記錄的信息了解MPLS TE隧道經過的路徑和標簽分配情況。在MPLS TE隧道出現故障時,用戶也可以根據記錄的信息對故障進行定位。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     開啟隧道的路由記錄或標簽記錄功能。

¡     僅開啟路由記錄功能。

mpls te record-route

¡     同時開啟路由記錄和標簽記錄功能。

mpls te record-route label

缺省情況下,隧道的路由記錄和標簽記錄功能處於關閉狀態。

1.13.5  配置隧道重建

1. 功能簡介

MPLS TE隧道建立失敗後,隧道的Ingress節點等待隧道重建時間間隔後,將嚐試重新建立隧道,直到隧道建立成功或嚐試建立隧道的次數達到配置的最大值。如果嚐試建立隧道的次數達到配置的最大值時仍未成功建立隧道,則等待較長的一段時間後,重複上述過程。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置嚐試建立隧道的最大次數。

mpls te retry retries

缺省情況下,嚐試建立隧道的最大次數為3次。

(4)     配置隧道重建的時間間隔。

mpls te timer retry seconds

缺省情況下,隧道重建的時間間隔為2秒。

1.13.6  配置RSVP資源預留風格

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置隧道的資源預留風格。

mpls te resv-style { ff | se }

缺省情況下,隧道的資源預留風格為SE。

在目前的MPLS TE應用中,隧道的建立通常采用make-before-break方式。因此,推薦使用SE資源預留風格。

1.14  配置MPLS TE隧道采用PCE計算的路徑建立CRLSP

1.14.1  配置PCE

1. 功能簡介

通過在LSR設備上配置PCE的IP地址,可將LSR設備配置為PCE。如果未配置PCE的IP地址,則LSR設備隻能作為PCC,並使用LSR ID與PCE通信。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入MPLS TE視圖。

mpls te

(3)     配置PCE的IP地址。

pce address ip-address

缺省情況下,未配置PCE的IP地址。

1.14.2  配置PCE發現

1. 功能簡介

可通過pce static命令靜態指定PCE設備,也可通過OSPF TE自動發現PCE對等體。PCC隻能向PCE發起PCEP連接請求,不接受PCE的PCEP連接請求。

2. 靜態指定PCE

(1)     進入係統視圖。

system-view

(2)     進入MPLS TE視圖。

mpls te

(3)     靜態指定PCE對等體的IP地址。

pce static ip-address

3. 動態發現PCE

配置OSPF TE後,OSPF TE會將PCE的IP地址發布到網絡中,以便PCC或其他PCE動態發現該PCE,並與其建立PCEP會話。OSPF TE的配置請參見“1.9.3  配置OSPF TE”。

1.14.3  配置使用PCE計算路徑

1. 功能簡介

在LSR設備上通過mpls te path命令指定使用PCE計算的路徑建立CRLSP後,該LSR設備即作為PCC。

如果使用mpls te path命令或mpls te backup-path命令指定了PCE的IP地址,則僅與指定的PCE建立PCEP會話;否則與所有發現的PCE建立會話。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     配置使用PCE計算的路徑建立CRLSP。

mpls te path preference value dynamic  pce [ ip-address ]&<0-8>

缺省情況下,使用LSR自動計算的路徑建立CRLSP。

1.14.4  配置PCEP會話參數

1. 功能簡介

PCC或PCE通過靜態或動態方式發現PCE後,會與該PCE建立PECP會話。通過本配置,可以根據網絡情況調整PCEP會話參數。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入MPLS TE視圖。

mpls te

(3)     配置發送路徑計算請求後等待應答的超時時間。

pce request-timeout value

缺省情況下,發送路徑計算請求後等待應答的超時時間為10秒。

(4)     配置PCEP會話的保持時間。

pce deadtimer value

缺省情況下,PCEP會話的保持時間為120秒。

(5)     配置PCEP會話的Keepalive消息的發送時間間隔。

pce keepalive interval

缺省情況下,Keepalive消息的發送時間間隔為30秒。

(6)     配置本地設備對PCE對等體發送的消息的容忍度。

pce tolerance { min-keepalive value | max-unknown-messages value }

缺省情況下,能接受的對等體發送Keepalive消息的最小時間間隔為10秒;每分鍾能接受的對等體發送的最大未知類型消息個數為5。

1.15  配置流量轉發

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

(1)     進入係統視圖。

system-view

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

ip route-static { dest-address { mask-length | mask } | group group-name } { interface-type interface-number [ next-hop-address ] [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] [ permanent ] | bfd { control-packet | echo-packet } | permanent | track track-entry-number ] | next-hop-address [ bfd control-packet bfd-source ip-address | permanent | track track-entry-number ] | vpn-instance d-vpn-instance-name next-hop-address [ bfd control-packet bfd-source ip-address | permanent | track track-entry-number ] } [ preference preference ] [ tag tag-value ] [ description text ]

本命令中指定的接口為MPLS TE隧道模式的Tunnel接口。

本配置中命令的詳細介紹,請參見“三層技術-IP路由命令參考”中的“靜態路由”。

1.15.2  配置自動路由發布使流量沿MPLS TE隧道轉發

1. 配置限製和指導

使用自動路由發布功能時,需要注意以下事項:

·     MPLS TE隧道的目的地址可以配置為Egress節點的LSR ID或Egress節點上接口的主IP地址。配置為接口主IP地址時,要求該接口上必須使能MPLS TE能力,並配置OSPF或IS-IS路由協議,確保在該接口建立OSPF或IS-IS鄰居關係,接口的主地址能夠通過OSPF或IS-IS發布給鄰居。推薦用戶將MPLS TE隧道的目的地址配置為Egress節點的LSR ID。

·     Tunnel接口地址和隧道目的地址對應的路由必須在同一個OSPF區域內或屬於同一個IS-IS Level。

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

僅使用RSVP-TE信令協議建立的MPLS TE隧道支持轉發鄰接功能。

2. 配置準備

配置自動路由發布前,需要完成以下操作:

·     在Tunnel接口上開啟OSPF或IS-IS路由協議,以便將該接口的地址發布到IGP協議(OSPF或ISIS)中。

·     在OSPF區域視圖或IS-IS視圖下,執行mpls te enable命令開啟OSPF區域或IS-IS進程的MPLS TE能力。

3. 配置IGP Shortcut

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     開啟IGP Shortcut功能。

mpls te igp shortcut [ isis | ospf ]

缺省情況下,IGP Shortcut功能處於關閉狀態。

如果開啟IGP Shortcut功能時不指定IGP類型,則OSPF和IS-IS協議的路由計算中都考慮MPLS TE隧道。

(4)     配置MPLS TE隧道的度量值。

mpls te igp metric { absolute value | relative value }

缺省情況下,MPLS TE隧道的度量值等於其IGP度量值。

度量值類型

度量值

絕對度量(absolute

實際配置的值

相對度量(relative

IGP路徑度量值加上相對度量值

 

4. 配置轉發鄰接

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     開啟轉發鄰接功能。

mpls te igp advertise [ hold-time value ]

缺省情況下,轉發鄰接功能處於關閉狀態。

1.16  配置MPLS TE雙向隧道

1. 配置限製和指導

配置MPLS TE雙向隧道時,需要在隧道的兩端都建立MPLS TE隧道接口,並在隧道接口下開啟雙向隧道功能。

·     對於Co-routed方式雙向隧道,隧道的兩端需要分別配置為主動方(Active)和被動方(Passive),在被動方需要指定關聯的反向CRLSP。

·     對於Associated方式雙向隧道,隧道的兩端都需要指定關聯的反向CRLSP,隻配置一端會導致MPLS TE雙向隧道無法建立。

·     在MPLS TE隧道的Ingress節點和Egress上執行本配置。

2. 配置準備

在配置MPLS TE雙向隧道之前,需完成以下任務:

·     在隧道兩端都關閉PHP功能。

·     建立Co-routed方式MPLS TE雙向隧道前,必須配置建立隧道使用的信令協議為RSVP-TE。

3. 配置Co-routed方式MPLS TE雙向隧道的主動方

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     在MPLS TE隧道接口上開啟雙向隧道功能,並指定本端為Co-routed方式MPLS TE雙向隧道的主動方。

mpls te bidirectional co-routed active

缺省情況下,MPLS TE隧道接口的雙向隧道功能處於關閉狀態,MPLS TE隧道接口上建立的隧道為MPLS TE單向隧道。

4. 配置Co-routed方式MPLS TE雙向隧道的被動方

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     在MPLS TE隧道接口上開啟雙向隧道功能,並指定本端為Co-routed方式MPLS TE雙向隧道的被動方。

mpls te bidirectional co-routed passive reverse-lsp lsr-id ingress-lsr-id tunnel-id tunnel-id

缺省情況下,MPLS TE隧道接口的雙向隧道功能處於關閉狀態,MPLS TE隧道接口上建立的隧道為MPLS TE單向隧道。

5. 配置Associated方式MPLS TE雙向隧道

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     在MPLS TE隧道接口上開啟雙向隧道功能,並指定雙向隧道建立方式為Associated方式。

mpls te bidirectional associated reverse-lsp { lsp-name lsp-name | lsr-id ingress-lsr-id tunnel-id tunnel-id } }

缺省情況下,MPLS TE隧道接口的雙向隧道功能處於關閉狀態,MPLS TE隧道接口上建立的隧道為MPLS TE單向隧道。

1.17  配置CRLSP備份

1.17.1  功能簡介

CRLSP備份用於端到端的路徑保護,對整條CRLSP提供保護。PCE方式和RSVP-TE信令協議建立的MPLS TE隧道支持CRLSP備份。

1.17.2  配置RSVP TE方式建立備份路徑

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     開啟隧道的備份功能,並配置使用的備份模式。

mpls te backup { hot-standby | ordinary }

缺省情況下,隧道的備份功能處於關閉狀態。

(4)     配置主CRLSP應用的路徑及路徑的優先級。

mpls te path preference value { dynamic | explicit-path path-name } [ no-cspf ]

缺省情況下,使用自動計算的路徑建立主CRLSP。

(5)     配置備份CRLSP應用的路徑及路徑的優先級。

mpls te backup-path preference value { dynamic | explicit-path path-name } [ no-cspf ]

mpls te backup-path preference value dynamic pce [ ip-address ]&<0-8>

缺省情況下,使用自動計算的路徑建立備份CRLSP。

1.17.3  配置使用PCE計算備份路徑

1. 功能簡介

在LSR設備上通過mpls te backup-path命令指定使用PCE計算的路徑建立CRLSP後,該LSR設備即作為PCC。

如果使用mpls te path命令或mpls te backup-path命令指定了PCE的IP地址,則僅與指定的PCE建立PCEP會話;否則與所有發現的PCE建立會話。

執行本配置後,PCE為PCC計算備份的CRLSP。當主CRLSP不可用時,將流量切換到備份的CRLSP上,以保證流量的正常傳輸。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入模式為MPLS TE隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     開啟隧道的備份功能,並配置使用的備份模式。

mpls te backup { hot-standby | ordinary }

缺省情況下,隧道的備份功能處於關閉狀態。

(4)     配置使用PCE計算的路徑建立備份CRLSP 。

mpls te backup-path preference value dynamic pce [ ip-address ]&<0-8>

缺省情況下,使用LSR自動計算的路徑建立備份CRLSP。

1.18  配置MPLS TE快速重路由

1.18.1  配置限製和指導

FRR是MPLS TE中的臨時性局部保護技術。配置FRR時需要注意:

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

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

·     如果同時配置了MPLS TE雙向隧道和快速重路由功能,快速重路由功能不生效。

1.18.2  開啟快速重路由功能

(1)     進入係統視圖。

system-view

(2)     進入主CRLSP對應的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(3)     開啟快速重路由功能。

mpls te fast-reroute [ bandwidth ]

缺省情況下,快速重路由功能處於關閉狀態。

執行本命令時,如果指定了bandwidth參數,則表示主CRLSP需要進行帶寬保護;否則,表示主CRLSP不需要進行帶寬保護。

1.18.3  在PLR上配置Bypass隧道

1. 功能簡介

配置快速重路由時,需要在PLR上配置Bypass隧道。Bypass隧道的配置方式有如下兩種:

·     手工配置Bypass隧道:在PLR上創建一條MPLS TE隧道,該MPLS TE隧道作為主CRLSP的Bypass隧道。指定該Bypass隧道可以保護的帶寬和CT類型,並在主CRLSP的出接口上將該Bypass隧道與出接口綁定。當出接口連接的鏈路或節點出現故障時,可將流量切換到Bypass隧道轉發,以避免流量中斷。

·     自動創建Bypass隧道:在PLR上開啟自動隧道備份功能後,PLR為經過它的所有主CRLSP都自動建立一條鏈路保護的Bypass隧道和一條節點保護的Bypass隧道。自動創建的Bypass隧道可以保護所有CT類型,且不限製保護帶寬,即不能夠提供帶寬保護。自動創建Bypass隧道可以簡化配置,該功能又稱為自動快速重路由(auto FRR)功能。一條自動創建的Bypass隧道可以與多條主隧道綁定。

手工為主CRLSP配置Bypass隧道或為主CRLSP自動建立Bypass隧道後,該Bypass隧道將與主CRLSP關聯。一條主CRLSP同時最多可以與3條手工創建的Bypass隧道和2條自動創建的Bypass隧道關聯,PLR從中選擇一條Bypass隧道保護主CRLSP,即為主CRLSP綁定該Bypass隧道。

PLR為主CRLSP選擇Bypass隧道時,優先選擇手工創建的Bypass隧道。如果不存在手工創建的Bypass隧道,則選擇自動創建的Bypass隧道,且自動創建的節點保護類型的Bypass隧道優於鏈路保護類型的Bypass隧道。

如果PLR上同時存在多條手工配置的Bypass隧道,則根據主CRLSP所需帶寬、主CRLSP是否需要進行帶寬保護和Bypass隧道能否提供帶寬保護來選擇Bypass隧道,且節點保護的Bypass隧道優於鏈路保護的Bypass隧道、編號小的Bypass隧道優於編號大的Bypass隧道。

2. 配置限製和指導

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

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

配置Bypass隧道時,請根據如下原則進行帶寬規劃:

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

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

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

Bypass隧道上具有如下配置限製:

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

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

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

自動創建Bypass隧道時,需要注意:

·     對於設備上自動生成的接口(例如VA接口等),僅支持自動快速重路由保護。

·     倒數第二跳節點作為PLR時,不會自動創建節點保護類型的Bypass隧道。

3. 手工配置Bypass隧道

(1)     進入係統視圖。

system-view

(2)     創建Bypass隧道。

Bypass隧道的建立方法與普通MPLS TE隧道相同,具體方法請參見“1.2.1  靜態建立CRLSP”、“1.2.2  動態建立CRLSP”或“1.2.3  采用PCE計算的路徑建立CRLSP”。

(3)     進入Bypass隧道的Tunnel接口視圖。

interface tunnel tunnel-number [ mode mpls-te ]

(4)     配置Bypass隧道的目的地址。

destination ip-address

隧道的目的地址應配置為MP設備的LSR ID。

(5)     配置Bypass隧道可以保護的帶寬和CT類型。

mpls te backup bandwidth [ ct0 | ct1 | ct2 | ct3 ] { bandwidth | un-limited }

缺省情況下,未指定Bypass隧道可以保護的帶寬和CT類型。

對於Bypass隧道,必須使用本命令配置可保護的帶寬。否則,將導致主CRLSP不能綁定到Bypass隧道。

(6)     退回係統視圖。

quit

(7)     進入主CRLSP出接口的接口視圖。

interface interface-type interface-number

(8)     為被保護的接口指定一條Bypass隧道。

mpls te fast-reroute bypass-tunnel tunnel tunnel-number

4. 自動創建Bypass隧道

(1)     進入係統視圖。

system-view

(2)     進入MPLS TE視圖。

mpls te

(3)     全局開啟自動隧道備份功能,並進入MPLS TE自動隧道備份視圖。

auto-tunnel backup

缺省情況下,自動隧道備份功能處於全局關閉狀態。

(4)     配置自動創建的Bypass隧道的接口編號範圍。

tunnel-number min min-number max max-number

缺省情況下,未指定自動創建Bypass隧道的接口編號範圍,不能自動創建Bypass隧道。

全局開啟自動隧道備份功能後,必須配置本命令,才能自動建立Bypass隧道。

(5)     (可選)配置僅自動創建鏈路保護類型的Bypass隧道。

nhop-only

缺省情況下,鏈路保護和節點保護的Bypass隧道都會自動創建。

配置本命令後,已自動創建的節點保護類型的Bypass隧道會被刪除。

(6)     (可選)配置空閑Bypass隧道的自動清除時間。

timers removal unused seconds

缺省情況下,空閑Bypass隧道的自動清除時間為3600秒。

未與任何主隧道綁定的Bypass隧道稱為空閑Bypass隧道,空閑Bypass隧道在自動清除時間超時後仍未被綁定,則會被自動清除。

(7)     (可選)關閉接口的自動隧道備份功能。

a.     退回係統視圖。

quit

b.     進入接口視圖。

interface interface-type interface-number

c.     關閉接口的自動隧道備份功能。

mpls te auto-tunnel backup disable

缺省情況下,全局開啟了自動隧道備份功能後,所有使能RSVP能力的接口都會開啟自動隧道備份功能,允許自動創建Bypass隧道。

配置本命令後,已自動創建的保護該接口的Bypass隧道會被刪除。

1.18.4  配置節點故障檢測

1. 功能簡介

如果使用FRR進行節點保護,則在PLR和被保護節點上可以進行本配置,以便通過Hello機製或BFD檢測到節點故障;如果隻是進行鏈路保護,則不必進行本配置。

對於PLR和被保護節點之間鏈路故障引發的節點失效,不需要使用RSVP的Hello機製或BFD來進行節點故障檢測。本配置主要用於在鏈路正常但信令協議故障的特殊情況下檢測節點故障。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入PLR與被保護節點直連接口的接口視圖。

interface interface-type interface-number

(3)     配置節點故障檢測。請選擇其中一項進行配置。

¡     開啟RSVP的Hello擴展功能。

rsvp hello enable

缺省情況下,RSVP的Hello擴展功能處於關閉狀態

¡     配置通過BFD檢測本地設備和RSVP鄰居之間鏈路的狀態。

rsvp bfd enable

缺省情況下,不會通過BFD檢測本地設備和RSVP鄰居之間鏈路的狀態。

rsvp hello enablersvp bfd enable命令的詳細介紹,請參見“MPLS配置指導”中的“RSVP”。

1.18.5  配置快速重路由的Bypass隧道優選時間間隔

1. 功能簡介

如果為一條主CRLSP指定了多條Bypass隧道,MPLS TE會從中選擇一條最優的Bypass隧道,當主CRLSP出現故障時,將流量切換到該Bypass隧道轉發。在某些情況下(如Bypass隧道的可預留帶寬發生變化),當前的最優隧道可能不是之前選中的Bypass隧道。因此,MPLS TE需要周期性地選擇最優的Bypass隧道。通過本配置可以調整Bypass隧道優選的周期。

請在PLR節點上進行本配置。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     進入MPLS TE視圖。

mpls te

(3)     配置在多條Bypass隧道中進行優選的時間間隔。

fast-reroute timer interval

缺省情況下,在多條Bypass隧道中進行優選的時間間隔為300秒。

1.19  開啟告警功能

1. 功能簡介

開啟MPLS TE模塊的告警功能後,當MPLS TE狀態發生變化時會產生RFC 3812中規定的告警信息。生成的告警信息將發送到設備的SNMP模塊,通過設置SNMP中告警信息的發送參數,來決定告警信息輸出的相關屬性。

有關告警信息的詳細介紹,請參見“網絡管理和監控配置指導”中的“SNMP”。

2. 配置步驟

(1)     進入係統視圖。

system-view

(2)     開啟MPLS TE模塊的告警功能。

snmp-agent trap enable te

缺省情況下,MPLS TE模塊的告警功能處於關閉狀態。

1.20  MPLS TE顯示和維護

在完成上述配置後,在任意視圖下執行display命令可以顯示配置後MPLS TE的運行情況,通過查看顯示信息驗證配置的效果。

在用戶視圖下執行reset命令可以清除MPLS TE統計信息。

表1-2 MPLS TE的顯示和維護

操作

命令

顯示顯式路徑的信息

display explicit-path [ path-name ]

顯示IS-IS TEDB中的鏈路和節點信息

display isis mpls te advertisement [ [ level-1 | level-2 ] | [ originate-system system-id | local ] | verbose ] * [ process-id ]

顯示IS-IS TE配置的子TLV類型值信息

display isis mpls te configured-sub-tlvs [ process-id ]

顯示IS-IS TEDB中的網絡信息

display isis mpls te network [ [ level-1 | level-2 ] | local | lsp-id lsp-id ]* [ process-id ]

顯示IS-IS 的Tunnel接口信息

display isis mpls te tunnel [ level-1 | level-2 ] [ process-id ]

顯示DS-TE相關信息

display mpls te ds-te

顯示開啟了MPLS TE的接口上的帶寬相關信息

display mpls te link-management bandwidth-allocation [ interface interface-type interface-number ]

顯示設備已發現的PCE的信息

display mpls te pce discovery [ ip-address ] [ verbose ]

顯示PCC或PCE對等體的信息

display mpls te pce peer [ ip-address ] [ verbose ]

顯示PCC或PCE的統計信息

display mpls te pce statistics [ ip-address ]

顯示MPLS TEDB信息

display mpls te tedb { { isis { level-1 | level-2 } | ospf area area-id } | link ip-address | network | node [ local | mpls-lsr-id ] | summary }

顯示MPLS TE隧道接口的信息

display mpls te tunnel-interface [ tunnel number ]

顯示OSPF TEDB中的鏈路和節點信息

display ospf [ process-id ] [ area area-id ] mpls te advertisement [ originate-router advertising-router-id | self-originate ]

顯示OSPF TEDB中的Network信息

display ospf [ process-id ] [ area area-id ] mpls te network [ originate-router advertising-router-id | self-originate ]

顯示OSPF發現的PCE信息

display ospf [ process-id ] [ area area-id ] mpls te pce [ originate-router advertising-router-id | self-originate ]

顯示OSPF的Tunnel接口信息

display ospf [ process-id ] [ area area-id ] mpls te tunnel

清除PCC或PCE統計信息

reset mpls te pce statistics [ ip-address ]

 

1.21  MPLS TE典型配置舉例

1.21.1  使用靜態CRLSP配置MPLS TE隧道示例

1. 組網需求

·     設備Switch A、Switch B和Switch C運行IS-IS;

·     使用靜態CRLSP建立一條Switch A到Switch C的MPLS TE隧道,實現兩個IP網絡通過MPLS TE隧道傳輸數據流量,該隧道需要的帶寬為2000kbps;

·     隧道沿途的鏈路最大帶寬為10000kbps,最大可預留帶寬為5000kbps。

2. 組網圖

圖1-8 靜態CRLSP配置組網圖

 

3. 配置步驟

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

按照圖1-8配置各接口的IP地址和掩碼,具體配置過程略。

(2)     配置IS-IS協議發布接口所在網段的路由,包括Loopback接口

# 配置Switch A。

<SwitchA> system-view

[SwitchA] isis 1

[SwitchA-isis-1] network-entity 00.0005.0000.0000.0001.00

[SwitchA-isis-1] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] isis enable 1

[SwitchA-Vlan-interface1] quit

[SwitchA] interface loopback 0

[SwitchA-LoopBack0] isis enable 1

[SwitchA-LoopBack0] quit

# 配置Switch B。

<SwitchB> system-view

[SwitchB] isis 1

[SwitchB-isis-1] network-entity 00.0005.0000.0000.0002.00

[SwitchB-isis-1] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] isis enable 1

[SwitchB-Vlan-interface1] quit

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] isis enable 1

[SwitchB-Vlan-interface2] quit

[SwitchB] interface loopback 0

[SwitchB-LoopBack0] isis enable 1

[SwitchB-LoopBack0] quit

# 配置Switch C。

<SwitchC> system-view

[SwitchC] isis 1

[SwitchC-isis-1] network-entity 00.0005.0000.0000.0003.00

[SwitchC-isis-1] quit

[SwitchC] interface vlan-interface 2

[SwitchC-Vlan-interface2] isis enable 1

[SwitchC-Vlan-interface2] quit

[SwitchC] interface loopback 0

[SwitchC-LoopBack0] isis enable 1

[SwitchC-LoopBack0] quit

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

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

# 配置Switch A。

[SwitchA] mpls lsr-id 1.1.1.1

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls enable

[SwitchA-Vlan-interface1] mpls te enable

[SwitchA-Vlan-interface1] quit

# 配置Switch B。

[SwitchB] mpls lsr-id 2.2.2.2

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls enable

[SwitchB-Vlan-interface1] mpls te enable

[SwitchB-Vlan-interface1] quit

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] mpls enable

[SwitchB-Vlan-interface2] mpls te enable

[SwitchB-Vlan-interface2] quit

# 配置Switch C。

[SwitchC] mpls lsr-id 3.3.3.3

[SwitchC] mpls te

[SwitchC-te] quit

[SwitchC] interface vlan-interface 2

[SwitchC-Vlan-interface2] mpls enable

[SwitchC-Vlan-interface2] mpls te enable

[SwitchC-Vlan-interface2] quit

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

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

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls te max-link-bandwidth 10000

[SwitchA-Vlan-interface1] mpls te max-reservable-bandwidth 5000

[SwitchA-Vlan-interface1] quit

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

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls te max-link-bandwidth 10000

[SwitchB-Vlan-interface1] mpls te max-reservable-bandwidth 5000

[SwitchB-Vlan-interface1] quit

[SwitchB] interface vlan-interface 2

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

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

[SwitchB-Vlan-interface2] quit

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

[SwitchC] interface vlan-interface 2

[SwitchC-Vlan-interface2] mpls te max-link-bandwidth 10000

[SwitchC-Vlan-interface2] mpls te max-reservable-bandwidth 5000

[SwitchC-Vlan-interface2] quit

(5)     配置MPLS TE隧道

# 在Switch A上配置MPLS TE隧道Tunnel1:目的地址為Switch C的LSR ID(3.3.3.3);采用靜態CRLSP建立MPLS TE隧道。

[SwitchA] interface tunnel 1 mode mpls-te

[SwitchA-Tunnel1] ip address 6.1.1.1 255.255.255.0

[SwitchA-Tunnel1] destination 3.3.3.3

[SwitchA-Tunnel1] mpls te signaling static

[SwitchA-Tunnel1] quit

(6)     創建靜態CRLSP

# 配置Switch A為靜態CRLSP的Ingress節點,下一跳地址為2.1.1.2,出標簽為20,隧道所需的帶寬為2000kbps。

[SwitchA] static-cr-lsp ingress static-cr-lsp-1 nexthop 2.1.1.2 out-label 20 bandwidth 2000

# 在Switch A上配置隧道Tunnel1引用名稱為static-cr-lsp-1的靜態CRLSP。

[SwitchA] interface Tunnel1

[SwitchA-Tunnel1] mpls te static-cr-lsp static-cr-lsp-1

[SwitchA-Tunnel1] quit

# 配置Switch B為靜態CRLSP的Transit節點,入標簽為20,下一跳地址為3.2.1.2,出標簽為30,隧道所需的帶寬為2000kbps。

[SwitchB] static-cr-lsp transit static-cr-lsp-1 in-label 20 nexthop 3.2.1.2 out-label 30 bandwidth 2000

# 配置Switch C為靜態CRLSP的Egress節點,入標簽為30。

[SwitchC] static-cr-lsp egress static-cr-lsp-1 in-label 30

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

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

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

4. 驗證配置

# 配置完成後,在Switch A上執行display interface tunnel命令,可以看到Tunnel接口的狀態為up。

[SwitchA] display interface tunnel

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1496

Internet address: 6.1.1.1/24 (primary)

Tunnel source unknown, destination 3.3.3.3

Tunnel TTL 255

Tunnel protocol/transport CR_LSP

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# 在Switch A上執行display mpls te tunnel-interface命令,可以看到MPLS TE隧道的建立情況。

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 1

Tunnel State           : Up (Main CRLSP up)

Tunnel Attributes      :

  LSP ID               : 1               Tunnel ID            : 1

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 3.3.3.3

  Signaling            : Static          Static CRLSP Name    : static-cr-lsp-1

  Static SRLSP Name    : -/-

  Resv Style           : -

  Tunnel mode          : -

  Reverse-LSP name     : -

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

  Class Type           : -               Tunnel Bandwidth     : -

  Reserved Bandwidth   : -

  Setup Priority       : 0               Holding Priority     : 0

  Affinity Attr/Mask   : -/-

  Explicit Path        : -

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : -               Record Label         : -

  FRR Flag             : -               Bandwidth Protection : -

  Backup Bandwidth Flag: -               Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : -               Auto Created         : -

  Route Pinning        : -

  Retry Limit          : 3               Retry Interval       : 2 sec

  Reoptimization       : -               Reoptimization Freq  : -

  Backup Type          : -               Backup LSP ID        : -

  Auto Bandwidth       : -               Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -               Service-Class        : -

  Path Setup Type      : -/-

# 在各設備上執行display mpls lspdisplay mpls static-cr-lsp命令,可以看到靜態CRLSP的建立情況。

[SwitchA] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

1.1.1.1/0/1                 StaticCR -/20            Vlan1

2.1.1.2                     Local    -/-             Vlan1

Tunnel1                     Local    -/-             NHLFE1025

[SwitchB] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

-                           StaticCR 20/30           Vlan2

3.2.1.2                     Local    -/-             Vlan2

[SwitchC] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

-                           StaticCR 30/-            -

[SwitchA] display mpls static-cr-lsp

Name            LSR Type    In/Out Label   Out Interface        State

static-cr-lsp-1 Ingress     Null/20        Vlan1                Up

[SwitchB] display mpls static-cr-lsp

Name            LSR Type    In/Out Label   Out Interface        State

static-cr-lsp-1 Transit     20/30          Vlan2                Up

[SwitchC] display mpls static-cr-lsp

Name            LSR Type    In/Out Label   Out Interface        State

static-cr-lsp1  Egress      30/Null        -                    Up

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

1.21.2  使用RSVP-TE配置MPLS TE隧道示例

1. 組網需求

·     設備Switch A、Switch B、Switch C和Switch D運行IS-IS,都是Level-2設備;

·     使用RSVP-TE建立一條從Switch A到Switch D的MPLS TE隧道,實現兩個IP網絡通過MPLS TE隧道傳輸數據流量,該隧道需要的帶寬為2000kbps;

·     隧道沿途的鏈路最大帶寬為10000kbps,最大可預留帶寬為5000kbps。

2. 組網圖

圖1-9 RSVP-TE配置MPLS TE隧道組網圖

 

設備

接口

IP地址

設備

接口

IP地址

Switch A

Loop0

1.1.1.9/32

Switch D

Loop0

4.4.4.9/32

 

Vlan-int1

10.1.1.1/24

 

Vlan-int3

30.1.1.2/24

 

Vlan-int10

100.1.1.1/24

 

Vlan-int10

100.1.2.1/24

Switch B

Loop0

2.2.2.9/32

Switch C

Loop0

3.3.3.9/32

 

Vlan-int1

10.1.1.2/24

 

Vlan-int3

30.1.1.1/24

 

Vlan-int2

20.1.1.1/24

 

Vlan-int2

20.1.1.2/24

 

3. 配置步驟

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

按照圖1-9配置各接口的IP地址和掩碼,具體配置過程略。

(2)     配置IS-IS協議發布接口所在網段的路由,包括Loopback接口

# 配置Switch A。

<SwitchA> system-view

[SwitchA] isis 1

[SwitchA-isis-1] network-entity 00.0005.0000.0000.0001.00

[SwitchA-isis-1] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] isis enable 1

[SwitchA-Vlan-interface1] isis circuit-level level-2

[SwitchA-Vlan-interface1] quit

[SwitchA] interface loopback 0

[SwitchA-LoopBack0] isis enable 1

[SwitchA-LoopBack0] isis circuit-level level-2

[SwitchA-LoopBack0] quit

# 配置Switch B。

<SwitchB> system-view

[SwitchB] isis 1

[SwitchB-isis-1] network-entity 00.0005.0000.0000.0002.00

[SwitchB-isis-1] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] isis enable 1

[SwitchB-Vlan-interface1] isis circuit-level level-2

[SwitchB-Vlan-interface1] quit

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] isis enable 1

[SwitchB-Vlan-interface2] isis circuit-level level-2

[SwitchB-Vlan-interface2] quit

[SwitchB] interface loopback 0

[SwitchB-LoopBack0] isis enable 1

[SwitchB-LoopBack0] isis circuit-level level-2

[SwitchB-LoopBack0] quit

# 配置Switch C。

<SwitchC> system-view

[SwitchC] isis 1

[SwitchC-isis-1] network-entity 00.0005.0000.0000.0003.00

[SwitchC-isis-1] quit

[SwitchC] interface vlan-interface 3

[SwitchC-Vlan-interface3] isis enable 1

[SwitchC-Vlan-interface3] isis circuit-level level-2

[SwitchC-Vlan-interface3] quit

[SwitchC] interface vlan-interface 2

[SwitchC-Vlan-interface2] isis enable 1

[SwitchC-Vlan-interface2] isis circuit-level level-2

[SwitchC-Vlan-interface2] quit

[SwitchC] interface loopback 0

[SwitchC-LoopBack0] isis enable 1

[SwitchC-LoopBack0] isis circuit-level level-2

[SwitchC-LoopBack0] quit

# 配置Switch D。

<SwitchD> system-view

[SwitchD] isis 1

[SwitchD-isis-1] network-entity 00.0005.0000.0000.0004.00

[SwitchD-isis-1] quit

[SwitchD] interface vlan-interface 3

[SwitchD-Vlan-interface3] isis enable 1

[SwitchD-Vlan-interface3] isis circuit-level level-2

[SwitchD-Vlan-interface3] quit

[SwitchD] interface loopback 0

[SwitchD-LoopBack0] isis enable 1

[SwitchD-LoopBack0] isis circuit-level level-2

[SwitchD-LoopBack0] quit

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

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

# 配置Switch A。

[SwitchA] mpls lsr-id 1.1.1.9

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls enable

[SwitchA-Vlan-interface1] mpls te enable

[SwitchA-Vlan-interface1] rsvp enable

[SwitchA-Vlan-interface1] quit

# 配置Switch B。

[SwitchB] mpls lsr-id 2.2.2.9

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls enable

[SwitchB-Vlan-interface1] mpls te enable

[SwitchB-Vlan-interface1] rsvp enable

[SwitchB-Vlan-interface1] 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

# 配置Switch C。

[SwitchC] mpls lsr-id 3.3.3.9

[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 2

[SwitchC-Vlan-interface2] mpls enable

[SwitchC-Vlan-interface2] mpls te enable

[SwitchC-Vlan-interface2] rsvp enable

[SwitchC-Vlan-interface2] quit

# 配置Switch D。

[SwitchD] mpls lsr-id 4.4.4.9

[SwitchD] mpls te

[SwitchD-te] quit

[SwitchD] rsvp

[SwitchD-rsvp] quit

[SwitchD] interface vlan-interface 3

[SwitchD-Vlan-interface3] mpls enable

[SwitchD-Vlan-interface3] mpls te enable

[SwitchD-Vlan-interface3] rsvp enable

[SwitchD-Vlan-interface3] quit

(4)     配置IS-IS TE

# 配置Switch A。

[SwitchA] isis 1

[SwitchA-isis-1] cost-style wide

[SwitchA-isis-1] mpls te enable level-2

[SwitchA-isis-1] quit

# 配置Switch B。

[SwitchB] isis 1

[SwitchB-isis-1] cost-style wide

[SwitchB-isis-1] mpls te enable level-2

[SwitchB-isis-1] quit

# 配置Switch C。

[SwitchC] isis 1

[SwitchC-isis-1] cost-style wide

[SwitchC-isis-1] mpls te enable level-2

[SwitchC-isis-1] quit

# 配置SwitchD。

[SwitchD] isis 1

[SwitchD-isis-1] cost-style wide

[SwitchD-isis-1] mpls te enable level-2

[SwitchD-isis-1] quit

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

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

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls te max-link-bandwidth 10000

[SwitchA-Vlan-interface1] mpls te max-reservable-bandwidth 5000

[SwitchA-Vlan-interface1] quit

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

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls te max-link-bandwidth 10000

[SwitchB-Vlan-interface1] mpls te max-reservable-bandwidth 5000

[SwitchB-Vlan-interface1] quit

[SwitchB] interface vlan-interface 2

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

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

[SwitchB-Vlan-interface2] quit

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

[SwitchC] interface vlan-interface 3

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

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

[SwitchC-Vlan-interface3] quit

[SwitchC] interface vlan-interface 2

[SwitchC-Vlan-interface2] mpls te max-link-bandwidth 10000

[SwitchC-Vlan-interface2] mpls te max-reservable-bandwidth 5000

[SwitchC-Vlan-interface2] quit

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

[SwitchD] interface vlan-interface 3

[SwitchD-Vlan-interface3] mpls te max-link-bandwidth 10000

[SwitchD-Vlan-interface3] mpls te max-reservable-bandwidth 5000

[SwitchD-Vlan-interface3] quit

(6)     配置MPLS TE隧道

# 在Switch A上配置MPLS TE隧道Tunnel1:目的地址為Switch D的LSR ID(4.4.4.9);采用RSVP-TE信令協議建立MPLS TE隧道;隧道所需的帶寬為2000kbps。

[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.9

[SwitchA-Tunnel1] mpls te signaling rsvp-te

[SwitchA-Tunnel1] mpls te bandwidth 2000

[SwitchA-Tunnel1] quit

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

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

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

4. 驗證配置

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

[SwitchA] display interface tunnel

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1496

Internet address: 7.1.1.1/24 (primary)

Tunnel source unknown, destination 4.4.4.9

Tunnel TTL 255

Tunnel protocol/transport CR_LSP

Last clearing of counters: Never

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 6 bytes/sec, 48 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 177 packets, 11428 bytes, 0 drops

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

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 1

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

Tunnel Attributes      :

  LSP ID               : 23331           Tunnel ID            : 1

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.9         Egress LSR ID        : 4.4.4.9

  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     : 2000 kbps

  Reserved Bandwidth   : 2000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : -

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Disabled        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  : -               Service-Class        : -

  Path Setup Type      : -/-

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

1.21.3  使用RSVP-TE配置跨域的MPLS TE隧道示例

1. 組網需求

·     Switch A和Switch B位於AS 100內,AS 100內使用OSPF作為IGP協議。

·     Switch C和Switch D位於AS 200內,AS 200內使用OSPF作為IGP協議。

·     在作為ASBR的Switch B和Switch C之間建立EBGP連接,配置BGP引入OSPF路由, OSPF進程引入BGP路由,使得AS 100和AS 200之間路由可達。

·     使用RSVP-TE從Switch A到Switch D建立一條跨域的MPLS TE隧道,實現兩個IP網絡通過MPLS TE隧道傳輸數據流量,該隧道所需的帶寬為2000kbps。

·     隧道沿途的鏈路最大帶寬為10000kbps,最大可預留帶寬為5000kbps。

2. 組網圖

圖1-10 使用RSVP-TE配置跨域的MPLS TE隧道組網圖

 

設備

接口

IP地址

設備

接口

IP地址

Switch A

Loop0

1.1.1.9/32

Switch D

Loop0

4.4.4.9/32

 

Vlan-int1

10.1.1.1/24

 

Vlan-int3

30.1.1.2/24

 

Vlan-int10

100.1.1.1/24

 

Vlan-int10

100.1.2.1/24

Switch B

Loop0

2.2.2.9/32

Switch C

Loop0

3.3.3.9/32

 

Vlan-int1

10.1.1.2/24

 

Vlan-int3

30.1.1.1/24

 

Vlan-int2

20.1.1.1/24

 

Vlan-int2

20.1.1.2/24

 

3. 配置步驟

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

按照圖1-10配置各接口的IP地址和掩碼,具體配置過程略。

(2)     配置使用OSPF在AS內發布路由信息,並在Switch B和Switch C上配置OSPF引入直連路由和BGP路由

# 配置Switch A。

<SwitchA> system-view

[SwitchA] ospf

[SwitchA-ospf-1] area 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 1.1.1.9 0.0.0.0

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

[SwitchA-ospf-1] quit

# 配置Switch B。

<SwitchB> system-view

[SwitchB] ospf

[SwitchB-ospf-1] import-route direct

[SwitchB-ospf-1] import-route bgp

[SwitchB-ospf-1] area 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 2.2.2.9 0.0.0.0

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

[SwitchB-ospf-1] quit

# 配置Switch C。

<SwitchC> system-view

[SwitchC] ospf

[SwitchC-ospf-1] import-route direct

[SwitchC-ospf-1] import-route bgp

[SwitchC-ospf-1] area 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 3.3.3.9 0.0.0.0

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

[SwitchC-ospf-1] quit

# 配置Switch D。

<SwitchD> system-view

[SwitchD] ospf

[SwitchD-ospf-1] area 0

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

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

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

[SwitchD-ospf-1] quit

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

[SwitchA] display ip routing-table

 

Destinations : 6        Routes : 6

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

 

1.1.1.9/32         Direct  0   0           127.0.0.1       InLoop0

2.2.2.9/32         O_INTRA 10  1           10.1.1.2        Vlan1

10.1.1.0/24        Direct  0   0           10.1.1.1        Vlan1

10.1.1.1/32        Direct  0   0           127.0.0.1       InLoop0

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0

(3)     在Switch B和Switch C之間配置BGP,使得AS之間路由可達

# 配置Switch B。

[SwitchB] bgp 100

[SwitchB-bgp] peer 20.1.1.2 as-number 200

[SwitchB-bgp] address-family ipv4 unicast

[SwitchB-bgp-ipv4] peer 20.1.1.2 enable

[SwitchB-bgp-ipv4] import-route ospf

[SwitchB-bgp-ipv4] import-route direct

[SwitchB-bgp-ipv4] quit

[SwitchB-bgp] quit

# 配置Switch C。

[SwitchC] bgp 200

[SwitchC-bgp] peer 20.1.1.1 as-number 100

[SwitchC-bgp] address-family ipv4 unicast

[SwitchC-bgp-ipv4] peer 20.1.1.1 enable

[SwitchC-bgp-ipv4] import-route ospf

[SwitchC-bgp-ipv4] import-route direct

[SwitchC-bgp-ipv4] quit

[SwitchC-bgp] quit

# 配置完成後,在各設備上執行display ip routing-table命令,可以看到設備學習到了AS外部的路由。以Switch A為例:

[SwitchA] display ip routing-table

 

Destinations : 10       Routes : 10

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

 

1.1.1.9/32         Direct  0   0           127.0.0.1       InLoop0

2.2.2.9/32         O_INTRA 10  1           10.1.1.2        Vlan1

3.3.3.9/32         O_ASE   150 1           10.1.1.2        Vlan1

4.4.4.9/32         O_ASE   150 1           10.1.1.2        Vlan1

10.1.1.0/24        Direct  0   0           10.1.1.1        Vlan1

10.1.1.1/32        Direct  0   0           127.0.0.1       InLoop0

20.1.1.0/24        O_ASE   150 1           10.1.1.2        Vlan1

30.1.1.0/24        O_ASE   150 1           10.1.1.2        Vlan1

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0

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

# 配置Switch A。

[SwitchA] mpls lsr-id 1.1.1.9

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls enable

[SwitchA-Vlan-interface1] mpls te enable

[SwitchA-Vlan-interface1] rsvp enable

[SwitchA-Vlan-interface1] quit

# 配置Switch B。

[SwitchB] mpls lsr-id 2.2.2.9

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls enable

[SwitchB-Vlan-interface1] mpls te enable

[SwitchB-Vlan-interface1] rsvp enable

[SwitchB-Vlan-interface1] 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

# 配置Switch C。

[SwitchC] mpls lsr-id 3.3.3.9

[SwitchC] mpls te

[SwitchC-te] quit

[SwitchC] rsvp

[SwitchC-rsvp] quit

[SwitchC] interface vlan-interface 2

[SwitchC-Vlan-interface2] mpls enable

[SwitchC-Vlan-interface2] mpls te enable

[SwitchC-Vlan-interface2] rsvp enable

[SwitchC-Vlan-interface2] 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

# 配置Switch D。

[SwitchD] mpls lsr-id 4.4.4.9

[SwitchD] mpls te

[SwitchD-te] quit

[SwitchD] rsvp

[SwitchD-rsvp] quit

[SwitchD] interface vlan-interface 3

[SwitchD-Vlan-interface3] mpls enable

[SwitchD-Vlan-interface3] mpls te enable

[SwitchD-Vlan-interface3] rsvp enable

[SwitchD-Vlan-interface3] quit

(5)     配置OSPF TE

# 配置Switch A。

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

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

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

[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)     配置顯式路徑

# 在Switch A上配置顯式路徑,指定Switch B節點和Switch D節點為鬆散下一跳,Switch C節點為嚴格下一跳。

[SwitchA] explicit-path atod

[SwitchA-explicit-path-atod] nexthop 10.1.1.2 include loose

[SwitchA-explicit-path-atod] nexthop 20.1.1.2 include strict

[SwitchA-explicit-path-atod] nexthop 30.1.1.2 include loose

[SwitchA-explicit-path-atod] quit

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

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

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls te max-link-bandwidth 10000

[SwitchA-Vlan-interface1] mpls te max-reservable-bandwidth 5000

[SwitchA-Vlan-interface1] quit

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

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls te max-link-bandwidth 10000

[SwitchB-Vlan-interface1] mpls te max-reservable-bandwidth 5000

[SwitchB-Vlan-interface1] quit

[SwitchB] interface vlan-interface 2

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

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

[SwitchB-Vlan-interface2] quit

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

[SwitchC] interface vlan-interface 2

[SwitchC-Vlan-interface2] mpls te max-link-bandwidth 10000

[SwitchC-Vlan-interface2] mpls te max-reservable-bandwidth 5000

[SwitchC-Vlan-interface2] quit

[SwitchC] interface vlan-interface 3

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

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

[SwitchC-Vlan-interface3] quit

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

[SwitchD] interface vlan-interface 3

[SwitchD-Vlan-interface3] mpls te max-link-bandwidth 10000

[SwitchD-Vlan-interface3] mpls te max-reservable-bandwidth 5000

[SwitchD-Vlan-interface3] quit

(8)     配置MPLS TE隧道

# 在Switch A上配置MPLS TE隧道Tunnel1:目的地址為Switch D的LSR ID(4.4.4.9);采用RSVP-TE信令協議建立MPLS TE隧道;隧道所需的帶寬為2000kbps;為隧道指定顯式路徑atod。

[SwitchA] interface tunnel 1 mode mpls

[SwitchA-Tunnel1] ip address 7.1.1.1 255.255.255.0

[SwitchA-Tunnel1] destination 4.4.4.9

[SwitchA-Tunnel1] mpls te signaling rsvp-te

[SwitchA-Tunnel1] mpls te bandwidth 2000

[SwitchA-Tunnel1] mpls te path preference 5 explicit-path atod

[SwitchA-Tunnel1] quit

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

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

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

4. 驗證配置

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

[SwitchA] display interface tunnel 1

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1496

Internet address: 7.1.1.1/24 (primary)

Tunnel source unknown, destination 4.4.4.9

Tunnel TTL 255

Tunnel protocol/transport CR_LSP

Last clearing of counters: Never

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets input, 0 bytes, 0 drops

Output: 3077 packets output, 197028 bytes, 0 drops

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

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 1

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

Tunnel Attributes      :

  LSP ID               : 23549           Tunnel ID            : 1

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.9         Egress LSR ID        : 4.4.4.9

  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     : 2000 kbps

  Reserved Bandwidth   : 2000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : atod

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Disabled        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  : -               Service-Class        : -

  Path Setup Type      : -/-

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

[SwitchA] display ip routing-table

 

Destinations : 14       Routes : 14

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

 

1.1.1.9/32         Direct  0   0           127.0.0.1       InLoop0

2.2.2.9/32         O_INTRA 10  1           10.1.1.2        Vlan1

3.3.3.9/32         O_ASE   150 1           10.1.1.2        Vlan1

4.4.4.9/32         O_ASE   150 1           10.1.1.2        Vlan1

7.1.1.0/24         Direct  0   0           7.1.1.1         Tun1

7.1.1.1/32         Direct  0   0           127.0.0.1       InLoop0

10.1.1.0/24        Direct  0   0           10.1.1.1        Vlan1

10.1.1.1/32        Direct  0   0           127.0.0.1       InLoop0

20.1.1.0/24        O_ASE   150 1           10.1.1.2        Vlan1

30.1.1.0/24        O_ASE   150 1           10.1.1.2        Vlan1

100.1.2.0/24       Static  1   0           0.0.0.0         Tun1

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0

1.21.4  使用PCE計算的路徑建立跨區域的MPLS TE隧道示例

1. 組網需求

·     設備Switch A、Switch B、Switch C和Switch D均支持MPLS TE且運行OSPF。

·     設備Switch A和Switch B為PCE, Switch C作為PCC,自動發現PCE,並向PCE請求計算從Switch C到Switch D的跨OSPF區域路徑。

2. 組網圖

圖1-11 使用PCE計算的路徑建立跨區域的MPLS TE隧道組網圖

 

3. 配置步驟

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

按照圖1-11配置各接口的IP地址和掩碼,具體配置過程略。

(2)     配置OSPF協議發布接口所在網段的路由,並配置OSPF TE

# 配置Switch A

<SwitchA> system-view

[SwitchA] ospf

[SwitchA-ospf-1] area 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 1.1.1.1 0.0.0.0

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

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

[SwitchA-ospf-1] area 1

[SwitchA-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255

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

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

[SwitchA-ospf-1] quit

# 配置Switch B

<SwitchB> system-view

[SwitchB] ospf

[SwitchB-ospf-1] area 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 2.2.2.2 0.0.0.0

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

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

[SwitchB-ospf-1] area 2

[SwitchB-ospf-1-area-0.0.0.2] network 10.3.1.0 0.0.0.255

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

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

[SwitchB-ospf-1] quit

# 配置Switch C

<SwitchC> system-view

[SwitchC] ospf

[SwitchC-ospf-1] area 1

[SwitchC-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255

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

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

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

[SwitchC-ospf-1] quit

# 配置Switch D

<SwitchD> system-view

[SwitchD] ospf

[SwitchD-ospf-1] area 2

[SwitchD-ospf-1-area-0.0.0.2] network 10.3.1.0 0.0.0.255

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

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

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

[SwitchD-ospf-1] quit

(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 11

[SwitchA-Vlan-interface11] mpls enable

[SwitchA-Vlan-interface11] mpls te enable

[SwitchA-Vlan-interface11] rsvp enable

[SwitchA-Vlan-interface11] 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 11

[SwitchB-Vlan-interface11] mpls enable

[SwitchB-Vlan-interface11] mpls te enable

[SwitchB-Vlan-interface11] rsvp enable

[SwitchB-Vlan-interface11] 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 11

[SwitchC-Vlan-interface11] mpls enable

[SwitchC-Vlan-interface11] mpls te enable

[SwitchC-Vlan-interface11] rsvp enable

[SwitchC-Vlan-interface11] 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 11

[SwitchD-Vlan-interface11] mpls enable

[SwitchD-Vlan-interface11] mpls te enable

[SwitchD-Vlan-interface11] rsvp enable

[SwitchD-Vlan-interface11] quit

(4)     配置Switch A和Switch B為PCE

# 配置Switch A

[SwitchA] mpls te

[SwitchA-te] pce address 1.1.1.1

# 配置Switch B

[SwitchB] mpls te

[SwitchB-te] pce address 2.2.2.2

(5)     配置Switch C作為PCC並使用PCE計算路徑

# 在Switch C上配置MPLS TE隧道Tunnel1:目的地址為Switch D的LSR ID(4.4.4.4);采用RSVP-TE信令協議建立MPLS TE隧道。

[SwitchC] interface tunnel 1 mode mpls-te

[SwitchC-Tunnel1] ip address 7.1.1.1 255.255.255.0

[SwitchC-Tunnel1] destination 4.4.4.4

[SwitchC-Tunnel1] mpls te signaling rsvp-te

# 配置使用PCE計算路徑,並指定計算路徑的PCE為Switch A和Switch B,發起BRPC計算。

[SwitchC-Tunnel1] mpls te path preference 2 dynamic pce 1.1.1.1 2.2.2.2

[SwitchC-Tunnel1] quit

4. 驗證配置

# 配置完成後,在各交換機上執行display mpls te pce discovery verbose,可以查看到自動發現的PCE。以Switch A為例:

[SwitchA] display mpls te pce discovery verbose

PCE address: 2.2.2.2

  Discovery methods: OSPF

  Path scopes:

    Path scope                                                Preference

    Compute intra-area paths                                  7

    Act as PCE for inter-area TE LSP computation              6

    Act as a default PCE for inter-area TE LSP computation    6

  Capabilities:

    Bidirectional path computation

    Support for request prioritization

    Support for multiple requests per message

  Domains:

    OSPF 1 area 0.0.0.0

    OSPF 1 area 0.0.0.2

# 在各交換機上執行display mpls te pce peer verbose,可以查看到建立的PCEP會話,顯示會話狀態up。以Switch A為例:

[SwitchA] display mpls te pce peer verbose

Peer address: 2.2.2.2

  TCP connection          : 1.1.1.1:29507 -> 2.2.2.2:4189

  Peer type               : PCE

  Session type            : Stateless

  Session state           : UP

  Mastership              : Normal

  Role                    : Active

  Session up time         : 0000 days 00 hours 00 minutes

  Session ID              : Local 0, Peer 0

  Keepalive interval      : Local 30 sec, Peer 30 sec

  Recommended DeadTimer   : Local 120 sec, Peer 120 sec

  Tolerance:

    Min keepalive interval: 10 sec

    Max unknown messages  : 5

  Request timeout         : 10 sec

  Delegation timeout      : 30 sec

 

Peer address: 3.3.3.3

  TCP connection          : 3.3.3.3:29507 -> 1.1.1.1:4189

  Peer type               : PCC

  Session type            : Stateless

  Session state           : UP

  Mastership              : Normal

  Role                    : Active

  Session up time         : 0000 days 00 hours 00 minutes

  Session ID              : Local 2, Peer 0

  Keepalive interval      : Local 30 sec, Peer 30 sec

  Recommended DeadTimer   : Local 120 sec, Peer 120 sec

  Tolerance:

    Min keepalive interval: 10 sec

    Max unknown messages  : 5

  Request timeout         : 10 sec

  Delegation timeout      : 30 sec

1.21.5  配置MPLS TE雙向隧道示例

1. 組網需求

·     設備Switch A、Switch B、Switch C和Switch D運行IS-IS,都是Level-2設備;

·     使用RSVP-TE從Switch A到Switch D建立雙向TE隧道。

2. 組網圖

圖1-12 配置MPLS TE雙向隧道組網圖

 

設備

接口

IP地址

設備

接口

IP地址

Switch A

Loop0

1.1.1.9/32

Switch D

Loop0

4.4.4.9/32

 

Vlan-int1

10.1.1.1/24

 

Vlan-int3

30.1.1.2/24

 

Vlan-int10

100.1.1.1/24

 

Vlan-int10

100.1.2.1/24

Switch B

Loop0

2.2.2.9/32

Switch C

Loop0

3.3.3.9/32

 

Vlan-int1

10.1.1.2/24

 

Vlan-int3

30.1.1.1/24

 

Vlan-int2

20.1.1.1/24

 

Vlan-int2

20.1.1.2/24

 

3. 配置步驟

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

按照圖1-12配置各接口的IP地址和掩碼,具體配置過程略。

(2)     配置IS-IS協議發布接口所在網段的路由,包括Loopback接口

具體過程請參見“1.21.2  使用RSVP-TE配置MPLS TE隧道示例”。

(3)     配置LSR ID,開啟MPLS、MPLS TE和RSVP-TE能力,並在Switch A和Switch D上配置為倒數第二跳分配非空標簽

# 配置Switch A。

<SwitchA> system-view

[SwitchA] mpls lsr-id 1.1.1.9

[SwitchA] mpls label advertise non-null

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls enable

[SwitchA-Vlan-interface1] mpls te enable

[SwitchA-Vlan-interface1] rsvp enable

[SwitchA-Vlan-interface1] quit

# 配置Switch B。

<SwitchB> system-view

[SwitchB] mpls lsr-id 2.2.2.9

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls enable

[SwitchB-Vlan-interface1] mpls te enable

[SwitchB-Vlan-interface1] rsvp enable

[SwitchB-Vlan-interface1] quit

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] mpls enable

[SwitchB-Vlan-interface2] mpls te enable

[SwitchB-Vlan-interface2] rsvp enable

[SwitchB-Vlan-interface1] quit

# 配置Switch C。

<SwitchC> system-view

[SwitchC] mpls lsr-id 3.3.3.9

[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 2

[SwitchC-Vlan-interface2] mpls enable

[SwitchC-Vlan-interface2] mpls te enable

[SwitchC-Vlan-interface2] rsvp enable

[SwitchC-Vlan-interface2] quit

# 配置Switch D。

<SwitchD> system-view

[SwitchD] mpls lsr-id 4.4.4.9

[SwitchD] mpls label advertise non-null

[SwitchD] mpls te

[SwitchD-te] quit

[SwitchD] rsvp

[SwitchD-rsvp] quit

[SwitchD] interface vlan-interface 3

[SwitchD-Vlan-interface3] mpls enable

[SwitchD-Vlan-interface3] mpls te enable

[SwitchD-Vlan-interface3] rsvp enable

[SwitchD-Vlan-interface3] quit

(4)     配置IS-IS TE

# 配置Switch A。

[SwitchA] isis 1

[SwitchA-isis-1] cost-style wide

[SwitchA-isis-1] mpls te enable level-2

[SwitchA-isis-1] quit

# 配置Switch B。

[SwitchB] isis 1

[SwitchB-isis-1] cost-style wide

[SwitchB-isis-1] mpls te enable level-2

[SwitchB-isis-1] quit

# 配置Switch C。

[SwitchC] isis 1

[SwitchC-isis-1] cost-style wide

[SwitchC-isis-1] mpls te enable level-2

[SwitchC-isis-1] quit

# 配置Switch D。

[SwitchD] isis 1

[SwitchD-isis-1] cost-style wide

[SwitchD-isis-1] mpls te enable level-2

[SwitchD-isis-1] quit

(5)     配置MPLS TE雙向隧道

# 配置Switch A作為Co-routed方式雙向隧道的active端。

[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.9

[SwitchA-Tunnel1] mpls te signaling rsvp-te

[SwitchA-Tunnel1] mpls te resv-style ff

[SwitchA-Tunnel1] mpls te bidirectional co-routed active

[SwitchA-Tunnel1] quit

# 配置Switch D作為Co-routed方式雙向隧道的passive端。

[SwitchD] interface tunnel 4 mode mpls-te

[SwitchD-Tunnel4] ip address 8.1.1.1 255.255.255.0

[SwitchD-Tunnel4] destination 1.1.1.9

[SwitchD-Tunnel4] mpls te signaling rsvp-te

[SwitchD-Tunnel4] mpls te resv-style ff

[SwitchD-Tunnel4] mpls te bidirectional co-routed passive reverse-lsp lsr-id 1.1.1.9 tunnel-id 1

[SwitchD-Tunnel4] quit

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

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

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

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

[SwitchD] ip route-static 100.1.1.0 24 tunnel 4 preference 1

4. 驗證配置

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

[SwitchA] display interface tunnel

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1496

Internet address: 7.1.1.1/24 (primary)

Tunnel source unknown, destination 4.4.4.9

Tunnel protocol/transport CR_LSP

Last clearing of counters: Never

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

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

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 1

Tunnel State           : Up (Main CRLSP up. Reverse CRLSP up)

Tunnel Attributes      :

  LSP ID               : 30478           Tunnel ID            : 1

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.9         Egress LSR ID        : 4.4.4.9

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : FF

  Tunnel mode          : Co-routed, active

  Reverse-LSP name     : -

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

  Class Type           : CT0             Tunnel Bandwidth     : 0 kbps

  Reserved Bandwidth   : 0 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : -

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Disabled        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  : -               Service-Class        : -

  Path Setup Type      : -/-

# 在Swtich A上執行display mpls lsp verbose命令可以看到雙向隧道的詳細信息。

[SwitchA] display mpls lsp verbose

Destination  : 4.4.4.9

FEC          : 1.1.1.9/1/30478

Protocol     : RSVP

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1027

State        : Active

Out-Label    : 1149

Nexthop      : 10.1.1.2

Out-Interface: Vlan1

 

Destination  : 4.4.4.9

FEC          : 1.1.1.9/1/30478

Protocol     : RSVP

LSR Type     : Egress

Service      : -

In-Label     : 1151

State        : Active

Nexthop      : 127.0.0.1

Out-Interface: -

 

Destination  : 10.1.1.2

FEC          : 10.1.1.2

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1026

State        : Active

Nexthop      : 10.1.1.2

Out-Interface: Vlan1

 

Destination  : 4.4.4.9

FEC          : Tunnel1

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 268435457

State        : Active

Out-Interface: NHLFE74

# 在Swtich D上執行display interface tunnel命令可以看到隧道接口狀態為up。

[SwitchD] display interface tunnel

Tunnel4

Current state: UP

Line protocol current state: UP

Description: Tunnel4 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1496

Internet address: 8.1.1.1/24 (primary)

Tunnel source unknown, destination 1.1.1.9

Tunnel TTL 255

Tunnel protocol/transport CR_LSP

Last clearing of counters: Never

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets input, 0 bytes, 0 drops

Output: 0 packets output, 0 bytes, 0 drops

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

[SwitchD] display mpls te tunnel-interface

Tunnel Name            : Tunnel 4

Tunnel State           : Up (Main CRLSP up. Reverse CRLSP up)

Tunnel Attributes      :

  LSP ID               : -               Tunnel ID            : 4

  Admin State          : Normal

  Ingress LSR ID       : -               Egress LSR ID        : -

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : FF

  Tunnel mode          : Co-routed, passive

  Reverse-LSP name     : -

  Reverse-LSP LSR ID   : 1.1.1.9         Reverse-LSP Tunnel ID: 1

  Class Type           : -               Tunnel Bandwidth     : -

  Reserved Bandwidth   : -

  Setup Priority       : -               Holding Priority     : -

  Affinity Attr/Mask   : -/-

  Explicit Path        : -

  Backup Explicit Path : -

  Metric Type          : -

  Record Route         : -               Record Label         : -

  FRR Flag             : -               Bandwidth Protection : -

  Backup Bandwidth Flag: -               Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : -              Auto Created         : No

  Route Pinning        : -

  Retry Limit          : -               Retry Interval       : -

  Reoptimization       : -               Reoptimization Freq  : -

  Backup Type          : -               Backup LSP ID        : -

  Auto Bandwidth       : -               Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -               Service-Class        : -

  Path Setup Type      : -/-

# 在Switch D上執行display mpls lsp verbose命令可以看到雙向隧道的詳細信息。

[SwitchD] display mpls lsp verbose

Destination  : 4.4.4.9

FEC          : 1.1.1.9/1/30478

Protocol     : RSVP

LSR Type     : Egress

Service      : -

In-Label     : 3

State        : Active

Nexthop      : 127.0.0.1

Out-Interface: -

 

Destination  : 4.4.4.9

FEC          : 1.1.1.9/1/30478

Protocol     : RSVP

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1025

State        : Active

Out-Label    : 1150

Nexthop      : 30.1.1.1

Out-Interface: Vlan1

 

Destination  : 30.1.1.1

FEC          : 30.1.1.1

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1024

State        : Active

Nexthop      : 30.1.1.1

Out-Interface: Vlan1

 

Destination  : 1.1.1.9

FEC          : Tunnel1

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 268435457

State        : Active

Out-Interface: NHLFE74

1.21.6  配置CRLSP備份示例

1. 組網需求

·     設備Switch A、Switch B、Switch C和Switch D運行IS-IS和IS-IS TE;

·     使用RSVP-TE從Switch A到Switch C建立一條MPLS TE隧道,實現兩個IP網絡通過MPLS TE隧道傳輸數據流量;

·     MPLS TE隧道支持CRLSP熱備份,即同時建立主備兩條CRLSP,實現主CRLSP故障時將流量切換到備份CRLSP。

2. 組網圖

圖1-13 CRLSP備份組網圖

 

設備

接口

IP地址

設備

接口

IP地址

Switch A

Loop0

1.1.1.9/32

Switch D

Loop0

4.4.4.9/32

 

Vlan-int1

10.1.1.1/24

 

Vlan-int4

30.1.1.2/24

 

Vlan-int4

30.1.1.1/24

 

Vlan-int3

40.1.1.1/24

 

Vlan-int10

100.1.1.1/24

Switch C

Loop0

3.3.3.9/32

Switch B

Loop0

2.2.2.9/32

 

Vlan-int2

20.1.1.2/24

 

Vlan-int1

10.1.1.2/24

 

Vlan-int3

40.1.1.2/24

 

Vlan-int2

20.1.1.1/24

 

Vlan-int10

100.1.2.1/24

 

3. 配置步驟

說明

進行下麵配置之前,需要先全局關閉STP功能,或為每個VLAN映射一個MSTP實例。具體配置方法請參見“二層技術-以太網交換配置指導”中的“生成樹”。

 

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

按照圖1-13配置各接口的IP地址和掩碼,包括各Loopback接口,並配置IS-IS TE,具體配置過程略。

(2)     配置IS-IS協議發布接口所在網段的路由,包括Loopback接口(具體配置過程略)

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

# 配置Switch A。

<SwitchA> system-view

[SwitchA] mpls lsr-id 1.1.1.9

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls enable

[SwitchA-Vlan-interface1] mpls te enable

[SwitchA-Vlan-interface1] rsvp enable

[SwitchA-Vlan-interface1] quit

[SwitchA] interface vlan-interface 4

[SwitchA-Vlan-interface4] mpls enable

[SwitchA-Vlan-interface4] mpls te enable

[SwitchA-Vlan-interface4] rsvp enable

[SwitchA-Vlan-interface4] quit

# Switch B、Switch C和Switch D的配置與Switch A相似,此處不再贅述。

(4)     配置MPLS TE隧道

# 在Switch A上配置MPLS TE隧道Tunnel3:目的地址為Switch C的LSR ID(3.3.3.9);采用RSVP-TE信令協議建立MPLS TE隧道;隧道支持CRLSP熱備份功能。

[SwitchA] interface tunnel 3 mode mpls-te

[SwitchA-Tunnel3] ip address 9.1.1.1 24

[SwitchA-Tunnel3] destination 3.3.3.9

[SwitchA-Tunnel3] mpls te signaling rsvp-te

[SwitchA-Tunnel3] mpls te backup hot-standby

[SwitchA-Tunnel3] quit

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

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

[SwitchA] ip route-static 100.1.2.0 24 tunnel 3 preference 1

4. 驗證配置

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

[SwitchA] display interface tunnel

Tunnel3

Current state: UP

Line protocol state: UP

Description: Tunnel3 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1496

Internet address: 9.1.1.1/24 (primary)

Tunnel source unknown, destination 3.3.3.9

Tunnel TTL 255

Tunnel protocol/transport CR_LSP

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# 在Switch A上執行display mpls lsp命令,可以看到存在兩條CRLSP,出接口分別是Vlan-interface1和Vlan-interface4,即主CRLSP創建後,備份CRLSP也建立了。

[SwitchA] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

1.1.1.9/3/34311             RSVP     -/1150          Vlan1

1.1.1.9/3/34312             RSVP     -/1151          Vlan4

10.1.1.2                    Local    -/-             Vlan1

30.1.1.2                    Local    -/-             Vlan4

Tunnel3                     Local    -/-             NHLFE1026

Backup                               -/-             NHLFE1028

# 在Switch A上執行display rsvp lsp verbose命令,可以看到這兩條CRLSP使用的路徑。

[SwitchA] display rsvp lsp verbose

Tunnel name: SwitchA_t3

Destination: 3.3.3.9                      Source: 1.1.1.9

Tunnel ID: 3                              LSP ID: 30106

LSR type: Ingress                         Direction: Unidirectional

Setup priority: 7                         Holding priority: 7

In-Label: -                               Out-Label: 1137

In-Interface: -                           Out-Interface: Vlan1

Nexthop: 10.1.1.2                         Exclude-any: 0

Include-Any: 0                            Include-all: 0

Mean rate (CIR): 0 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/In-Int)

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

  20.1.1.1/32        Flag: 0x00 (No FRR)

  20.1.1.2/32        Flag: 0x00 (No FRR/In-Int)

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

Fast Reroute protection: None

 

Tunnel name: Tunnel3

Destination: 3.3.3.9                      Source: 1.1.1.9

Tunnel ID: 3                              LSP ID: 30107

LSR type: Ingress                         Direction: Unidirectional

Setup priority: 7                         Holding priority: 7

In-Label: -                               Out-Label: 1150

In-Interface: -                           Out-Interface: Vlan4

Nexthop: 30.1.1.2                         Exclude-any: 0

Include-Any: 0                            Include-all: 0

Mean rate (CIR): 0 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.2/32        Flag: 0x00 (No FRR/In-Int)

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

  40.1.1.1/32        Flag: 0x00 (No FRR)

  40.1.1.2/32        Flag: 0x00 (No FRR/In-Int)

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

Fast Reroute protection: None

# 對Tunnel3進行Tracert操作,可以看出目前使用的是經過Switch B的CRLSP,不是經過Switch D的CRLSP。

[SwitchA] tracert mpls te tunnel 3

MPLS trace route TE tunnel Tunnel3

  TTL   Replier            Time    Type      Downstream

  0                                Ingress   10.1.1.2/[1147]

  1     10.1.1.2           1 ms    Transit   20.1.1.2/[3]

  2     20.1.1.2           2 ms    Egress

# 在SwitchB的接口Vlan-interface2上執行shutdown命令,然後再對Tunnel3進行Tracert操作,可以看到報文使用經過Switch D的CRLSP轉發。

[SwitchA] tracert mpls te tunnel 3

MPLS trace route TE tunnel Tunnel3

  TTL   Replier            Time    Type      Downstream

  0                                Ingress   30.1.1.2/[1148]

  1     30.1.1.2           2 ms    Transit   40.1.1.2/[3]

  2     40.1.1.2           3 ms    Egress

# 在Switch A上執行display mpls lsp命令,可以看到隻剩下一條經過Switch D的CRLSP:

[SwitchA] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

1.1.1.9/3/34313             RSVP     -/1150          Vlan4

30.1.1.2                    Local    -/-             Vlan4

Tunnel3                     Local    -/-             NHLFE1029

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

1.21.7  配置快速重路由示例(手工配置Bypass隧道)

1. 組網需求

·     主CRLSP使用路徑Switch A→Switch B→Switch C→Switch D,要求對Switch B→Switch C這段鏈路通過FRR進行鏈路保護。

·     使用RSVP-TE信令協議、基於顯式路徑約束條件建立MPLS TE隧道的主CRLSP和Bypass隧道,實現兩個IP網絡通過MPLS TE隧道傳輸數據流量。Bypass隧道使用路徑Switch B→Switch E→Switch C(Switch B是本地修複節點PLR,Switch C是彙聚點MP)。

·     在Switch B和Switch C之間配置RSVP-TE與BFD聯動,當Switch B和Switch C之間的鏈路出現故障後,BFD能夠快速檢測並通告RSVP-TE協議,以便快速將流量切換到Bypass隧道。

2. 組網圖

圖1-14 MPLS TE快速重路由配置組網圖

 

設備

接口

IP地址

設備

接口

IP地址

Switch A

Loop0

1.1.1.1/32

Switch B

Loop0

2.2.2.2/32

 

Vlan-int1

2.1.1.1/24

 

Vlan-int1

2.1.1.2/24

 

Vlan-int10

100.1.1.1/24

 

Vlan-int2

3.1.1.1/24

Switch D

Loop0

4.4.4.4/32

 

Vlan-int4

3.2.1.1/24

 

Vlan-int3

4.1.1.2/24

Switch C

Loop0

3.3.3.3/32

 

Vlan-int10

100.1.1.1/24

 

Vlan-int3

4.1.1.1/24

Switch E

Loop0

5.5.5.5/32

 

Vlan-int2

3.1.1.2/24

 

Vlan-int4

3.2.1.2/24

 

Vlan-int5

3.3.1.2/24

 

Vlan-int5

3.3.1.1/24

 

 

 

 

3. 配置步驟

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

按照圖1-14配置各接口的IP地址和掩碼,包括各Loopback接口,具體配置過程略。

(2)     配置IS-IS協議發布接口所在網段的路由,包括Loopback接口(具體配置過程略)

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

# 配置Switch A。

<SwitchA> system-view

[SwitchA] mpls lsr-id 1.1.1.1

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls enable

[SwitchA-Vlan-interface1] mpls te enable

[SwitchA-Vlan-interface1] rsvp enable

[SwitchA-Vlan-interface1] quit

# 配置Switch B。

<SwitchB> system-view

[SwitchB] mpls lsr-id 2.2.2.2

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls enable

[SwitchB-Vlan-interface1] mpls te enable

[SwitchB-Vlan-interface1] rsvp enable

[SwitchB-Vlan-interface1] 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] rsvp bfd enable

[SwitchB-Vlan-interface2] quit

[SwitchB] interface vlan-interface 4

[SwitchB-Vlan-interface4] mpls enable

[SwitchB-Vlan-interface4] mpls te enable

[SwitchB-Vlan-interface4] rsvp enable

[SwitchB-Vlan-interface4] quit

# Switch C的配置與Switch B的配置相似,Switch D、Switch E的配置與Switch A的配置相似,此處不再贅述。

(4)     在主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.2

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

[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隧道;隧道引用顯式路徑pri-path。

[SwitchA] interface tunnel 4 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 path preference 1 explicit-path pri-path

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

[SwitchA-Tunnel4] mpls te fast-reroute

[SwitchA-Tunnel4] quit

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

[SwitchA] display interface tunnel

Tunnel4

Current state: UP

Line protocol current state: UP

Description: Tunnel4 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1496

Internet address: 10.1.1.1/24 (primary)

Tunnel source unknown, destination 4.4.4.4

Tunnel TTL 255

Tunnel protocol/transport CR_LSP

Last clearing of counters: Never

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 1911 bytes/sec, 15288 bits/sec, 0 packets/sec

Input: 0 packets input, 0 bytes, 0 drops

Output: 1526 packets output, 22356852 bytes, 0 drops

# 在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               : 48960           Tunnel ID            : 4

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 3.3.3.3

  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     : 0 kbps

  Reserved Bandwidth   : 0 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  : -               Service-Class        : -

  Path Setup Type      : -/-

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

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

[SwitchB] explicit-path by-path

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

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

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

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

# 配置隧道Tunnel5:目的地址為Switch C的LSR ID(3.3.3.3);采用RSVP-TE信令協議建立MPLS TE隧道;隧道引用顯式路徑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

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

# 配置Bypass隧道可保護的帶寬。

[SwitchB-Tunnel5] mpls te backup bandwidth un-limited

[SwitchB-Tunnel5] quit

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

[SwitchB] interface vlan-interface 2

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

[SwitchB-Vlan-interface2] quit

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

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

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

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

4. 驗證配置

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

[SwitchA] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

1.1.1.1/4/61400             RSVP     -/1245          Vlan1

2.1.1.2                     Local    -/-             Vlan1

[SwitchB] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

1.1.1.1/4/614000            RSVP     1245/3          Vlan2

Backup                               1245/3          Tun5

2.2.2.2/5/30914             RSVP     -/1150          Vlan2

3.2.1.2                     Local    -/-             Vlan4

3.1.1.2                     Local    -/-             Vlan2

[SwitchE] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

2.2.2.2/5/30914             RSVP     1150/3          Vlan5

3.3.1.2                     Local    -/-             Vlan5

# 在PLR上shutdown被保護的出接口Vlan-interface2。

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] shutdown

[SwitchB-Vlan-interface2] quit

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

# 在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               : 18753           Tunnel ID            : 4

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 3.3.3.3

  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     : 0 kbps

  Reserved Bandwidth   : 0 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  : -               Service-Class        : -

  Path Setup Type      : -/-

說明

如果在FRR切換後馬上執行display mpls te tunnel-interface命令查看隧道接口的詳細信息,會看到兩條處於up狀態的CRLSP。這是因為FRR采用make-before-break方式建立新的LSP,舊的LSP在新LSP建立成功後過一段時間才被刪除。

 

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

[SwitchB] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

1.1.1.1/4/61400             RSVP     1136/3          Tun5

2.2.2.2/5/30914             RSVP     -/1149          Vlan4

3.2.1.2                     Local    -/-             Vlan4

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

[SwitchB] mpls te

[SwitchB-te] fast-reroute timer 5

[SwitchB-te] quit

# 在PLR上undo shutdown被保護的出接口Vlan-interface2。

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] undo shutdown

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

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

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

1.21.8  配置自動快速重路由示例

1. 組網需求

·     使用RSVP-TE信令協議、基於顯式路徑約束條件建立主CRLSP。主CRLSP使用的路徑為Switch A→Switch B→Switch C→Switch D。

·     在Switch B上配置自動隧道備份功能,自動為主CRLSP建立Bypass隧道。

·     在Switch B和Switch C之間配置RSVP-TE與BFD聯動,當Switch B和Switch C之間的鏈路出現故障後,BFD能夠快速檢測並通告RSVP-TE協議,以便快速將流量切換到Bypass隧道。

2. 組網圖

圖1-15 MPLS TE自動快速重路由配置組網圖

 

設備

接口

IP地址

設備

接口

IP地址

Switch A

Loop0

1.1.1.1/32

Switch E

Loop0

5.5.5.5/32

 

Vlan-int1

2.1.1.1/24

 

Vlan-int4

3.2.1.2/24

Switch B

Loop0

2.2.2.2/32

 

Vlan-int5

3.4.1.1/24

 

Vlan-int1

2.1.1.2/24

Switch C

Loop0

3.3.3.3/32

 

Vlan-int2

3.1.1.1/24

 

Vlan-int3

4.1.1.1/24

 

Vlan-int4

3.2.1.1/24

 

Vlan-int2

3.1.1.2/24

 

Vlan-int6

3.3.1.1/24

 

Vlan-int5

3.4.1.2/24

Switch D

Loop0

4.4.4.4/32

Switch F

Loop0

6.6.6.6/32

 

Vlan-int3

4.1.1.2/24

 

Vlan-int6

3.3.1.2/24

 

Vlan-int7

4.2.1.2/24

 

Vlan-int7

4.2.1.1/24

 

3. 配置步驟

說明

進行下麵配置之前,需要先全局關閉STP功能,或為每個VLAN映射一個MSTP實例。具體配置方法請參見“二層技術-以太網交換配置指導”中的“生成樹”。

 

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

按照圖1-15配置各接口的IP地址和掩碼,包括各Loopback接口,具體配置過程略。

(2)     配置IS-IS協議發布接口所在網段的路由,包括Loopback接口(具體配置過程略)

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

# 配置Switch A。

<SwitchA> system-view

[SwitchA] mpls lsr-id 1.1.1.1

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls enable

[SwitchA-Vlan-interface1] mpls te enable

[SwitchA-Vlan-interface1] rsvp enable

[SwitchA-Vlan-interface1] quit

# 配置Switch B。

<SwitchB> system-view

[SwitchB] mpls lsr-id 2.2.2.2

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls enable

[SwitchB-Vlan-interface1] mpls te enable

[SwitchB-Vlan-interface1] rsvp enable

[SwitchB-Vlan-interface1] 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] rsvp bfd enable

[SwitchB-Vlan-interface2] quit

[SwitchB] interface vlan-interface 4

[SwitchB-Vlan-interface4] mpls enable

[SwitchB-Vlan-interface4] mpls te enable

[SwitchB-Vlan-interface4] rsvp enable

[SwitchB-Vlan-interface4] quit

[SwitchB] interface vlan-interface 6

[SwitchB-Vlan-interface6] mpls enable

[SwitchB-Vlan-interface6] mpls te enable

[SwitchB-Vlan-interface6] rsvp enable

[SwitchB-Vlan-interface6] quit

# Switch C的配置與Switch B的配置相似,Switch D、Switch E、Switch F的配置與Switch A的配置相似,此處不再贅述。

(4)     在主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.2

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

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

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

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

[SwitchA] interface tunnel 1 mode mpls-te

[SwitchA-Tunnel1] ip address 10.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 path preference 1 explicit-path pri-path

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

[SwitchA-Tunnel1] mpls te fast-reroute

[SwitchA-Tunnel1] quit

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

[SwitchA] display interface tunnel

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1496

Internet address: 10.1.1.1/24 (primary)

Tunnel source unknown, destination 4.4.4.4

Tunnel TTL 255

Tunnel protocol/transport CR_LSP

Last clearing of counters: Never

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 1911 bytes/sec, 15288 bits/sec, 0 packets/sec

Input: 0 packets input, 0 bytes, 0 drops

Output: 1526 packets output, 22356852 bytes, 0 drops

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

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 1

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

Tunnel Attributes      :

  LSP ID               : 16802           Tunnel ID            : 1

  Admin State          : Normal

  Ingress LSR ID       : 2.2.2.2         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     : 0 kbps

  Reserved Bandwidth   : 0 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : exp1

  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  : -               Service-Class        : -

  Path Setup Type      : -/-

(5)     在作為PLR的Switch B上配置自動隧道備份功能

# 全局開啟自動隧道備份功能,並配置自動創建的Bypass隧道接口編號範圍為50~100。

[SwitchB] mpls te

[SwitchB-te] auto-tunnel backup

[SwitchB-te-auto-bk] tunnel-number min 50 max 100

[SwitchB-te-auto-bk] quit

4. 驗證配置

# 在Switch B上執行display interface tunnel brief命令,可以看到自動創建了兩條隧道。

[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

Tun50                UP   DOWN     --

Tun51                UP   DOWN     --

# 在Switch B上執行display mpls te tunnel-interface命令,查看Tunnel50和Tunnel51的信息,可以看到該隧道為自動創建的Bypass隧道,且Tunnel50為節點保護類型的Bypass隧道(Egress LSR ID為4.4.4.4,Switch D的LSR ID),Tunnel51為鏈路保護類型的Bypass隧道(Egress LSR ID為3.3.3.3,Switch C的LSR ID)

[SwitchB] display mpls te tunnel-interface tunnel 50

Tunnel Name            : Tunnel 50

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

Tunnel Attributes      :

  LSP ID               : 16802           Tunnel ID            : 50

  Admin State          : Normal

  Ingress LSR ID       : 2.2.2.2         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     : 0 kbps

  Reserved Bandwidth   : 0 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        : Yes             Auto Created         : Yes

  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  : -               Service-Class        : -

  Path Setup Type      : -/-

[SwitchB] display mpls te tunnel-interface tunnel 51

Tunnel Name            : Tunnel 51

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

Tunnel Attributes      :

  LSP ID               : 16802           Tunnel ID            : 51

  Admin State          : Normal

  Ingress LSR ID       : 2.2.2.2         Egress LSR ID        : 3.3.3.3

  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     : 0 kbps

  Reserved Bandwidth   : 0 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        : Yes             Auto Created         : Yes

  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  : -               Service-Class        : -

  Path Setup Type      : -/-

# 在Switch B上執行display mpls lsp命令,可以看到當前用來保護主CRLSP的Bypass隧道是Tunnel50。

[SwitchB] display mpls lsp

FEC                         Proto    In/Out Label    Out Inter/NHLFE/LSINDEX

2.2.2.2/51/16802            RSVP     -/3             Vlan4

2.2.2.2/1/16802             RSVP     -/1151          Vlan2

Backup                               -/3             Tun50

2.2.2.2/50/16802            RSVP     -/3             Vlan6

3.2.1.2                     Local    -/-             Vlan6

3.3.1.2                     Local    -/-             Vlan6

# 在Switch A上執行display rsvp lsp verbose命令,查看Tunnel ID為1的MPLS TE隧道的詳細信息,可以看到主CRLSP Tunnel1被節點保護類型的自動隧道Tunnel50保護。

[SwitchA] display rsvp lsp tunnel-id 1 verbose

Tunnel name: SwitchA_t1

Destination: 4.4.4.4                      Source: 1.1.1.1

Tunnel ID: 1                              LSP ID: 16802

LSR type: Ingress                         Direction: Unidirectional

Setup priority: 7                         Holding priority: 7

In-Label: -                               Out-Label: 1150

In-Interface: -                           Out-Interface: Vlan1

Nexthop: 2.1.1.2                          Exclude-any: 0

Include-Any: 0                            Include-all: 0

Average bitrate: 0 kbps                   Maximum burst: 1000.00 bytes

Path MTU: 1500                            Class type: CT0

RRO number: 12

  2.1.1.1/32         Flag: 0x00 (No FRR)

  2.1.1.2/32         Flag: 0x00 (No FRR)

  1150               Flag: 0x01 (Global label)

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

  3.1.1.1/32         Flag: 0x09 (FRR Avail/Node-Prot)

  3.1.1.2/32         Flag: 0x00 (No FRR)

  1151               Flag: 0x01 (Global label)

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

  4.1.1.1/32         Flag: 0x00 (No FRR)

  4.1.1.2/32         Flag: 0x00 (No FRR)

  3                  Flag: 0x01 (Global label)

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

Fast Reroute protection: Ready

  FRR inner label: 3           Bypass tunnel: Tunnel50

1.21.9  配置IETF DS-TE模式MPLS TE隧道示例

1. 組網需求

·     設備Switch A、Switch B、Switch C和Switch D運行IS-IS,且都是Level-2設備;

·     使用RSVP-TE建立一條從Switch A到Switch D的MPLS TE隧道,實現兩個IP網絡通過MPLS TE隧道傳輸數據流量,該隧道的流量屬於CT 2,所需帶寬為4000kbps;

·     隧道沿途的鏈路最大帶寬為10000kbps,鏈路最大可預留帶寬為10000kbps,BC 1的最大可預留帶寬為8000kbps,BC 2的最大可預留帶寬為5000kbps,BC 3的最大可預留帶寬為2000kbps。

2. 組網圖

圖1-16 IETF DS-TE配置組網圖

 

設備

接口

IP地址

設備

接口

IP地址

Switch A

Loop0

1.1.1.9/32

Switch D

Loop0

4.4.4.9/32

 

Vlan-int1

10.1.1.1/24

 

Vlan-int3

30.1.1.2/24

 

Vlan-int10

100.1.1.1/24

 

Vlan-int10

100.1.2.1/24

Switch B

Loop0

2.2.2.9/32

Switch C

Loop0

3.3.3.9/32

 

Vlan-int1

10.1.1.2/24

 

Vlan-int3

30.1.1.1/24

 

Vlan-int2

20.1.1.1/24

 

Vlan-int2

20.1.1.2/24

 

3. 配置步驟

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

按照圖1-16配置各接口的IP地址和掩碼,具體配置過程略。

(2)     配置IS-IS協議發布接口所在網段的路由,包括Loopback接口

# 配置Switch A。

<SwitchA> system-view

[SwitchA] isis 1

[SwitchA-isis-1] network-entity 00.0005.0000.0000.0001.00

[SwitchA-isis-1] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] isis enable 1

[SwitchA-Vlan-interface1] isis circuit-level level-2

[SwitchA-Vlan-interface1] quit

[SwitchA] interface loopback 0

[SwitchA-LoopBack0] isis enable 1

[SwitchA-LoopBack0] isis circuit-level level-2

[SwitchA-LoopBack0] quit

# 配置Switch B。

<SwitchB> system-view

[SwitchB] isis 1

[SwitchB-isis-1] network-entity 00.0005.0000.0000.0002.00

[SwitchB-isis-1] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] isis enable 1

[SwitchB-Vlan-interface1] isis circuit-level level-2

[SwitchB-Vlan-interface1] quit

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] isis enable 1

[SwitchB-Vlan-interface2] isis circuit-level level-2

[SwitchB-Vlan-interface2] quit

[SwitchB] interface loopback 0

[SwitchB-LoopBack0] isis enable 1

[SwitchB-LoopBack0] isis circuit-level level-2

[SwitchB-LoopBack0] quit

# 配置Switch C。

<SwitchC> system-view

[SwitchC] isis 1

[SwitchC-isis-1] network-entity 00.0005.0000.0000.0003.00

[SwitchC-isis-1] quit

[SwitchC] interface vlan-interface 3

[SwitchC-Vlan-interface3] isis enable 1

[SwitchC-Vlan-interface3] isis circuit-level level-2

[SwitchC-Vlan-interface3] quit

[SwitchC] interface vlan-interface 2

[SwitchC-Vlan-interface2] isis enable 1

[SwitchC-Vlan-interface2] isis circuit-level level-2

[SwitchC-Vlan-interface2] quit

[SwitchC] interface loopback 0

[SwitchC-LoopBack0] isis enable 1

[SwitchC-LoopBack0] isis circuit-level level-2

[SwitchC-LoopBack0] quit

# 配置Switch D。

<SwitchD> system-view

[SwitchD] isis 1

[SwitchD-isis-1] network-entity 00.0005.0000.0000.0004.00

[SwitchD-isis-1] quit

[SwitchD] interface vlan-interface 3

[SwitchD-Vlan-interface3] isis enable 1

[SwitchD-Vlan-interface3] isis circuit-level level-2

[SwitchD-Vlan-interface3] quit

[SwitchD] interface loopback 0

[SwitchD-LoopBack0] isis enable 1

[SwitchD-LoopBack0] isis circuit-level level-2

[SwitchD-LoopBack0] quit

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

[SwitchA] display ip routing-table

Destinations : 10       Routes : 10

Destination/Mask   Proto   Pre Cost        NextHop         Interface

1.1.1.9/32         Direct  0   0           127.0.0.1       InLoop0

2.2.2.9/32         IS_L1   15  10          10.1.1.2        Vlan1

3.3.3.9/32         IS_L1   15  20          10.1.1.2        Vlan1

4.4.4.9/32         IS_L1   15  30          10.1.1.2        Vlan1

10.1.1.0/24        Direct  0   0           10.1.1.1        Vlan1

10.1.1.1/32        Direct  0   0           127.0.0.1       InLoop0

20.1.1.0/24        IS_L1   15  20          10.1.1.2        Vlan1

30.1.1.0/24        IS_L1   15  30          10.1.1.2        Vlan1

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0

(3)     配置LSR ID,開啟MPLS、MPLS TE和RSVP-TE能力,並將DS-TE模式配置為IETF模式

# 配置Switch A。

[SwitchA] mpls lsr-id 1.1.1.9

[SwitchA] mpls te

[SwitchA-te] ds-te mode ietf

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls enable

[SwitchA-Vlan-interface1] mpls te enable

[SwitchA-Vlan-interface1] rsvp enable

[SwitchA-Vlan-interface1] quit

# 配置Switch B。

[SwitchB] mpls lsr-id 2.2.2.9

[SwitchB] mpls te

[SwitchB-te] ds-te mode ietf

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls enable

[SwitchB-Vlan-interface1] mpls te enable

[SwitchB-Vlan-interface1] rsvp enable

[SwitchB-Vlan-interface1] 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

# 配置Switch C。

[SwitchC] mpls lsr-id 3.3.3.9

[SwitchC] mpls te

[SwitchC-te] ds-te mode ietf

[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 2

[SwitchC-Vlan-interface2] mpls enable

[SwitchC-Vlan-interface2] mpls te enable

[SwitchC-Vlan-interface2] rsvp enable

[SwitchC-Vlan-interface2] quit

# 配置Switch D。

[SwitchD] mpls lsr-id 4.4.4.9

[SwitchD] mpls te

[SwitchD-te] ds-te mode ietf

[SwitchD-te] quit

[SwitchD] rsvp

[SwitchD-rsvp] quit

[SwitchD] interface vlan-interface 3

[SwitchD-Vlan-interface3] mpls enable

[SwitchD-Vlan-interface3] mpls te enable

[SwitchD-Vlan-interface3] rsvp enable

[SwitchD-Vlan-interface3] quit

(4)     配置IS-IS TE

# 配置Switch A。

[SwitchA] isis 1

[SwitchA-isis-1] cost-style wide

[SwitchA-isis-1] mpls te enable level-2

[SwitchA-isis-1] quit

# 配置Switch B。

[SwitchB] isis 1

[SwitchB-isis-1] cost-style wide

[SwitchB-isis-1] mpls te enable level-2

[SwitchB-isis-1] quit

# 配置Switch C。

[SwitchC] isis 1

[SwitchC-isis-1] cost-style wide

[SwitchC-isis-1] mpls te enable level-2

[SwitchC-isis-1] quit

# 配置SwitchD。

[SwitchD] isis 1

[SwitchD-isis-1] cost-style wide

[SwitchD-isis-1] mpls te enable level-2

[SwitchD-isis-1] quit

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

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

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls te max-link-bandwidth 10000

[SwitchA-Vlan-interface1] mpls te max-reservable-bandwidth rdm 10000 bc1 8000 bc2 5000 bc3 2000

[SwitchA-Vlan-interface1] quit

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

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls te max-link-bandwidth 10000

[SwitchB-Vlan-interface1] mpls te max-reservable-bandwidth rdm 10000 bc1 8000 bc2 5000 bc3 2000

[SwitchB-Vlan-interface1] quit

[SwitchB] interface vlan-interface 2

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

[SwitchB-Vlan-interface2] mpls te max-reservable-bandwidth rdm 10000 bc1 8000 bc2 5000 bc3 2000

[SwitchB-Vlan-interface2] quit

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

[SwitchC] interface vlan-interface 3

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

[SwitchC-Vlan-interface3] mpls te max-reservable-bandwidth rdm 10000 bc1 8000 bc2 5000 bc3 2000

[SwitchC-Vlan-interface3] quit

[SwitchC] interface vlan-interface 2

[SwitchC-Vlan-interface2] mpls te max-link-bandwidth 10000

[SwitchC-Vlan-interface2] mpls te max-reservable-bandwidth rdm 10000 bc1 8000 bc2 5000 bc3 2000

[SwitchC-Vlan-interface2] quit

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

[SwitchD] interface vlan-interface 3

[SwitchD-Vlan-interface3] mpls te max-link-bandwidth 10000

[SwitchD-Vlan-interface3] mpls te max-reservable-bandwidth rdm 10000 bc1 8000 bc2 5000 bc3 2000

[SwitchD-Vlan-interface3] quit

(6)     配置MPLS TE隧道

# 在Switch A上配置MPLS TE隧道Tunnel1:目的地址為Switch D的LSR ID(4.4.4.9);采用RSVP-TE信令協議建立MPLS TE隧道;隧道的流量屬於CT 2,所需帶寬為4000kbps;隧道的建立和保持優先級均為0。

[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.9

[SwitchA-Tunnel1] mpls te signaling rsvp-te

[SwitchA-Tunnel1] mpls te bandwidth ct2 4000

[SwitchA-Tunnel1] mpls te priority 0

[SwitchA-Tunnel1] quit

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

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

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

4. 驗證配置

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

[SwitchA] display interface tunnel

Tunnel4

Current state: UP

Line protocol current state: UP

Description: Tunnel4 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1496

Internet address: 7.1.1.1/24 (primary)

Tunnel source unknown, destination 4.4.4.9

Tunnel TTL 255

Tunnel protocol/transport CR_LSP

Last clearing of counters: Never

Last 300 seconds input rate:  0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate:  0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drop

Output: 0 packets, 0 bytes, 0 drop

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

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 1

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

Tunnel Attributes      :

  LSP ID               : 36882           Tunnel ID            : 1

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.9         Egress LSR ID        : 4.4.4.9

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : SE

  Tunnel mode          : -

  Reverse-LSP name     : -

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

  Class Type           : CT2             Tunnel Bandwidth     : 4000 kbps

  Reserved Bandwidth   : 4000 kbps

  Setup Priority       : 0               Holding Priority     : 0

  Affinity Attr/Mask   : 0/0

  Explicit Path        : -

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Disabled        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  : -               Service-Class        : -

  Path Setup Type      : -/-

# 在Switch A上執行display mpls te link-management bandwidth-allocation命令查看接口帶寬信息。

[SwitchA] display mpls te link-management bandwidth-allocation interface vlan-interface 1

Interface:  Vlan-interface1

  Max Link Bandwidth                          : 10000 kbps

  Max Reservable Bandwidth of Prestandard RDM : 0 kbps

  Max Reservable Bandwidth of IETF RDM        : 10000 kbps

  Max Reservable Bandwidth of IETF MAM        : 0 kbps

  Allocated Bandwidth-Item Count  : 1

  Allocated Bandwidth             : 0 kbps

  Physical Link Status            : Up

  BC  Prestandard RDM(kbps)  IETF RDM(kbps)       IETF MAM(kbps)

  0   0                      10000                0

  1   0                      8000                 0

  2   -                      5000                 0

  3   -                      2000                 0

  TE Class    Class Type    Priority   BW Reserved(kbps)  BW Available(kbps)

  0           0             0          0                  0

  1           0             1          0                  0

  2           0             2          0                  0

  3           0             3          0                  0

  4           0             4          0                  0

  5           0             5          0                  0

  6           0             6          0                  0

  7           0             7          0                  0

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

1.22  MPLS TE常見故障處理

1.22.1  不能產生TE LSA

1. 故障現象

配置OSPF TE,無法產生描述MPLS TE信息的TE LSA。

2. 故障分析

至少有一個OSPF鄰居達到FULL狀態時,才可能產生TE LSA。

3. 處理過程

·     執行display current-configuration命令,檢查是否在相關接口上配置了MPLS TE;

·     執行debugging ospf mpls-te命令打開OSPF TE的調試開關,檢查OSPF是否收到建立TE LINK的消息;

·     執行display ospf peer命令,檢查OSPF鄰居是否正常建立。

 

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

BOB登陆
官網
聯係我們