cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2215
Views
0
Helpful
3
Replies

BGP selection Routes in XR

Gabriel Farias
Level 1
Level 1

Hi member, 

 

I'm working with an ASR9006 router iosxr 4.3.4 and I get the bgp routes below and I see it preferring path 3 instead of path 1, by default route selection criteria bgp path 1 should be the best, correct? , I do not know if I need to change some default configuration of bgp or if some software bug.

 

Paths: (3 available, best #3)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
65100
10.251.39.98 from 10.251.39.98 (10.255.21.143)
Origin incomplete, metric 0, localpref 100, valid, external
Received Path ID 0, Local Path ID 0, version 0
Extended community: SoO:65100:1439 RT:65100:100

Path #2: Received by speaker 0
Not advertised to any peer
65100
10.251.40.78 from 10.251.40.78 (10.255.21.129)
Origin incomplete, metric 131, localpref 100, valid, external
Received Path ID 0, Local Path ID 0, version 0
Extended community: SoO:65100:1231 RT:65100:100

Path #3: Received by speaker 0
Not advertised to any peer
65100
10.251.255.144 (metric 100) from 10.251.255.6 (10.251.255.144)
Received Label 18
Origin IGP, metric 11, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 229007332
Community: 65100:1439
Extended community: RT:65100:100
Originator: 10.251.255.144, Cluster list: 10.251.255.6
Source VRF: default, Source Route Distinguisher: 10.250.255.144:100

 

GRF

1 Accepted Solution

Accepted Solutions

Great,

 

Happy to see that you fixed it.

 

Regards,

Ehsan

View solution in original post

3 Replies 3

elesani
Cisco Employee
Cisco Employee

Hi Gabriel,

 

It has never been a case that BGP will pick Path#1 as the best but will go through best-path selection mechanism that has been well documented in below link: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html

when it comes to your case, Path#3 is the best path because: 

 

- all three path are with same LP: 100

- but Path#3 is with Origin 'IGP' while the other two are with Origin 'Incomplete'

 

Origin IGP would be preferred on top of Incomplete. 

 

Regards,

Ehsan

Hi Ehsan,

 

Cool ! I actually ignored this selection criterion and was explicit, in order to tie this attribute for the decision to be made according to the MED, on the router 10.251.255.144 that was warning the route via iBGP I applied the route marking as "incomplete" as well and then the MED became the criterion, see:

 

Paths: (2 available, best #1)
Advertised to PE update-groups (with more than one peer):
0.2
Path #1: Received by speaker 0
Advertised to PE update-groups (with more than one peer):
0.2
65100
10.251.39.98 from 10.251.39.98 (10.255.21.143)
Origin incomplete, metric 0, localpref 100, valid, external, best, group-best, import-candidate
Received Path ID 0, Local Path ID 1, version 229122199
Extended community: SoO:65100:1439 RT:65100:100

Path #2: Received by speaker 0
Not advertised to any peer
65100
10.251.40.78 from 10.251.40.78 (10.255.21.129)
Origin incomplete, metric 131, localpref 100, valid, external
Received Path ID 0, Local Path ID 0, version 0
Extended community: SoO:65100:1231 RT:65100:100

 

Summary of selection criteria BGP paths:

1. Select the path which has the highest weight.
2. Select the path which has the highest local-preference
3. Select the path which was locally originated via a network or aggregate command or through redistribution.
4. Select the path which has the shortest AS_PATH.
5. Select the path which has the lowest origin type(igp<egp<incomplete).
6. Select the path which has the lowest med.
7. Select the eBGP paths rather than iBGP paths.
8. Select the path which has the lowest IGP metric to the BGP next hop.
9. Select the path which was received first, when all paths are external
10. Select the path which comes from a neighbor that has lowest Router-id.
11. Select the path which has the minimum cluster list length, when the originator is the same for all paths.It is used when there is a Route-Reflector in the topology.
12. Select the path which comes from the lowest neighbor address.

 

Regards,

Gabriel Farias

Great,

 

Happy to see that you fixed it.

 

Regards,

Ehsan