簡介
本檔案介紹如何使用部分SR部署為基於LDP的流量提供SR優勢,包括在域間MPLS使用案例中可能應用SR。
必備條件
需求
思科建議您瞭解以下主題:
採用元件
本文中的資訊係根據以下軟體和硬體版本:
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
本檔案將簡要說明當支援SR的路由器和不支援SR的路由器混雜於同一個網路中(且更確切地說是位於同一個路由網域中)時,SR與LDP進行互動的機制。
在節點上運行的組播控制平面客戶端(MCC)必須確保它安裝在節點的MPLS資料平面中的傳入標籤被唯一分配,並且分段路由使用分段路由全域性塊(SRGB)進行標籤分配。SRGB的使用允許SR與任何其他MCC共存。
提示:此資訊有助於您使用Inter-AS選項C為MPLS SR和MPLS LDP提供Inter-AS解決方案。
問題
在具有SR MPLS控制平面的異構環境中的SR部署使用RFC 4364中定義的Inter-AS選項C與MPLS LDP控制平面進行互操作。
本檔案介紹一種方法,透過此方法,服務供應商網路使用MPLS LDP和SR MPLS提供使用Inter-AS選項C的虛擬私人網路。
解決方案
Inter-AS選項C的簡要概述:
Inter-AS選項C是RFC 4364中介紹的用於互連多AS主幹的第三個選項。這是迄今為止三種方法中可擴充性最好的方法,而且它還有自己的適用場景,我們必須注意才能正確地應用此設計。
選項C是可伸縮的,因此是一個很好的候選選項。ASBR不承載任何VPN路由,它們只負責在自己的AS內分配PE的標籤IPv4路由。
為了提高可擴充性,一個MP-EBGP VPNv4會話在PE或RR之間傳輸所有VPN路由(外部路由)。在使用RR交換外部路由的情況下,必須保留VPNv4路由的下一跳。
ASBR使用EBGP在AS(內部路由)之間交換內部PE路由資訊。這些內部路由對應於PE或RR之間通過多跳MP-EBGP會話通告的外部路由的BGP下一跳。ASBR通告的內部路由可用於在PE之間建立MP-EBGP會話,並允許從入口到出口PE建立LSP。
從可擴充性角度來看,選項C是一個非常好的解決方案,是選擇同一SP多AS網路的途徑。
分段工藝路線的簡要概述:
區段路由(SR)利用來源路由和通道正規化。節點通過一組受控指令(稱為段)引導資料包,方法是使用SR報頭對資料包進行預置。段可以表示任何指令、拓撲或基於服務。SR允許透過任何拓撲路徑和服務鏈強制執行流量,但只在SR網域的輸入節點維持每個流量的狀態。分段路由架構可以直接應用到MPLS資料平面,轉發平面的變化很小。它需要對現有鏈路狀態路由協定進行次要擴展。分段路由還可以使用新型路由擴展報頭應用於IPv6。
將網段編碼為MPLS標籤。有序的段清單被編碼為標籤的堆疊。要處理的區段位於堆疊的頂部。完成區段後,相關標籤會從堆疊中彈出。 根據傳統MPLS轉發,分段路由MPLS資料平面操作包括推送、交換和pop。在「段佈線」中定義以下段型別:
SR全域性塊
段路由全域性塊(SRGB)是在LSD中保留用於段路由的標籤值範圍。SRGB標籤值被指定為支援SR的節點的字首段識別符號(SID),並且在整個域中具有全域性意義。
- SR標籤範圍不能從16,000以下開始。預設SR全域性塊為:16,000 - 24,000。
- SRGB配置不是特定於地址系列的,因為中定義的路由器功能TLV的「SR-Capabilities Sub-TLV」不是特定於地址系列的。
- 如果CLI導致擴展或移動預設SRGB,則要求重新載入即可,但前提是客戶端的標籤位於新範圍內。
- 在配置SRGB之前,管理員需要確保為分段路由配置的標籤庫的一部分是空閒的,並且沒有被任何其他MPLS LSD客戶端使用。
SR對映伺服器
對映伺服器為部分或全部已知字首集中分配字首SID。路由器必須能夠充當對映伺服器、對映客戶端,或同時充當這兩者。
- 對映伺服器是一種控制平面機制,其位置與BGP路由反射器類似
- 允許使用者配置非重疊SID對映條目,以指定某些或所有字首的字首SID。
- ISIS在「SID/標籤繫結TLV」中通告本地SID對映策略
- 對映伺服器必須是可復原的,應提供冗餘
對映伺服器的主要功能包括:
- 代表對映伺服器上配置的其他不支援SR的節點在IGP中通告「字首到SID」對映
- 啟用支援SR的節點與(不支援SR的)LDP節點互通,SR/LDP互通需要對映伺服器
對映客戶端
- 接收並解析遠端接收的SID/標籤繫結TLV,以建立遠端SID對映條目。使用遠端獲取和本地配置的對映條目,構建不重疊的一致活動對映策略。
- IGP例項使用活動對映策略來計算部分或全部字首的字首SID。
本節幫助您瞭解和配置提供商網路之間使用SR功能網路對等/連線非SR功能網路的第3層虛擬專用網路(VPN)服務。在本節中,您將學習如何配置RFC "4364"中定義的選項C和使用案例。
拓撲 — AS間選項C(帶路由反射器)

拓撲圖簡要概述
在拓撲圖的頂部,我們有一個啟用SR的網路,其中包含路由反射器、提供商邊緣路由器和客戶邊緣路由器。
客戶邊緣路由器CE1和CE2分別具有VRF A和VRF B。這屬於AS 65002。
在拓撲圖的底部,我們有一個支援LDP的網路,其中包含路由反射器、提供商邊緣路由器和客戶邊緣路由器。
客戶邊緣路由器CE3和CE4分別具有VRF A和VRF B。這屬於AS65001。
啟用SR和LDP的網路兩端的VRF A和VRF B需要相互通訊。
IP定址方案
主機名 |
IP 位址 |
RR-01 |
10.0.0.1 |
RR-02 |
10.0.0.2 |
PE1 |
10.0.0.3 |
PE2 |
10.0.0.4 |
CE1 |
10.0.0.5 |
CE2 |
10.0.0.6 |
RR-03 |
10.0.1.1 |
RR-04 |
10.0.1.2 |
PE5 |
10.0.1.3 |
PE6 |
10.0.1.4 |
CE3 |
10.0.1.5 |
CE4 |
10.0.1.6 |
組態
描述了裝置的配置。
RR-1
segment-routing mpls
!
mapping-server
!
prefix-sid-map
address-family ipv4
10.0.0.1/32 index 200 range 10
exit-address-family
!
!
interface Loopback0
description Loopback0
ip address 10.0.0.1 255.255.255.255
ip router isis 65002
!
!
router isis 65002
net xx.xxxx.xxxx.xxxx.xx
metric-style wide
segment-routing mpls
segment-routing prefix-sid-map advertise-local
!
router bgp 65002
bgp router-id 10.0.0.1
neighbor 10.0.0.3 remote-as 65002
neighbor 10.0.0.3 description rr client
neighbor 10.0.0.3 update-source Loopback0
neighbor 10.0.0.4 remote-as 65002
neighbor 10.0.0.4 description rr client
neighbor 10.0.0.4 update-source Loopback0
neighbor 10.0.0.2 remote-as 65002
neighbor 10.0.0.2 description iBGP peer
neighbor 10.0.0.2 update-source Loopback0
neighbor 10.0.1.1 remote-as 65001
neighbor 10.0.1.1 ebgp-multihop 255
neighbor 10.0.1.1 update-source Loopback0
neighbor 10.0.1.2 remote-as 65001
neighbor 10.0.1.2 ebgp-multihop 255
neighbor 10.0.1.2 update-source Loopback0
!
address-family ipv4
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 route-reflector-client
neighbor 10.0.0.4 activate
neighbor 10.0.0.4 route-reflector-client
neighbor 10.0.0.2 activate
neighbor 10.0.1.1 activate
neighbor 10.0.1.2 activate
exit-address-family
!
address-family vpnv4
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 send-community extended
neighbor 10.0.0.3 route-reflector-client
neighbor 10.0.0.4 activate
neighbor 10.0.0.4 send-community extended
neighbor 10.0.0.4 route-reflector-client
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 send-community extended
neighbor 10.0.1.1 activate
neighbor 10.0.1.1 send-community both
neighbor 10.0.1.1 next-hop-unchanged
neighbor 10.0.1.2 activate
neighbor 10.0.1.2 send-community both
neighbor 10.0.1.2 next-hop-unchanged
exit-address-family
!
RR-2
segment-routing mpls
!
mapping-server
!
prefix-sid-map
address-family ipv4
10.0.0.2/32 index 200 range 10
exit-address-family
!
!
interface Loopback0
description Loopback0
ip address 10.0.0.2 255.255.255.255
ip router isis 65002
!
!
router isis 65002
net xx.xxxx.xxxx.xxxx.xx
metric-style wide
segment-routing mpls
segment-routing prefix-sid-map advertise-local
!
router bgp 65002
bgp router-id 10.0.0.2
neighbor 10.0.0.3 remote-as 65002
neighbor 10.0.0.3 description rr client
neighbor 10.0.0.3 update-source Loopback0
neighbor 10.0.0.4 remote-as 65002
neighbor 10.0.0.4 description rr client
neighbor 10.0.0.4 update-source Loopback0
neighbor 10.0.0.1 remote-as 65002
neighbor 10.0.0.1 description iBGP peer
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.1.1 remote-as 65001
neighbor 10.0.1.1 ebgp-multihop 255
neighbor 10.0.1.1 update-source Loopback0
neighbor 10.0.1.2 remote-as 65001
neighbor 10.0.1.2 ebgp-multihop 255
neighbor 10.0.1.2 update-source Loopback0
!
address-family ipv4
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 route-reflector-client
neighbor 10.0.0.4 activate
neighbor 10.0.0.4 route-reflector-client
neighbor 10.0.0.1 activate
neighbor 10.0.1.1 activate
neighbor 10.0.1.2 activate
exit-address-family
!
address-family vpnv4
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 send-community extended
neighbor 10.0.0.3 route-reflector-client
neighbor 10.0.0.4 activate
neighbor 10.0.0.4 send-community extended
neighbor 10.0.0.4 route-reflector-client
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 send-community extended
neighbor 10.0.1.1 activate
neighbor 10.0.1.1 send-community both
neighbor 10.0.1.1 next-hop-unchanged
neighbor 10.0.1.2 activate
neighbor 10.0.1.2 send-community both
neighbor 10.0.1.2 next-hop-unchanged
exit-address-family
!
PE-1
interface Loopback0
description Loopback0
ip address 10.0.0.3 255.255.255.255
ip router isis 65002
!
vrf A # Define VRF A
address-family ipv4 unicast
import route-target
65000:1
!
export route-target
65000:1
!
!
vrf B # Define VRF B
address-family ipv4 unicast
import route-target
65000:2
!
export route-target
65000:2
!
!
router isis 65002 # ISIS Level 2
is-type level-2-only
net xx.xxxx.xxxx.xxxx.xx
address-family ipv4 unicast
metric-style wide
advertise link attributes
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
router-id Loopback0
segment-routing mpls sr-prefer
!
router bgp 65002 # BGP
bgp router-id 10.0.0.3
neighbor-group RR
remote-as 65002
update-source Loopback0
address-family vpnv4 unicast
!
!
neighbor 10.0.0.1
use neighbor-group RR
!
neighbor 10.0.0.2
use neighbor-group RR
vrf A
rd 65000:1
address-family ipv4 unicast
redistribute connected
allocate-label all
!
neighbor 10.0.0.5 # IP address of CE1
remote-as 61001
ebgp-multihop 255
update-source Loopback100
address-family ipv4 unicast
!
vrf B
rd 65000:2
address-family ipv4 unicast
redistribute connected
allocate-label all
!
neighbor 10.0.0.6 # IP address of CE2
remote-as 61001
ebgp-multihop 255
update-source Loopback101
address-family ipv4 unicast
!
interface GigabitEthernet1 # Link to CE-01
vrf A
ipv4 address x.x.x.x 255.255.255.0
!
interface GigabitEthernet2 # Link to CE-02
vrf B
ipv4 address x.x.x.x 255.255.255.0
!
segment-routing
global-block 16000 23999
!
RR-3
interface Loopback0
description Loopback0
ip address 10.0.1.1 255.255.255.255
ip router isis 65001
!
!
router isis 65001
net xx.xxxx.xxxx.xxxx.xx
metric-style wide
segment-routing mpls
segment-routing prefix-sid-map advertise-local
!
router bgp 65001
bgp router-id 10.0.1.1
neighbor 10.0.1.3 remote-as 65001
neighbor 10.0.1.3 description rr client
neighbor 10.0.1.3 update-source Loopback0
neighbor 10.0.1.4 remote-as 65001
neighbor 10.0.1.4 description rr client
neighbor 10.0.1.4 update-source Loopback0
neighbor 10.0.1.2 remote-as 65001
neighbor 10.0.1.2 description iBGP peer
neighbor 10.0.1.2 update-source Loopback0
neighbor 10.0.0.1 remote-as 65002
neighbor 10.0.0.1 ebgp-multihop 255
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.2 remote-as 65002
neighbor 10.0.0.2 ebgp-multihop 255
neighbor 10.0.0.2 update-source Loopback0
!
address-family ipv4
neighbor 10.0.1.3 activate
neighbor 10.0.1.3 route-reflector-client
neighbor 10.0.1.4 activate
neighbor 10.0.1.4 route-reflector-client
neighbor 10.0.1.2 activate
neighbor 10.0.0.1 activate
neighbor 10.0.0.2 activate
exit-address-family
!
address-family vpnv4
neighbor 10.0.1.3 activate
neighbor 10.0.1.3 send-community extended
neighbor 10.0.1.3 route-reflector-client
neighbor 10.0.1.4 activate
neighbor 10.0.1.4 send-community extended
neighbor 10.0.1.4 route-reflector-client
neighbor 10.0.1.2 activate
neighbor 10.0.1.2 send-community extended
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 send-community both
neighbor 10.0.0.1 next-hop-unchanged
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 send-community both
neighbor 10.0.0.2 next-hop-unchanged
exit-address-family
!
RR-4
interface Loopback0
description Loopback0
ip address 10.0.1.2 255.255.255.255
ip router isis 65001
!
!
router isis 65001
net xx.xxxx.xxxx.xxxx.xx
metric-style wide
segment-routing mpls
segment-routing prefix-sid-map advertise-local
!
router bgp 65001
bgp router-id 10.0.1.2
neighbor 10.0.1.3 remote-as 65001
neighbor 10.0.1.3 description rr client
neighbor 10.0.1.3 update-source Loopback0
neighbor 10.0.1.4 remote-as 65001
neighbor 10.0.1.4 description rr client
neighbor 10.0.1.4 update-source Loopback0
neighbor 10.0.1.1 remote-as 65001
neighbor 10.0.1.1 description iBGP peer
neighbor 10.0.1.1 update-source Loopback0
neighbor 10.0.0.1 remote-as 65002
neighbor 10.0.0.1 ebgp-multihop 255
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.2 remote-as 65002
neighbor 10.0.0.2 ebgp-multihop 255
neighbor 10.0.0.2 update-source Loopback0
!
address-family ipv4
neighbor 10.0.1.3 activate
neighbor 10.0.1.3 route-reflector-client
neighbor 10.0.1.4 activate
neighbor 10.0.1.4 route-reflector-client
neighbor 10.0.1.1 activate
neighbor 10.0.0.1 activate
neighbor 10.0.0.2 activate
exit-address-family
!
address-family vpnv4
neighbor 10.0.1.3 activate
neighbor 10.0.1.3 send-community extended
neighbor 10.0.1.3 route-reflector-client
neighbor 10.0.1.4 activate
neighbor 10.0.1.4 send-community extended
neighbor 10.0.1.4 route-reflector-client
neighbor 10.0.1.1 activate
neighbor 10.0.1.1 send-community extended
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 send-community both
neighbor 10.0.0.1 next-hop-unchanged
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 send-community both
neighbor 10.0.0.2 next-hop-unchanged
exit-address-family
!
PE-6
interface Loopback0
description Loopback0
ip address 10.0.1.3 255.255.255.255
ip router isis 65001
!
vrf A # Define VRF A
address-family ipv4 unicast
import route-target
65000:1
!
export route-target
65000:1
!
vrf B # Define VRF B
address-family ipv4 unicast
import route-target
65000:2
!
export route-target
65000:2
!
router isis 65001
is-type level-2-only
net xx.xxxx.xxxx.xxxx.xx
address-family ipv4 unicast
metric-style wide
advertise link attributes
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
router-id Loopback0
segment-routing mpls sr-prefer
!
router bgp 65001
bgp router-id 10.0.1.3
neighbor-group RR
remote-as 65002
update-source Loopback0
address-family vpnv4 unicast
!
!
neighbor 10.0.1.1
use neighbor-group RR
!
neighbor 10.0.1.2
use neighbor-group RR
vrf A
rd 65000:1
address-family ipv4 unicast
redistribute connected
allocate-label all
!
neighbor 10.0.1.5 # IP address of CE3
remote-as 61001
ebgp-multihop 255
update-source Loopback100
address-family ipv4 unicast
!
vrf B
rd 65000:2
address-family ipv4 unicast
redistribute connected
allocate-label all
!
neighbor 10.0.1.6 # IP address of CE4
remote-as 61001
ebgp-multihop 255
update-source Loopback101
address-family ipv4 unicast
!
interface GigabitEthernet1 # Link to CE3
vrf A
ipv4 address x.x.x.x 255.255.255.0
!
interface GigabitEthernet2 # Link to CE4
vrf B
ipv4 address x.x.x.x 255.255.255.0
!
相關資訊