03-03-2022 07:27 AM
Hi all,
I have configured BGP on R1,R2 & R3.
R1 & R2 : IBGP : (ASN: 65100)
R3 - ASN: 64519
R3 received 192.169.1.0/24 prefix from R1 & R2.
R3 chosen route from R2 as best path.
Based on which attribute R3 selected the best Path?
Can someone explain, why ?
Network Topology:
Show bgp commands for reference:
03-03-2022 07:45 AM
BGP path selection go with attributes - as per the output, i believe because of the MED
03-03-2022 12:44 PM
Why metric is not shown for R1?
What metric should we consider if it is not given?
03-07-2022 08:03 AM
Look a the document what @MHM Cisco World suggested.
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/112965-bgpmed-attr-00.html
03-03-2022 08:34 AM
can I see the show ip route for R3?
03-03-2022 01:03 PM
why metric not appear??
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/112965-bgpmed-attr-00.html
please find link above, and remember the MED not cross the AS, i.e. the metric from R2 toward R1 then R1 will remove it because it pass AS boundary.
03-03-2022 12:00 PM - edited 03-04-2022 04:29 AM
Hello
Edited - All things equal I would say lowest router id is the tie breaker.
sh ip bgp x.x.x.x bestpath
03-03-2022 01:05 PM
How do i find it has selected oldest ebgp path?
03-03-2022 02:42 PM
Hello
Apologies bestpath-compare i meant to state , however this would be limited to the IOS you are using, could try it in anycase.
show bgp ipv4 unicast x.x.x. bestpath-compare
03-03-2022 02:24 PM
I do small Lab and Set the MED =0 in R1 to route update to R3 and then
R3 select the best path through the R1 not R2 so this indication to
before MED=0 in R1 the R3 select the bath toward R2 because of MED have value "even if it 0" and toward R1 there is no value.
for missing value please try this command
bgp best path med missing-as-worst.
03-04-2022 04:31 AM - edited 03-04-2022 04:31 AM
Hello
@MHM Cisco World if both rtrs in as 6500 advertise the same prefix towards as 64519 and all things being equal i would say it goes down the last bgp selection criteria's which would be router ids, not med
03-04-2022 04:40 AM
Hello
Update
FYI - just quickly formed a basic lab test best on the OP, and indeed all things equal the lower rid won the selection.
-
IOS-XRv-R1#sh bgp ipv4 unicast 100.100.100.100/32 bestpath-compare
Fri Mar 4 12:33:14.520 UTC
BGP routing table entry for 100.100.100.100/32
Versions:
Process bRIB/RIB SendTblVer
Speaker 10 10
Last Modified: Mar 4 12:05:42.071 for 00:27:33
Paths: (2 available, best #1)
Advertised IPv4 Unicast paths to update-groups (with more than one peer):
0.2
Path #1: Received by speaker 0
Advertised IPv4 Unicast paths to update-groups (with more than one peer):
0.2
23
10.1.12.2 from 10.1.12.2 (2.2.2.2)
Origin IGP, localpref 100, valid, external, best, group-best
Received Path ID 0, Local Path ID 1, version 10
Origin-AS validity: (disabled)
best of AS 23, Overall best
Path #2: Received by speaker 0
Not advertised to any peer
23
10.1.13.3 from 10.1.13.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, external
Received Path ID 0, Local Path ID 0, version 0
Origin-AS validity: (disabled)
Higher router ID than best path (path #1)
03-04-2022 06:04 AM
Hi Friend
1-the router-ID compare 1.1.1.1 and 2.2.2.2 not 2.2.2.2 and 3.3.3.3
2- the lower router-ID 2.2.2.2 have MED=0 which as I mention before is prefer than the MED unvalued.
3-try do same lab but same router-id and check result.
03-07-2022 07:17 AM
In this case, if MED is equal, it will choose the best path based on below order.
03-07-2022 08:03 AM
Yes
1- med is equal
2-both are ebgp
3-both direct connect so igp is equal
4-oldest if you do clear ip bgp, this make r3 know from both router approximately same time.
5-router id here
R2 have router id 2 2.2.2
R1 have router id 1.1.1.1
So R1 will win have lowest.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide