Cisco MPLS流量工程TE隧道的基本配置

Cisco MPLS流量工程TE 隧道的基本配置
                       Maa 2007-8-9 NJ
 

1 流量工程簡介

TETraffic Engineering的縮寫,即流量工程的意思。流量工程的本質就是將業務流量映射到實際的物理路徑上。就MPLS而言,其中心思想就是根據網絡的實際狀況爲數據流肯定合適的lsp並在該lsp上快速轉發數據流,經過優化網絡資源的使用,避免負載不均衡而致使的網絡擁塞。
說到MPLS TE,不得不提到流量工程的四個基礎功能部件,即信息發佈、通路選擇、信令和數據轉發,這四個部件造成了整個流量工程的工做流程,所以是重中之重的內容,這裏將介紹每一個部件的主要做用。
信息發佈:MPLS流量工程使用擴展的IGP-TE來向外通告和獲取網絡拓撲狀態信息,並造成鏈路狀態數據庫LSDB和流量工程數據庫TEDB,其中LSDB用於傳統的SPF計算,而TEDB用於創建TE隧道時進行選路的計算。這裏的信息發佈組件就是IGP-TEIGP-TE是在普通IGP的基礎之上擴展了對第10lsa的支持,即opaque-lsaopaque-lsa能夠表徵最大鏈路帶寬、最大預定鏈路帶寬、當前預留帶寬、當前使用帶寬和鏈路顏色等屬性,從而造成對應的TEDB
通路選擇組件:具體的通路選擇組件固然是CSPF了,即基於約束的SPF算法。在TEDB造成以後,入口LSR使用CSPF計算每條lsp的物理路徑。
信令組件:這裏的信令組件能夠是RSVP-TE或者CR-LDP,目前業界通常都使用RSVP-TE做爲MPLS流量工程的信令組件,其做用主要是根據通路選擇組件計算出來的路徑創建lsp,預留資源並分發標籤等。
數據轉發組件:既然是MPLS流量工程,數據轉發組件固然是MPLS了,在信令組件成功的創建了lsp以後,採用MPLS對數據報文進行標籤交換和轉發處理。
這樣,整個MPLS流量工程大體的工做機制也就展示在你們眼前了,因爲不是本文的重點,再也不作更詳細的闡述,僅爲你們對流量工程的理解作一個鋪墊。

2 Cisco流量工程的配置

配置要素以下:
配置IGP-TE,使IGP可以支持opaque-lsa
配置路由器支持TE功能,即全局模式下使能流量工程;
配置對應物理接口支持TE功能,即接口模式下使能流量工程;
配置TE隧道。
 
以下圖拓撲,R1R2R3互連,從R1創建一條到R3TE隧道,其具體的配置以下,在此以R1爲例對其配置進行關鍵註釋:
 
 
[R1]
R1#
R1#show run
Building configuration...
Current configuration : 1816 bytes
!
version 12.4
!
hostname R1
!
mpls traffic-eng tunnels /* 全局模式下使能 mpls-te 功能 */
!
interface Loopback0
 ip address 202.1.1.1 255.255.255.255
!
interface Tunnel1 /* 配置隧道 tunnel1*/
 ip unnumbered Loopback0 /* 配置該隧道 ip 地址,也可使用 ip address 方式配置隧道 ip 地址 */
 tunnel destination 202.1.1.3 /* 配置該隧道的目的地址 */
 tunnel mode mpls traffic-eng /* 配置隧道的模式爲 mpls-te*/
 tunnel mpls traffic-eng autoroute announce /* 配置該隧道的自動路由功能 */
 tunnel mpls traffic-eng priority 6 6 /* 配置該隧道的優先級 */
 tunnel mpls traffic-eng bandwidth 3000 /* 配置該隧道的帶寬 */
 tunnel mpls traffic-eng path-option 16 explicit name t1 /* 配置隧道的顯示路徑 */
 tunnel mpls traffic-eng record-route /* 配置隧道記錄標籤信息 */
!
interface Ethernet4/0
 ip address 80.1.2.1 255.255.255.0
 duplex half
 mpls traffic-eng tunnels /* 接口模式下使能 mpls-te 功能 */
 ip rsvp bandwidth 10000 /* 配置接口的總 te 帶寬 */
!
router ospf 1
 mpls traffic-eng router-id Loopback0 /* 使能 ospf-te mpls-te router-id*/
 mpls traffic-eng area 0 /* ospf-te area 0 中使能 mpls-te*/
network 80.1.2.0 0.0.0 .255 area 0
 network 202.1.1.1 0.0.0 .0 area 0
!
ip explicit-path name t1 enable /* 配置隧道使用的顯示路徑 */
 next-address 80.1.2.2
 next-address 80.2.3.2
!
end
R1#
 
[R2]
R2#
R2#show run
Building configuration...
Current configuration : 1495 bytes
!
version 12.4
!
hostname R2
!
mpls traffic-eng tunnels
!
interface Loopback0
 ip address 202.1.1.2 255.255.255.255
!
interface Ethernet4/0
 ip address 80.1.2.2 255.255.255.0
 duplex full
 mpls traffic-eng tunnels
 ip rsvp bandwidth 10000
!
interface Ethernet4/1
 ip address 80.2.3.1 255.255.255.0
 duplex half
 mpls traffic-eng tunnels
 ip rsvp bandwidth 15000
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
network 80.1.2.0 0.0.0 .255 area 0
 network 80.2.3.0 0.0.0 .255 area 0
 network 202.1.1.2 0.0.0 .0 area 0
!
end
R2#
 
[R3]
R3#show run
Building configuration...
Current configuration : 1423 bytes
!
version 12.4
!
hostname R3
!
mpls traffic-eng tunnels
!
interface Loopback0
 ip address 202.1.1.3 255.255.255.255
!
interface Ethernet4/1
 ip address 80.2.3.2 255.255.255.0
 duplex half
 mpls traffic-eng tunnels
 ip rsvp bandwidth 15000
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
network 80.2.3.0 0.0.0 .255 area 0
 network 202.1.1.3 0.0.0 .0 area 0
!
end
R3#
 

3 Cisco流量工程的診斷

上面完成了TE的相關配置,這時須要一些基本的診斷方式來肯定隧道的狀態是否狀態,這些診斷命令以下:
一、  檢查隧道的狀態:
 
show mpls traffic-eng tunnels brief
該命令顯示隧道的簡要信息,用於在隧道數目比較多的時候方便查詢隧道的信息,好比下面的信息:
 
R1#show mpls traffic-eng tunnels brief                                          
Signalling Summary:                                                            
    LSP Tunnels Process:            running                                    
    RSVP Process:                   running                                     
    Forwarding:                     enabled                                    
    Periodic reoptimization:        every 3600 seconds, next in 1015 seconds   
    Periodic auto-bw collection:    disabled                                    
TUNNEL NAME              DESTINATION      UP IF     DOWN IF   STATE/PROT
R1_t1                       202.1.1.3          -          Et4/0       up/up    
Displayed 1 (of 1) heads, 0 (of 0) midpoints, 0 (of 0) tails        
 
從上面的信息能夠看出R1_t1的目的地爲202.1.1.3,沒有上行入接口(即該隧道爲本地隧道),下行出接口爲Et4/0,狀態爲up;同時能夠看到一些全局的參數,好比周期性的重優化時間爲3600秒,週期性自動帶寬採集功能是禁用的等等。
 
show mpls traffic-eng tunnels
該命令顯示通過本節點全部隧道的詳細信息,因爲查看隧道更具體的參數,好比下面的信息:
 
R1#show mpls traffic-eng tunnels                                               
                                                                               
Name: R1_t1                               (Tunnel1) Destination: 202.1.1.3     
  Status:                                                                      
    Admin: up         Oper: up     Path: valid       Signalling: connected     
                                                                               
    path option 16, type explicit t1 (Basis for Setup, path weight 20)         
                                                                                
  Config Parameters:                                                           
    Bandwidth: 3000     kbps (Global)  Priority: 6  6   Affinity: 0x0/0xFFFF   
    Metric Type: TE (default)                                                   
    AutoRoute:  enabled   LockDown: disabled  Loadshare: 3000     bw-based     
    auto-bw: disabled                                                          
                                                                                
  InLabel  :  -                                                                
  OutLabel : Ethernet4/0, 16                                                   
  RSVP Signalling Info:                                                         
       Src 202.1.1.1, Dst 202.1.1.3, Tun_Id 1, Tun_Instance 16                 
    RSVP Path Info:                                                            
      My Address: 80.1.2.1                                                      
      Explicit Route: 80.1.2.2 80.2.3.1 80.2.3.2 202.1.1.3                     
      Record Route:                                                            
      Tspec: ave rate=3000 kbits, burst=1000 bytes, peak rate=3000 kbits       
    RSVP Resv Info:                                                            
      Record Route: 80.1.2.2 80.2.3.2                                          
      Fspec: ave rate=3000 kbits, burst=1000 bytes, peak rate=3000 kbits       
  History:                                                                      
    Tunnel:                                                                    
      Time since created: 1 hours                                              
      Time since path change: 16 minutes, 42 seconds                           
    Current LSP:                                                               
      Uptime: 16 minutes, 42 seconds                                           
    Prior LSP:                                                                  
      ID: path option 16 [15]                                                  
      Removal Trigger: tunnel shutdown                                         
R1#                        
 
從上面的信息能夠看出隧道帶寬、優先級、親和屬性和管理組、自動路由和負載均衡等等參數,同時也能夠看到隧道的入標籤、入接口、出標籤和出接口等等,這裏就不詳細闡述了。
                                    
二、  檢查ospfopaque數據庫
 
show ip ospf database opaque-area
該命令顯示ospf-te生成的opaque-lsa數據庫,用來檢查是否有顯示路徑上的接口沒有在該數據庫中。
 
R1#show ip ospf database opaque-area                                            
                                                                               
            OSPF Router with ID (202.1.1.1) (Process ID 1)                     
                                                                                
                Type-10 Opaque Link Area Link States (Area 0)                  
                                                                               
  LS age: 1429                                                                 
  Options: (No TOS-capability, DC)                                             
  LS Type: Opaque Area Link                                                    
  Link State ID: 1.0.0 .0                                                       
  Opaque Type: 1                                                                
  Opaque ID: 0                                                                 
  Advertising Router: 202.1.1.1                                                
  LS Seq Number: 8000000B                                                       
  Checksum: 0x 8C 43                                                             
  Length: 132                                                                  
  Fragment number : 0                                                           
                                                                               
    MPLS TE router ID : 202.1.1.1                                              
                                                                                
    Link connected to Broadcast network                                        
      Link ID : 80.1.2.2                                                       
      Interface Address : 80.1.2.1                                              
      Admin Metric : 10                                                        
      Maximum bandwidth : 1250000                                              
      Maximum reservable bandwidth : 1250000                                   
      Number of Priority : 8                                                   
      Priority 0 : 1250000     Priority 1 : 1250000                            
      Priority 2 : 1250000     Priority 3 : 1250000                            
      Priority 4 : 1250000     Priority 5 : 1250000                            
      Priority 6 : 875000      Priority 7 : 875000                             
      Affinity Bit : 0x0                                                       
      IGP Metric : 10                                                           
                                                                               
    Number of Links : 1                                                        
                                                                                
  LS age: 2030                                                                 
  Options: (No TOS-capability, DC)                                             
  LS Type: Opaque Area Link                                                     
  Link State ID: 1.0.0 .0                                                       
  Opaque Type: 1                                                               
  Opaque ID: 0                                                                  
  Advertising Router: 202.1.1.2                                                
  LS Seq Number: 80000002                                                      
  Checksum: 0x79E7                                                             
  Length: 132                                                                  
  Fragment number : 0                                                          
                                                                               
    MPLS TE router ID : 202.1.1.2                                              
                                                                               
    Link connected to Broadcast network                                        
      Link ID : 80.1.2.2                                                        
      Interface Address : 80.1.2.2                                             
      Admin Metric : 10                                                        
      Maximum bandwidth : 1250000                                               
      Maximum reservable bandwidth : 1250000                                   
      Number of Priority : 8                                                   
      Priority 0 : 1250000     Priority 1 : 1250000                             
      Priority 2 : 1250000     Priority 3 : 1250000                            
      Priority 4 : 1250000     Priority 5 : 1250000                            
      Priority 6 : 1250000     Priority 7 : 1250000                             
      Affinity Bit : 0x0                                                       
      IGP Metric : 10                                                          
                                                                               
    Number of Links : 1                                                        
                                                                               
  LS age: 38                                                                   
  Options: (No TOS-capability, DC)                                             
  LS Type: Opaque Area Link                                                    
  Link State ID: 1.0.0 .0                                                       
  Opaque Type: 1                                                                
  Opaque ID: 0                                                                 
  Advertising Router: 202.1.1.3                                                
  LS Seq Number: 80000004                                                       
  Checksum: 0xD5EC                                                             
  Length: 132                                                                  
  Fragment number : 0                                                           
                                                                               
    MPLS TE router ID : 202.1.1.3                                              
                                                                                
    Link connected to Broadcast network                                        
      Link ID : 80.2.3.2                                                       
      Interface Address : 80.2.3.2                                              
      Admin Metric : 10                                                        
      Maximum bandwidth : 1250000                                              
      Maximum reservable bandwidth : 1875000                                   
      Number of Priority : 8                                                   
      Priority 0 : 1875000     Priority 1 : 1875000                            
      Priority 2 : 1875000     Priority 3 : 1875000                            
      Priority 4 : 1875000     Priority 5 : 1875000                            
      Priority 6 : 1875000     Priority 7 : 1875000                            
      Affinity Bit : 0x0                                                       
      IGP Metric : 10                                                           
                                                                               
    Number of Links : 1                                                        
                                                                                
  LS age: 1431                                                                 
  Options: (No TOS-capability, DC)                                             
  LS Type: Opaque Area Link                                                     
  Link State ID: 1.0.0 .1                                                       
  Opaque Type: 1                                                               
  Opaque ID: 1                                                                  
  Advertising Router: 202.1.1.2                                                
  LS Seq Number: 8000000A                                                       
  Checksum: 0xA360                                                             
  Length: 124                                                                  
  Fragment number : 1                                                          
                                                                               
    Link connected to Broadcast network                                        
      Link ID : 80.2.3.2                                                       
      Interface Address : 80.2.3.1                                             
      Admin Metric : 10                                                         
      Maximum bandwidth : 1250000                                              
      Maximum reservable bandwidth : 1875000                                   
      Number of Priority : 8                                                   
      Priority 0 : 1875000     Priority 1 : 1875000                            
      Priority 2 : 1875000     Priority 3 : 1875000                            
      Priority 4 : 1875000     Priority 5 : 1875000                            
      Priority 6 : 1500000     Priority 7 : 1500000                            
      Affinity Bit : 0x0                                                       
      IGP Metric : 10                                                           
                                                                               
    Number of Links : 1                                                        
                                                                                
R1#          
 
在本文拓撲中的TE隧道的顯示路徑共有四個接口,其ip地址分別是:80.1.2.180.1.2.280.2.3.180.2.3.2,咱們在opaque數據庫中能夠看到interface address分別是這四個地址的鏈路狀態信息,若是缺乏顯示路徑上任何一個接口的鏈路狀態信息的話,TE隧道是不可能創建起來的,同時該鏈路狀態信息還記錄了該鏈路能夠提供的基於8個優先級的TE總帶寬,當TE隧道有帶寬的要求時,在cspf計算中還必須考慮到接口的帶寬是否可以知足隧道的帶寬需求,若是不知足,TE隧道仍然是不能創建的。
 
三、  診斷調試命令
 
debug ip rsvp
該命令用於對TE隧道的調試或者相關信息,尤爲是信令信息的捕獲,具體能夠調試的功能以下:
 
R1#debug ip rsvp ?                                                             
  CLI              RSVP CLI events                                             
  all              RSVP messages for all categories                            
  api              RSVP API events                                             
  authentication   RSVP authentication events and messages                     
  database         RSVP database debugging                                     
  dump-messages    Dump RSVP message contents                                  
  filter           RSVP filter information                                     
  handles          RSVP database handles events                                 
  messages         RSVP messages (sent/received via IP) debugging              
  msg-mgr          RSVP Message Manager events                                 
  path             RSVP PATH messages                                           
  policy           RSVP policy information                                     
  proxy            RSVP Proxy API trace                                        
  rate-limit       RSVP Rate Limiting Messages                                  
  reliable-msg     RSVP Reliable Messages events                               
  resv             RSVP RESV messages                                          
  routing          RSVP Routing Messages                                       
  sbm              RSVP SBM messages                                           
  signalling       RSVP Signalling (PATH and RESV) messages                    
  snmp             RSVP SNMP events                                            
  summary-refresh  RSVP Srefresh and Bundle Messages events                    
  svc              RSVP SVC events                                             
  traffic-control  RSVP traffic control events                                 
  wfq              RSVP WFQ events                                             
  <cr>                                                                
 

4 Cisco流量工程的協議報文

流量工程的主要協議報文爲pathresvpatherrresverrpathtearresvtear等,這裏只列舉正常狀況下捕獲的path消息和resv消息,其具體的做用在後續的文檔中討論,本文只對基本配置進行講解。
 
Path
 
 
 
Resv
 
相關文章
相關標籤/搜索