本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本檔案介紹Cisco IOS®-XR中邊界閘道通訊協定(BGP)的路由原則中的set path-selection陳述式。
許多設計旨在讓BGP選擇和通告一個字首的多個路徑。
預設情況下,只會選擇一個BGP路徑作為最佳路徑,且只會通告此最佳路徑。BGP最佳路徑選取演演算法會決定以下事項:
除了最佳路徑外,還可以選擇次優路徑作為備用路徑。此備份路徑可用於具有BGP PIC(字首獨立融合)的設計。
BGP可以安裝多個路徑來實現負載平衡。這可以是等價多重路徑(ECMP)負載平衡或非等價多重路徑(UCMP)。 這些多重路徑會安裝到路由表(RIB)和資料平面或FIB(轉發例項庫)表中,以實現負載平衡。FIB表也稱為CEF(思科快速轉發)表。
本文著重闡述了兩個目標:
BGP使用的另一個功能是其他路徑(ADD-Paths)。 此功能允許BGP透過一個BGP作業階段通告多個路徑。
BGP會依接收路徑的順序選擇多重路徑路徑。但是,show bgp命令會以字典順序顯示BGP路徑。
Cisco IOS®-XR 7.3.1中引入的新命令可用於按接收順序檢視BGP路徑:
show bgp <afi> rd <rd> <path_details>
這麼做可協助驗證和疑難排解多重路徑。它解決了為什麼路徑被選為多路徑而不是另一個路徑的主要問題。
多路徑保護路徑是備份路徑,它不是多路徑路徑,但保護所有其他多路徑路徑。
從Cisco IOS®-XR 7.3.1開始,set path-selection語句有一個新的關鍵字multipath-protect-advertise。它可用於在備份路徑旁邊或多路徑路徑路徑旁邊通告多路徑保護路徑。route-policy中使用的完整命令如下:
set path-selection backup 1 install multipath-protect advertise multipath-protect-advertise
set path-selection multipath advertise multipath-protect multipath-protect-advertise
以下是set path-selection命令及其所有關鍵字組合的概述。更詳細的說明和示例在下一節中找到。
在下列所有情況下,都會安裝最佳路徑。如果沒有,則說明出現錯誤(例如,下一跳無效),但這與set path-selection 命令無關。
若要選擇備份路徑,必須為BGP啟用允許選擇BGP備份路徑的功能:例如BGP PIC。
在BGP中,多重路徑路徑會透過位址系列命令maximum-paths啟用:
mamximum-paths {ebgp | eibgp | ibgp} <2-32> (unequal-cost)
根據定義,最佳路徑是多重路徑路徑。如果沒有啟用BGP的多重路徑,則最佳路徑是路由表中安裝的唯一路徑。您可以使用maximum-paths {ebgp | eibgp | ibgp} <2-32>(不等成本)。
下表提供set path-selection命令的所有選項的概覽。有關更多詳細資訊和示例,請參閱此處顯示的每個案例的下一節。
案例 | 指令 | 安裝 | 廣告 |
1 | set path-selection backup 1 install |
已安裝1個備份路徑。 |
僅通告最佳路徑。 |
2 | set path-selection backup 1通告 | 未安裝備份路徑。 |
將通告備份路徑。 |
3 | set path-selection backup 1通告安裝 | 備份路徑已安裝。 |
將通告備份路徑。 |
4 | set path-selection all advertise | 未安裝備份路徑。已安裝多重路徑路徑。 |
通告所有路徑(最佳路徑、備份路徑、多重路徑、非多重路徑路徑)。 |
5 | set path-selection best-path | 已安裝多重路徑路徑。 |
僅通告最佳路徑。 |
6 | set path-selection multipath advertise | 已安裝多重路徑路徑。 |
通告多重路徑路徑。 |
7 | set path-selection backup 1 install multipath-protect | 已安裝多重路徑路徑。 如果多重路徑路徑旁邊仍有路徑,則會將另一路徑安裝為備份路徑(「備份(保護多重路徑)」路徑)。 |
僅通告最佳路徑。 |
8 | set path-selection backup 1 install multipath-protect advertise | 已安裝多重路徑路徑。 如果多重路徑路徑旁邊仍有路徑,則會將另一路徑安裝為備份路徑(「備份(保護多重路徑)」路徑)。 |
通告最佳路徑和備份路徑。 不會通告備份(保護多路徑)路徑。 |
9 | set path-selection group-best advertise | 組最佳選擇是每個AS和每個下一跳的最佳路徑。 已安裝多重路徑路徑。 |
將通告所有組最佳路徑。 |
10 | set path-selection backup 1 install multipath-protect advertise multipath-protect-advertise | 已安裝多重路徑路徑。 如果多重路徑路徑旁邊仍有路徑,則會將另一路徑安裝為備份路徑(「備份(保護多重路徑)」路徑)。 |
通告最佳路徑、備份路徑和備份(保護多路徑)路徑。 |
11 | set path-selection multipath advertise multipath-protect | 已安裝多重路徑路徑。 |
通告多重路徑路徑。 不會通告備份(保護多路徑)路徑。 |
12 | set path-selection multipath advertise multipath-protect multipath-protect-advertise | 已安裝多重路徑路徑。 如果多重路徑路徑旁邊仍有路徑,則會將另一路徑安裝為備份路徑(「備份(保護多重路徑)」路徑)。 |
通告多重路徑路徑。 通告備份(保護多路徑)路徑。 |
這是本文檔中使用的拓撲。
在所有情況下,都會在RR(路由反射器)和PE6之間啟用ADD-PATH。
PE1、PE2、PE3、PE4、PE5和PE6都向RR通告與vpnv4單播路由相同的字首。
PE6是輸入PE,從RR接收此字首。
除非另有說明,否則會在每個BGP作業階段上啟用ADD-PATH,且在RR上為位址系列vpnv4單點傳播設定maximum-paths ibgp 3。
附註:RIB和CEF表中最多安裝一個備份路徑。不允許/支援多個專案。該路徑在BGP表、RIB表和CEF表中標籤為備份。
備份路由始終由本文中的BGP選擇。備用路由可能由其他功能選擇,但此處始終為BGP。
如果為BGP設定了多重路徑,則BGP表中可能會安裝多重路徑(ECMP或UCMP)路徑。它們被標有多重路徑。備份路徑是次佳路徑,因此如果有多重路徑路徑,備份路徑應是其中之一。這表示如果設定了此功能,BGP可能會選擇備份(保護多重路徑)(set path-selection route-policy語句中的multipath-protect關鍵字)。 如果是這種情況,則此備份(保護多路徑)路徑是RIB和CEF表中的備份路徑。由BGP選擇並由BGP標籤為as的備份路徑因此不是備份路徑,而只是多路徑路徑。
如果RR只具有RR角色,則RR上的備份路由沒有多大意義。
在本文中,假設RR也是PE路由器。在這種情況下,選擇並安裝備份路由確實有意義。備份路由可用於BGP PIC。
指定特定字首時,備份路由在RIB中標籤為backup,如果未指定字首,則標籤為「!」。
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 17 13:25:25.064 for 00:03:27
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show route vrf one
Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
U - per-user static route, o - ODR, L - local, G - DAGR, l - LISP
A - access/subscriber, a - Application route
M - mobile route, r - RPL, t - Traffic Engineering, (!) - FRR Backup path
Gateway of last resort is not set
B 10.1.1.1/32 [200/0] via 10.0.0.1 (nexthop in vrf default), 00:02:16
[200/0] via 10.0.0.2 (nexthop in vrf default), 00:02:16 (!)
[200/0] via 10.0.0.3 (nexthop in vrf default), 00:02:16
[200/0] via 10.0.0.4 (nexthop in vrf default), 00:02:16
本節說明路由器BGP下特定位址系列的路由原則中使用的所有set path-selection語句。
這與Cisco IOS®-XR版本是Cisco IOS®-XR 7.3.1之前或之後的版本無關。
組態:
router bgp 65000
address-family ipv4 unicast
!
address-family vpnv4 unicast
additional-paths receive
additional-paths send
additional-paths selection route-policy BGP-Path-Selection
!
neighbor 10.0.0.1
remote-as 65000
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
!
address-family vpnv4 unicast
route-reflector-client
!
!
neighbor 10.0.0.2
remote-as 65000
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
!
address-family vpnv4 unicast
route-reflector-client
!
!
neighbor 10.0.0.3
remote-as 65000
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
!
address-family vpnv4 unicast
route-reflector-client
!
!
neighbor 10.0.0.4
remote-as 65000
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
!
address-family vpnv4 unicast
route-reflector-client
!
!
neighbor 10.0.0.5
remote-as 65000
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
!
address-family vpnv4 unicast
route-reflector-client
!
!
neighbor 10.0.0.6
remote-as 65000
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
!
address-family vpnv4 unicast
route-reflector-client
!
!
vrf one
rd 1:1
address-family ipv4 unicast
maximum-paths ibgp 3
additional-paths selection route-policy BGP-Path-Selection
redistribute connected
!
!
!
帶有set path-selection語句的路由策略應用在address-family vpnv4 unicast下。
帶有set path-selection語句的路由策略也會應用於VRF。如果需要在VRF RIB/CEF表中安裝備份路由(或通過PE-CE鏈路通過BGP會話通告),則需要此步驟。
這裡,兩個路由策略是相同的,但是不同的路由策略可以在地址系列下應用,而不是在VRF下應用。
Maximum-path ibgp 3用於VRF one下,指定RIB/CEF表中最多可以有三個ECMP路徑。
這些案例顯示了使用set path-selection的路由策略的所有可能性。
route-policy BGP-Path-Selection
set path-selection backup 1 install
end-policy
!
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 13:14:35.907 for 00:04:41
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 17 13:25:25.064 for 00:03:27
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 119, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf4e10a8)
Updated Sep 17 13:25:25.068
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0], Internal 0xd6a2730
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 2 dependencies, recursive, backup [flags 0x6100]
path-idx 1 NHID 0x0 [0xdab2e48 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.3/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2060 0x0], Internal 0xd6a2550
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.3/32 via 24007/0/21
next hop 10.3.101.3/32 Gi0/0/0/6 labels imposed {ImplNull 24012}
via 10.0.0.4/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 3 NHID 0x0 [0xdab2c98 0x0], Internal 0xd6a2190
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.4/32 via 24000/0/21
next hop 10.4.101.4/32 Gi0/0/0/7 labels imposed {ImplNull 24013}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 87 87
Last Modified: Sep 17 13:50:32.649 for 00:00:42
Paths: (1 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 87
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
結論:在VRF中的RR上安裝1個備份路徑。僅通告最佳路徑。
route-policy BGP-Path-Selection
set path-selection backup 1 advertise
end-policy
!
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 13:38:03.907 for 00:02:04
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0, type internal
Installed Sep 17 13:38:04.233 for 00:04:26
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 135, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf696158)
Updated Sep 17 13:38:04.236
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab2e48 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.4/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2c98 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.4/32 via 24000/0/21
next hop 10.4.101.4/32 Gi0/0/0/7 labels imposed {ImplNull 24013}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 73 73
Last Modified: Sep 17 13:38:05.649 for 00:02:47
Paths: (2 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 73
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
結論:未安裝備份路由。將通告備份路徑。
route-policy BGP-Path-Selection
set path-selection backup 1 advertise install
end-policy
!
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 14:20:36.907 for 00:01:55
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 17 14:23:42.997 for 00:00:59
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.5, from 10.0.0.5, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 185, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf4e10a8)
Updated Sep 17 14:23:42.999
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0], Internal 0xd6a2730
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 2 dependencies, recursive, backup [flags 0x6100]
path-idx 1 NHID 0x0 [0xdab2e48 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.3/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2060 0x0], Internal 0xd6a2550
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.3/32 via 24007/0/21
next hop 10.3.101.3/32 Gi0/0/0/6 labels imposed {ImplNull 24012}
via 10.0.0.5/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 3 NHID 0x0 [0xdab2368 0x0], Internal 0xd6a2190
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.5/32 via 24005/0/21
next hop 10.5.101.5/32 Gi0/0/0/1 labels imposed {ImplNull 24014}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 105 105
Last Modified: Sep 17 14:23:43.649 for 00:02:16
Paths: (2 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 105
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
結論:備份路由已安裝。將通告備份路徑。這是1和2。
route-policy BGP-Path-Selection
set path-selection all advertise
end-policy
!
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 14:28:58.907 for 00:04:04
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 1, Local Path ID 5, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0, type internal
Installed Sep 17 14:28:59.169 for 00:04:52
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.5, from 10.0.0.5, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 201, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf696158)
Updated Sep 17 14:28:59.175
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab2e48 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.5/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2368 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.5/32 via 24005/0/21
next hop 10.5.101.5/32 Gi0/0/0/1 labels imposed {ImplNull 24014}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 125 125
Last Modified: Sep 17 14:29:00.649 for 00:02:21
Paths: (5 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 125
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.3 (metric 3) from 10.0.0.101 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.3, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local
10.0.0.4 (metric 3) from 10.0.0.101 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 3, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.4, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 4, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local
10.0.0.5 (metric 3) from 10.0.0.101 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 5, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.5, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
結論:未安裝備份路由。通告所有(5)路徑。
route-policy BGP-Path-Selection
set path-selection best-path
end-policy
!
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions: Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 15:34:15.907 for 00:00:09
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0, type internal
Installed Sep 17 15:34:16.311 for 00:00:28
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 215, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf696100)
Updated Sep 17 15:34:16.313
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab2e48 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.3/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2060 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.3/32 via 24007/0/21
next hop 10.3.101.3/32 Gi0/0/0/6 labels imposed {ImplNull 24012}
結論:僅安裝最佳路徑和多路徑路徑。僅通告最佳路徑。沒有選擇、安裝或通告的備份路徑。
通告是必需的關鍵字。
route-policy BGP-Path-Selection
set path-selection multipath advertise
end-policy
為使此功能正常運作,必須為特定位址系列的BGP啟用多重路徑。
此處啟用VRF one中ipv4單點傳播的多路徑功能。
router bgp 65000
vrf one
rd 1:1
address-family ipv4 unicast
maximum-paths ibgp 3
additional-paths selection route-policy BGP-Path-Selection
redistribute connected
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 15:40:15.907 for 00:00:28
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0, type internal
Installed Sep 17 15:40:16.152 for 00:01:11
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 229, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf6961b0)
Updated Sep 17 15:40:16.156
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab2e48 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.4/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2c98 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.4/32 via 24000/0/21
next hop 10.4.101.4/32 Gi0/0/0/7 labels imposed {ImplNull 24013}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 153 153
Last Modified: Sep 17 15:40:17.649 for 00:02:08
Paths: (3 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 153
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.4 (metric 3) from 10.0.0.101 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.4, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 3, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
結論:多重路徑路徑會安裝在RIB中並進行通告。沒有選擇、安裝或通告的備份。
route-policy BGP-Path-Selection
set path-selection backup 1 install multipath-protect
end-policy
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 15:46:17.907 for 00:04:59
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 17 15:46:17.904 for 00:05:14
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 249, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf4e10a8)
Updated Sep 17 15:46:17.907
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0], Internal 0xd6a2190
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab2e48 0x0], Internal 0xd6a2550
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.3/32, 2 dependencies, recursive, backup [flags 0x6100]
path-idx 2 NHID 0x0 [0xdab2060 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.3/32 via 24007/0/21
next hop 10.3.101.3/32 Gi0/0/0/6 labels imposed {ImplNull 24012}
via 10.0.0.4/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 3 NHID 0x0 [0xdab2c98 0x0], Internal 0xd6a2730
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.4/32 via 24000/0/21
next hop 10.4.101.4/32 Gi0/0/0/7 labels imposed {ImplNull 24013}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 163 163
Last Modified: Sep 17 15:46:18.649 for 00:07:36
Paths: (1 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 163
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
可能沒有備份(保護多重路徑)路徑。例如,如果設定了BGP最大路徑2,但只接收到2個路徑,則兩個路徑是多重路徑,且沒有backup(protect multipath)路徑。
結論:所有多重路徑路徑都安裝在RIB中。另一路徑安裝為備份路徑(備份(保護多路徑)路徑)。 僅通告最佳路徑。
route-policy BGP-Path-Selection
set path-selection backup 1 install multipath-protect advertise
end-policy
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 16:03:00.907 for 00:01:19
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 17 16:03:01.199 for 00:05:13
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 281, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf4e1108)
Updated Sep 17 16:03:01.206
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0], Internal 0xd6a2190
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab2e48 0x0], Internal 0xd6a2550
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.3/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2060 0x0], Internal 0xd6a2910
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.3/32 via 24007/0/21
next hop 10.3.101.3/32 Gi0/0/0/6 labels imposed {ImplNull 24012}
via 10.0.0.4/32, 2 dependencies, recursive, backup [flags 0x6100]
path-idx 3 NHID 0x0 [0xdab2c98 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.4/32 via 24000/0/21
next hop 10.4.101.4/32 Gi0/0/0/7 labels imposed {ImplNull 24013}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 181 181
Last Modified: Sep 17 16:03:02.649 for 00:07:39
Paths: (2 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 181
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
可能沒有備份(保護多重路徑)路徑。例如,如果設定了BGP最大路徑2,但只接收到2個路徑,則兩個路徑是多重路徑,且沒有backup(protect multipath)路徑。
此通告的備份路徑是多重路徑路徑之一(在BGP表中標籤為backup)。
以下是maximum-paths ibgp 1:
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 16:15:48.907 for 00:00:44
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 17 16:15:48.900 for 00:01:28
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 297, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf6960a8)
Updated Sep 17 16:15:48.903
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive [flags 0x6000]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0], Internal 0xd6a2190
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 2 dependencies, recursive, backup [flags 0x6100]
path-idx 1 NHID 0x0 [0xdab2e48 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 189 189
Last Modified: Sep 17 16:15:50.649 for 00:02:10
Paths: (2 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 189
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
結論:所有多重路徑路徑都安裝在RIB中。另一路徑安裝為備份路徑。通告最佳路徑和備份路徑。
這種情況下使用不同的拓撲。路由器與映像1中的相同,但PE4現在位於AS 65004中,PE5位於AS 65005中。所有其他路由器仍位於AS 65000中。
圖2
這意味著RR和PE4之間以及RR和PE5之間現在有一個eBGP會話。
route-policy BGP-Path-Selection
set path-selection group-best advertise
end-policy
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Local Label: 24010
Last Modified: Sep 21 06:06:29.117 for 00:02:18
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.3 0.4
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3 0.4
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.4
65004
10.4.101.4 from 10.4.101.4 (10.0.0.4)
Received Label 24015
Origin incomplete, metric 0, localpref 100, valid, external, group-best, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.4
65005
10.5.101.5 from 10.5.101.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, external, group-best, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0, type internal
Installed Sep 20 19:59:07.762 for 10:00:40
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 114, internal 0x1000001 0x30 (ptr 0xd96a338) [1], 0x0 (0xe366530), 0xa08 (0xf69e0a8)
Updated Sep 20 19:59:07.765
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab1b98 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24008/0/21
local label 24010
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24014}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab30d0 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24000/0/21
local label 24010
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24014}
via 10.0.0.3/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2918 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.3/32 via 24002/0/21
local label 24010
next hop 10.3.101.3/32 Gi0/0/0/6 labels imposed {ImplNull 24014}
RR仍然在RIB和CEF表中安裝三個ECMP路徑。
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 47 47
Last Modified: Sep 20 19:59:07.588 for 09:59:44
Paths: (3 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.3 (metric 5) from 10.0.0.101 (10.0.0.3)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 47
Extended community: RT:65000:1
Originator: 10.0.0.3, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
65004
10.4.101.4 (metric 3) from 10.0.0.101 (10.0.0.101)
Received Label 24010
Origin incomplete, metric 0, localpref 100, valid, internal, group-best, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
65005
10.5.101.5 (metric 2) from 10.0.0.101 (10.0.0.101)
Received Label 24010
Origin incomplete, metric 0, localpref 100, valid, internal, group-best, import-candidate, imported
Received Path ID 3, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RR通告從AS 65000接收的三個路徑中的組最佳路徑。除了此路徑外,RR還通告從AS 65004接收的組最佳路徑和從AS 65005接收的組最佳路徑。
有三條組最佳路徑,因為三條路徑具有不同的鄰居AS。系統會通告所有這些路徑。不會通告多重路徑路徑。
結論:將通告所有組最佳路徑。
此選項僅從Cisco IOS®-XR 7.3.1開始可用。
要從Cisco IOS®-XR 7.3.1開始,需要一個新的關鍵字multipath-protect-advertise。
這允許將多路徑保護路徑與備份路徑一起通告。在Cisco IOS®-XR 7.3.1之前,已安裝多路徑保護路徑,但未通告。(見案例8)
route-policy BGP-Path-Selection
set path-selection backup 1 install multipath-protect advertise multipath-protect-advertise
end-policy
!
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 17 16:43:05.907 for 00:01:14
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 17 16:43:05.562 for 00:01:45
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1
10.1.1.1/32, version 323, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf4e1168)
Updated Sep 17 16:43:05.567
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0], Internal 0xd6a2190
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab2e48 0x0], Internal 0xd6a2730
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.3/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2060 0x0], Internal 0xd6a2910
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.3/32 via 24007/0/21
next hop 10.3.101.3/32 Gi0/0/0/6 labels imposed {ImplNull 24012}
via 10.0.0.4/32, 2 dependencies, recursive, backup [flags 0x6100]
path-idx 3 NHID 0x0 [0xdab2c98 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.4/32 via 24000/0/21
next hop 10.4.101.4/32 Gi0/0/0/7 labels imposed {ImplNull 24013}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 207 207
Last Modified: Sep 17 16:43:06.649 for 00:02:31
Paths: (3 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 207
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local
10.0.0.4 (metric 3) from 10.0.0.101 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 3, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.4, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
結論:所有多重路徑路徑都安裝在RIB中。另一路徑-backup(protect multipath)path — 安裝為備份路徑。通告最佳路徑、備份路徑和備份(保護多重路徑)路徑。
此選項僅從Cisco IOS®-XR 7.3.1開始可用。
route-policy BGP-Path-Selection
set path-selection multipath advertise multipath-protect
end-policy
!
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 18 06:12:25.907 for 00:00:12
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 18 06:12:26.137 for 00:05:23
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 345, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf4e1108)
Updated Sep 18 06:12:26.140
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0], Internal 0xd6a2190
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab2e48 0x0], Internal 0xd6a2730
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.3/32, 2 dependencies, recursive, backup [flags 0x6100]
path-idx 2 NHID 0x0 [0xdab2060 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.3/32 via 24007/0/21
next hop 10.3.101.3/32 Gi0/0/0/6 labels imposed {ImplNull 24012}
via 10.0.0.4/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 3 NHID 0x0 [0xdab2c98 0x0], Internal 0xd6a2550
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.4/32 via 24000/0/21
next hop 10.4.101.4/32 Gi0/0/0/7 labels imposed {ImplNull 24013}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 221 221
Last Modified: Sep 18 06:12:27.649 for 00:01:38
Paths: (3 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 221
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.4 (metric 3) from 10.0.0.101 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.4, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 3, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
這樣可允許與多重路徑路徑路徑一起安裝和通告多重路徑保護路徑。
route-policy BGP-Path-Selection
set path-selection multipath advertise multipath-protect multipath-protect-advertise
end-policy
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 18 06:22:22.907 for 00:03:12
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 1, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 18 06:22:23.059 for 00:03:34
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.5, from 10.0.0.5, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 367, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf4e11c8)
Updated Sep 18 06:22:23.062
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0], Internal 0xd6a2190
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 2 dependencies, recursive, backup [flags 0x6100]
path-idx 1 NHID 0x0 [0xdab2e48 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.4/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 2 NHID 0x0 [0xdab2c98 0x0], Internal 0xd6a2550
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.4/32 via 24000/0/21
next hop 10.4.101.4/32 Gi0/0/0/7 labels imposed {ImplNull 24013}
via 10.0.0.5/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 3 NHID 0x0 [0xdab2368 0x0], Internal 0xd6a2910
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.5/32 via 24005/0/21
next hop 10.5.101.5/32 Gi0/0/0/1 labels imposed {ImplNull 24014}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Process bRIB/RIB SendTblVer
Speaker 235 235
Last Modified: Sep 18 06:22:24.649 for 00:03:59
Paths: (4 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 235
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.4 (metric 3) from 10.0.0.101 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.4, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local
10.0.0.5 (metric 3) from 10.0.0.101 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 3, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.5, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 4, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
結論:
自Cisco IOS®-XR 7.3.1起,這種情況已更改:
這是路由策略中可用的路徑選擇:
RP/0/RP0/CPU0:RR(config-rpl)#set path-selection ?
all BGP all paths
backup BGP backup path
best-path BGP best path
group-best BGP group best path
multipath BGP multipath
best-path為預設路徑。
在地址系列級別支援此操作。
組態範例:
router bgp 65000
address-family ipv4 unicast
!
address-family vpnv4 unicast
additional-paths receive
additional-paths send
additional-paths selection route-policy BGP-Path-Selection
!
neighbor 10.0.0.1
remote-as 65000
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
!
address-family vpnv4 unicast
route-reflector-client
!
!
vrf one
rd 1:1
address-family ipv4 unicast
maximum-paths ibgp 2
additional-paths selection route-policy BGP-Path-Selection
redistribute connected
!
!
!
若要從Cisco IOS®-XR 7.3.1開始,在鄰居級別上也支援路由策略中的一些路徑選擇選項。這會產生更精細的控制,以控制向哪些BGP鄰居通告哪些路徑。例如,BGP發言者可能會向一個BGP鄰居通告最佳路徑和一個備份路徑,但通告多重路徑並保護多路徑路徑到另一個鄰居。
在鄰居級別有:
RP/0/RP0/CPU0:RR(config-rpl)#if destination ?
in Member of a set
is-all Check for additional paths selected by all path-selection
is-backup-path Checks for backup path
is-best-external Checks for best external route
is-best-path Checks for best path
is-multi-path Checks for multiple paths
is-multipath-protect Checks for multipath-protect path
longer-than Prefix-length greater than the route's prefix length
or-longer Prefix-length equal to or greater than the route's prefix length
警告:如果設定了BGP命令maximum-path,則最佳路徑是多重路徑。但是,如果路由策略中配置的唯一條件是multi-path,則僅通告不是最佳路徑的多路徑路徑!這取決於BGP設計,但如果應通告多重路徑路徑,則也可能會通告最佳路徑。
is-all和is-multipath-protect是Cisco IOS®-XR 7.3.1新推出的保護軟體。
自Cisco IOS®-XR 7.3.1起,您可以在一個與一個字首相關的路由策略中擁有multipleset path-selection語句。在Cisco IOS®-XR 7.3.1之前,這是不允許的,並且會導致不可預測的BGP路徑行為。
在每個字首上檢視是否有多個路徑選擇。
例如,在Cisco IOS®-XR 7.3.1之前,不支援以下功能:
route-policy add-path-to-ibgp
set weight 65000
set path-selection backup 1 install
set metric-type type-1
set extcommunity rt RT BUSINESS additive
set path-selection all advertise
set rib-metric 100
end-policy
一個路由策略中有兩個set path-selection語句應用於相同的字首。
但是,在Cisco IOS®-XR 7.3.1之前,支援以下功能。原因是,不同的路徑選擇語句用於不同的字首,因為if語句使用的是帶有選擇的(目標、社群、...)。
範例 1:
route-policy ADDPATH
if destination in TRAFFIC_1 then
set path-selection backup 1 install
endif
if destination in TRAFFIC_2 then
set path-selection multipath advertise
endif
end-policy
這很好,因為set-path selection語句與不同的字首相關(它們位於兩個不同的if語句中)。
範例 2:
route-policy ADDPATH-2
if community matches-any COMM_ADD-PATH then
set path-selection backup 1 install multipath-protect advertise
else
set path-selection best-path
endif
end-policy
這很好,因為set path selection語句與不同的字首有關(它們位於if語句的兩個不同部分)。
從Cisco IOS®-XR 7.3.1開始,支援此操作。
以下是具有多個set path-selection語句的路由策略示例:
route-policy BGP-Path-Selection
set path-selection multipath advertise
set path-selection backup 1 install multipath-protect advertise multipath-protect-advertise
end-policy
!
Per-neighbor route-policy指定哪些路徑通告給該鄰居。任何路徑只能從已在地址系列級別標籤的路徑中選擇。
在地址系列級別,您可以選擇路徑:
RP/0/RP0/CPU0:RR(config-rpl)#set path-selection ?
all BGP all paths
backup BGP backup path
best-path BGP best path
group-best BGP group best path
multipath BGP multipath
在鄰居級別有:
RP/0/RP0/CPU0:RR(config-rpl)#if destination ?
in Member of a set
is-all Check for additional paths selected by all path-selection
is-backup-path Checks for backup path
is-best-external Checks for best external route
is-best-path Checks for best path
is-multi-path Checks for multiple paths
is-multipath-protect Checks for multipath-protect path
longer-than Prefix-length greater than the route's prefix length
or-longer Prefix-length equal to or greater than the route's prefix length
警告:如果設定了BGP命令maximum-path,則最佳路徑是多重路徑。但是,如果路由策略中配置的唯一條件是multi-path,則僅通告不是最佳路徑的多路徑路徑!這取決於BGP設計,但如果應通告多重路徑路徑,則也可能會通告最佳路徑。
is-all和is-multipath-protect是Cisco IOS®-XR 7.3.1新推出的保護軟體。
使用此方法,路徑選取標籤可以混合使用您擁有的路徑選取模式(例如全部、備份、多重路徑、多重路徑保護等)。
鄰居策略根據路徑選擇標籤控制通告。
對於標籤部件:例如,您可以在地址系列級別的路由策略中同時配置備份和多路徑:
route-policy BGP-Path-Selection
set path-selection multipath advertise (1)
set path-selection backup 1 install multipath-protect advertise multipath-protect-advertise (2)
end-policy
!
以上兩條set path-selection語句是從Cisco IOS®-XR 7.3.1開始新受支援的語句。在示例中仍配置了maximum-path ibgp 3的情況下,您會看到以下內容:
在Cisco IOS®-XR 7.3.1之前的版本中無法實現此組合。這意味著(1)或(2)將生效。
結果是這樣的:
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 18 06:59:27.907 for 00:00:28
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.2 0.3
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2 0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
RP/0/RP0/CPU0:RR#show route vrf one 10.1.1.1/32
Routing entry for 10.1.1.1/32
Known via "bgp 65000", distance 200, metric 0
Number of pic paths 1 , type internal
Installed Sep 18 06:59:27.833 for 00:01:59
Routing Descriptor Blocks
10.0.0.1, from 10.0.0.1, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.2, from 10.0.0.2, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.3, from 10.0.0.3, BGP backup path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
10.0.0.4, from 10.0.0.4, BGP multi path
Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
Route metric is 0
No advertising protos.
RP/0/RP0/CPU0:RR#show cef vrf one 10.1.1.1/32
10.1.1.1/32, version 409, internal 0x5000001 0x30 (ptr 0xd96a770) [1], 0x0 (0xe3662a8), 0xa08 (0xf4e1168)
Updated Sep 18 06:59:27.836
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via 10.0.0.1/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 0 NHID 0x0 [0xdab2bc0 0x0], Internal 0xd6a2190
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.1/32 via 24003/0/21
next hop 10.1.101.1/32 Gi0/0/0/0 labels imposed {ImplNull 24012}
via 10.0.0.2/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 1 NHID 0x0 [0xdab2e48 0x0], Internal 0xd6a2550
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.2/32 via 24001/0/21
next hop 10.2.101.2/32 Gi0/0/0/4 labels imposed {ImplNull 24012}
via 10.0.0.3/32, 2 dependencies, recursive, backup [flags 0x6100]
path-idx 2 NHID 0x0 [0xdab2060 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.3/32 via 24007/0/21
next hop 10.3.101.3/32 Gi0/0/0/6 labels imposed {ImplNull 24012}
via 10.0.0.4/32, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
path-idx 3 NHID 0x0 [0xdab2c98 0x0], Internal 0xd6a2370
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
next hop 10.0.0.4/32 via 24000/0/21
next hop 10.4.101.4/32 Gi0/0/0/7 labels imposed {ImplNull 24013}
驗證通告的路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 271 271
Last Modified: Sep 18 06:59:28.649 for 00:01:53
Paths: (4 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 271
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local
10.0.0.3 (metric 3) from 10.0.0.101 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 3, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.3, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Not advertised to any peer
Local
10.0.0.4 (metric 3) from 10.0.0.101 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 4, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.4, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
現在,可以根據is-best-path或is-backup-path將主(最佳路徑)和備份路徑通告給一個鄰居。
對於另一個鄰居,可以使用is-multi-path通告多路徑。
鄰居路由策略示例(與地址系列級別的路由策略一起使用):
route-policy BGP-neighbor-1
if community matches-any COMM-LIST-1 then
if destination is-best-path or destination is-backup-path then
pass
else
drop
endif
elseif community matches-any COMM-LIST-2 then
if destination is-multi-path or destination is-multipath-protect then
pass
else
drop
endif
else
drop
endif
end-policy
!
如果RR具有以下BGP路徑:
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 18 07:14:32.907 for 00:06:53
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.6 10.0.0.5
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.6 10.0.0.5
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.0.6 10.0.0.5
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
然後是鄰居路由策略的第一個路徑,如下所示:
if destination is-best-path or destination is-backup-path then
pass
鄰居PE6收到以下路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 283 283
Last Modified: Sep 18 07:14:33.649 for 00:07:21
Paths: (2 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.1 (metric 3) from 10.0.0.101 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 283
Extended community: RT:65000:1
Originator: 10.0.0.1, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 2, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
這兩個路徑是RR上的最佳路徑和備份路徑。
對於鄰居路由策略的第二部分,如下所示:
if destination is-multi-path or destination is-multipath-protect
then
pass
鄰居PE6收到以下路徑:
RP/0/RP0/CPU0:PE6#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 299 299
Last Modified: Sep 18 07:31:09.649 for 00:02:29
Paths: (3 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.0.0.2 (metric 3) from 10.0.0.101 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 2, Local Path ID 1, version 299
Extended community: RT:65000:1
Originator: 10.0.0.2, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Not advertised to any peer
Local
10.0.0.4 (metric 3) from 10.0.0.101 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 3, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.4, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Not advertised to any peer
Local
10.0.0.3 (metric 3) from 10.0.0.101 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 4, Local Path ID 0, version 0
Extended community: RT:65000:1
Originator: 10.0.0.3, Cluster list: 10.0.0.101
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
這些路徑是多重路徑路徑(但不包括最佳路徑!)和備份(保護多重路徑)路徑。
BGP路徑以字母順序顯示。
Cisco IOS®-XR 7.3.1中引入的新命令可用於按接收順序檢視BGP路徑:
show bgp <afi> rd <rd> <path_details> <age-order>
此命令可用於檢視為什麼路徑被標籤為多重路徑。先前接收的路徑會標示為多重路徑,並安裝在RIB中作為最大路徑路由。show route命令會顯示已安裝路由的BGP multi path關鍵字。
若要確認哪個路徑已標示為多重路徑,可以使用new命令驗證接收所有路徑的順序。新路徑位於輸出的頂端。
例如,使用以下配置:
route-policy BGP-Path-Selection
set path-selection multipath advertise
set path-selection backup 1 install multipath-protect advertise multipath-protect-advertise
end-policy
!
最佳路徑決策過程中沒有變化,路徑也沒有任何影響最佳路徑決策過程的屬性(如本地優先順序)。
RR具有以下BGP路徑選取:
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Last Modified: Sep 18 08:46:11.907 for 00:03:43
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.0.5 10.0.0.6
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.0.5 10.0.0.6
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
為什麼來自10.0.0.1的路徑是最佳路徑?為什麼從10.0.0.2的路徑是備份路徑?為什麼來自10.0.0.3多重路徑的路徑?為什麼來自10.0.0.4的路徑是備份(保護多路徑)?為什麼來自10.0.0.5的路徑不是最佳路徑,不是多重路徑,也不是備份(保護多重路徑)路徑?
您可以在結尾使用具有age-order的相同命令時看到此情況。新路徑位於輸出的頂端。
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32 age-order
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Flags: 0x240692b2+0x00010000; multipath; backup available;
Last Modified: Sep 18 07:31:07.907 for 00:23:23
Paths: (5 available, best #3)
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Path #1: Received by speaker 0
Flags: 0x2000000084060205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6 10.0.0.5
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4), if-handle 0x00000000
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Flags: 0x2000000084020205, import: 0x96
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5), if-handle 0x00000000
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Flags: 0x2000000085070205, import: 0x9f
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6 10.0.0.5
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6 10.0.0.5
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
您可以使用show bgp命令與關鍵字bestpath-compare來驗證路徑為什麼不是最佳路徑(每個路徑顯示原因)。
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32 bestpath-compare
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Flags: 0x240692b2+0x00010000; multipath; backup available;
Last Modified: Sep 18 07:31:07.907 for 00:44:59
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Path #1: Received by speaker 0
Flags: 0x2000000085070205, import: 0x9f
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
best of local AS, Overall best
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6 10.0.0.5
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
iBGP multi-path
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6 10.0.0.5
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
iBGP multi-path
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Flags: 0x2000000084060205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6 10.0.0.5
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4), if-handle 0x00000000
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 3, version 5
Extended community: RT:65000:1
Higher router ID than best path (path #1)
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Flags: 0x2000000084020205, import: 0x96
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5), if-handle 0x00000000
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Higher router ID than best path (path #1)
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
由於BGP路徑中的大多數屬性在路徑之間是相等的,因此選擇最佳路徑的決策會降到BGP發言者的最低路由器ID。這裡是BGP發言者10.0.0.1。備份路徑是次佳路徑,因此是BGP發言者的次低路由器ID。這是10.0.0.2。
來自10.0.0.4和10.0.0.5的路徑不是多重路徑路徑,因為它們是遲於來自10.0.0.1、10.0.0.2和10.0.0.3的路徑安裝的。
route-policy BGP-Path-Selection
set path-selection multipath advertise
set path-selection backup 1 install multipath-protect advertise multipath-protect-advertise
end-policy
!
已設定maximum-path ibgp 3。
備份是次佳路徑。在這裡,多重路徑路徑是在備份路徑之前收到的。因此,有三個多重路徑路徑,另一個是備份路徑。
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32 age-order
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 5 5
Flags: 0x240692b2+0x00010000; multipath; backup available;
Last Modified: Sep 18 08:51:17.907 for 00:07:11
Paths: (5 available, best #3)
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Path #1: Received by speaker 0
Flags: 0x2000000084020205, import: 0x96
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4), if-handle 0x00000000
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 0, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Flags: 0x2000000084060205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Flags: 0x2000000085070205, import: 0x9f
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5), if-handle 0x00000000
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 1, Local Path ID 3, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.5 10.0.0.6
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
關閉鄰居10.0.0.5。現在您有:
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32 age-order
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 7 7
Flags: 0x2406b2b2+0x00010000; multipath; backup available;
Last Modified: Sep 18 09:05:07.907 for 00:00:23
Paths: (4 available, best #3)
Advertised to update-groups (with more than one peer):
0.3
Path #1: Received by speaker 0
Flags: 0x2000000084060205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4), if-handle 0x00000000
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 5, version 7
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 7
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Flags: 0x2000000085070205, import: 0x9f
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.6
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
關閉鄰居10.0.0.5:
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32 age-order
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 10 10
Flags: 0x2406b2b2+0x00010000; multipath; backup available;
Last Modified: Sep 18 09:08:42.907 for 00:00:00
Paths: (5 available, best #4)
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Path #1: Received by speaker 0
Flags: 0x2000000084020205, import: 0x96
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5), if-handle 0x00000000
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Flags: 0x2000000084060205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.5 10.0.0.6
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4), if-handle 0x00000000
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 5, version 7
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.5 10.0.0.6
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 10
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Flags: 0x2000000085070205, import: 0x9f
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Flags: 0x2000000084070205, import: 0x96
Advertised to peers (in unique update groups):
10.0.0.5 10.0.0.6
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
沒有更改到之前安裝的4個路徑。僅新增來自10.0.0.5的路徑。它位於頂端,因為它較新。這不是多重路徑或任何種類的備份路徑。
在路徑的狀態發生變化後,從10.0.0.5的路徑已從多重路徑變為非多重路徑!
結論:
依照內部閘道通訊協定(IGP)指標,可以選擇排定多重路徑路徑。
RP/0/RP0/CPU0:RR#conf t
RP/0/RP0/CPU0:RR(config)#router bgp 65000
RP/0/RP0/CPU0:RR(config-bgp)#vrf one
RP/0/RP0/CPU0:RR(config-bgp-vrf)#address-family ipv4 unicast
RP/0/RP0/CPU0:RR(config-bgp-vrf-af)#maximum-paths ibgp 3 unequal-cost ?
deterministic Deterministic Multipath selection primarily on IGP metric order
selective Allow multipaths only from marked neighbors
<cr>
RP/0/RP0/CPU0:RR(config-bgp-vrf-af)#maximum-paths ibgp 3 unequal-cost deterministic ?
selective Allow multipaths only from marked neighbors
<cr>
RP/0/RP0/CPU0:RR(config-bgp-vrf-af)#maximum-paths ibgp 3 unequal-cost deterministic
RP/0/RP0/CPU0:RR(config-bgp-vrf-af)#commit
RP/0/RP0/CPU0:RR(config-bgp-vrf-af)#end
RP/0/RP0/CPU0:RR#
由於所需的成本不相等,因此您最終只獲得了最佳路徑(備份路徑),而沒有多重路徑,因為多重路徑需要相同的IGP成本才能被視為多重路徑。
在拓撲中,從RR到PE路由器的IGP開銷會改變。IGP開銷配置如下:
目前仍存在以下問題:
route-policy BGP-Path-Selection
set path-selection multipath advertise
set path-selection backup 1 install multipath-protect advertise multipath-protect-advertise
end-policy
!
在IGP指標(所有鏈路上的成本相同)更改之前:
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 10 10
Last Modified: Sep 18 09:08:42.907 for 05:26:53
Paths: (5 available, best #1)
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.5
Local, (Received from a RR-client)
10.0.0.1 (metric 2) from 10.0.0.1 (10.0.0.1)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.0.5 10.0.0.6
Local, (Received from a RR-client)
10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 2, version 10
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.0.5 10.0.0.6
Local, (Received from a RR-client)
10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 0, Local Path ID 4, version 5
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.0.5 10.0.0.6
Local, (Received from a RR-client)
10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 0, Local Path ID 5, version 7
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5)
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
IGP指標更改後:
RP/0/RP0/CPU0:RR#show bgp vpnv4 unicast rd 1:1 10.1.1.1/32 age-order
BGP routing table entry for 10.1.1.1/32, Route Distinguisher: 1:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 14 14
Flags: 0x2486b2b2+0x00010000; multipath; backup available;
Last Modified: Sep 18 16:09:45.907 for 00:01:10
Paths: (5 available, best #2)
Advertised to update-groups (with more than one peer):
0.3
Path #1: Received by speaker 0
Flags: 0x2000000084020205, import: 0x94
Not advertised to any peer
Local, (Received from a RR-client)
10.0.0.1 (metric 6) from 10.0.0.1 (10.0.0.1), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, imported
Received Path ID 1, Local Path ID 0, version 0
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #2: Received by speaker 0
Flags: 0x2000000085070205, import: 0x9f
Advertised to update-groups (with more than one peer):
0.3
Local, (Received from a RR-client)
10.0.0.5 (metric 2) from 10.0.0.5 (10.0.0.5), if-handle 0x00000000
Received Label 24014
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 1, Local Path ID 1, version 11
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #3: Received by speaker 0
Flags: 0x2000000084060205, import: 0x94
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.6
Local, (Received from a RR-client)
10.0.0.2 (metric 5) from 10.0.0.2 (10.0.0.2), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, backup(protect multipath), add-path, import-candidate, imported
Received Path ID 1, Local Path ID 3, version 10
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #4: Received by speaker 0
Flags: 0x2000000084070205, import: 0xd4
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.6
Local, (Received from a RR-client)
10.0.0.4 (metric 3) from 10.0.0.4 (10.0.0.4), if-handle 0x00000000
Received Label 24013
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, backup, add-path, import-candidate, imported
Received Path ID 1, Local Path ID 5, version 14
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
Path #5: Received by speaker 0
Flags: 0x2000000084070205, import: 0x94
Advertised to update-groups (with more than one peer):
0.3
Advertised to peers (in unique update groups):
10.0.0.6
Local, (Received from a RR-client)
10.0.0.3 (metric 4) from 10.0.0.3 (10.0.0.3), if-handle 0x00000000
Received Label 24012
Origin incomplete, metric 0, localpref 100, valid, internal, multipath, add-path, import-candidate, imported
Received Path ID 1, Local Path ID 4, version 10
Extended community: RT:65000:1
Source AFI: VPNv4 Unicast, Source VRF: one, Source Route Distinguisher: 1:1
修訂 | 發佈日期 | 意見 |
---|---|---|
2.0 |
10-Dec-2021 |
設定更新格式 |
1.0 |
17-Jun-2021 |
初始版本 |