12-29-2023 03:58 AM - edited 12-29-2023 04:18 AM
Please find the attached diagram.
Neighborship is formed and Below is the configuration on AS2 router.
router bgp 2
bgp log-neighbor-changes
network 4.4.4.0 mask 255.255.255.0
network 192.168.24.0
network 192.168.34.0
neighbor 192.168.24.2 remote-as 1
neighbor 192.168.24.2 route-map MED out
neighbor 192.168.34.3 remote-as 1
access-list 1 permit 4.4.4.0 0.0.0.255
route-map MED permit 10
match ip address 1
set metric 4444
After this configuration when i check the router "Suriname", I see only one path.
Suriname#sh ip bgp
*>i 4.4.4.0/24 192.168.34.4 0 100 0 2 i
May I know why the second path is not showing? The moment I remove the router map on AS2 router it works as expected.
Even on the router "CUBA" I see only one route when MED is applied. can you please explain why the redundant path is not showing??
Solved! Go to Solution.
12-30-2023 02:45 AM
Please find the output.
As you can see cuba has only one route while haiti has 2 routes, for some reason Haiti is not sending 4.4.4.0/24 to Cuba (When MED is applied only for 1 peer in As2 router).
12-29-2023 09:40 AM
That why Suriname is not receive two path.
1- MED is used and it same' the cuba and Haiti use MED to select path if same then router select the ebgp path than ibgp and advertise the best path to Suriname.
2- MED is push to one cuba or Haiti' cuba and Haiti select path with lowest MED and since missing MED is 0 then it always select it as best path' but ibgp neighbor (cuba and Haiti ibgp) will also select same path so' Suriname see only one path
We can override missing med with
bgp bestpath med missing-as-worst
3-MED is use but it not same' this case is same as case 2' the ibgp neighbor (cuba and Haiti) select one path and advertise to Suriname.
So solution from above as I mention push MED or remove ibgp between cuba and Haiti
MHM
12-29-2023 07:50 AM
Yes @RobotAjay
Same MED, so you see the 2 paths with the one in eBGP prefered.
Add MED on the other neighbor and check.
12-29-2023 06:00 AM - edited 12-29-2023 06:01 AM
Consider the following document if you want to use Equal cost Multipath (ECMP), and play around.
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html
12-29-2023 06:32 AM
neighbor 192.168.34.3 route-map MED out
you need to add MED to both Peer
then check
MHM
12-29-2023 11:48 PM
you dont get the idea, so I will more explain
what is first rule between iBGP ? the path learn from iBGP never re-advertise to other iBGP
NOW
one path use MED (red line) other not
the BGP best path selection use lowest MED to select the path
Cuba have lowest path (no MED so it assume it 0)
Haiti select path via Cuba and Haiti never resend this path to Suriname
Cuba own of this path send this path to Suriname
Here same as above but Now we make two path have same MED and hence the Haiti BGP select path not depend on MED but it prefer eBGP over iBGP
here both Cuba and Haiti advertise the path to Suriname
12-30-2023 12:05 AM
Thanks for the clarification.
I do understand the IBGP rule, so as per the rule anything Cuba learnt from haiti or haiti learnt from cuba will not be forwarded to "Suriname"(As per IBGP rule)
But whatever Haiti/cuba learnt from jamaica(AS2) will be forwarded to Suriname.
The only point that confused me is, what ever Jamaica sends to Haiti will have MED value as 400, and also Haiti has already learnt 4.4.4.0/24 via Cuba which has less MED(0).
So ideally, the router "HAITI" is not forwarding the route (learned via Jamaica with MED 400) to other routers, and this is because of the MED.
I hope my understanding is correct,
Please correct me if I am wrong.
12-30-2023 12:24 AM - edited 12-30-2023 12:25 AM
The only point that confused me is, what ever Jamaica sends to Haiti will have MED value as 400, and also Haiti has already learnt 4.4.4.0/24 via Cuba which has less MED(0).
Which path will win, from the lower MED which is Cuba, since this path is ibgp haiti never resend it to Suriname
why?
why ibgp need full mesh why? because each ibgp never send path learn from ibgp to other ibgp.
the reason for above the ebgp use AS to detect loop, ibgp dont have this capability because the AS is same so it depend on split horizon (full mesh need) that make ibgp never re advertise the path learn from ibgp.
when we config same MED to both Cuba and Haiti
both now have ebgp path not ibgp and hence it can advertise this path to Suriname
MHM
12-30-2023 04:13 AM
rule 1- ibgp never re-advertise iBGP BEST path to other iBGP
rule 2- ibgp or ebgp advertise only best path (there is special cases but not time to explain here now)
this lab config MED toward only R2
R2 have two path one for R4 and other from R3 via iBGP
R3 have only one path toward R4, since it path is select as best in it Neighbor R2 then in logic the R2 not need to send it best path to R3 (best path is it from R3)
I shut the interface between R2 and R3 then R2 have best path via R4 ONLY and R3 have best path vai R4 ONLY
12-30-2023 04:36 AM
Thanks @MHM Cisco World
I just do the same things on GNS3 lol
Thanks for that sharing. I have the same conclusion as you.
12-31-2023 02:29 AM
Understood, since the MED value is higher the R2 will not advertise 4.4.4.0/24 to R3(because it is not best path)
Thanks for helping me out, Have a nice day...
12-31-2023 02:33 AM
have a nice new year eve
MHM
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