cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1790
Views
11
Helpful
26
Replies

BGP MED

RobotAjay
Level 1
Level 1

2023-12-29_17-20.png

 

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??

1 Accepted Solution

Accepted Solutions

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)

Screenshot (647).pngScreenshot (648).png

I shut the interface between R2 and R3 then R2 have best path via R4 ONLY and R3 have best path vai R4 ONLY

Screenshot (649).pngScreenshot (650).png

View solution in original post

26 Replies 26

M02@rt37
VIP
VIP

Hello @RobotAjay 

Routers select the best route roward 4.4.4.0/24. Suriname router install in its RIB route towards 4.4.4.0/24 from 192.168.34.4 neighbor.

Since, the lowest MED is the preferred path.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Okay, I understand that part.


the best route will  be installed in  the routing table, however the other preferred route should show in  "show ip bgp" table right?correct me if I am wrong.

I mean If you can see this output from Router "Haiti" and the router "Cuba"

"Haiti"

*>i 4.4.4.0/24 192.168.34.4 0 100 0 2 i
* 192.168.24.4 4444 0 2 i

"Cuba"
"*> 4.4.4.0/24 192.168.34.4 0 0 2 i 

Sop my question is why sh ip bgp is not showing the other path(as backup), is it default behavior?



 

@RobotAjay 

do that command

sh bgp ipv4 unicast 4.4.4.0

and see the best path between the 2 entries:

Haiti router:

M02rt37_0-1703856516478.png

Suriname router:

M02rt37_0-1703857933500.png

 

 

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Please find the attacked screenshot.

Suriname.pngCuba.pngHaiti.png

@RobotAjay 

On Suriname please add two static routes 

ip route 192.168.24.0 255.255.255.0 192.168.12.2
ip route 192.168.34.0 255.255.255.0 192.168.13.3

Just for testing....

and look again on that Suriname router #sh bgp ipv4 unicast 4.4.4.0

You should have this, please look my screenshot:

M02rt37_0-1703859839879.png

If it is Ok for you, the issue is that from Suriname Router point of view subnets 192.168.34.0 and 24.0 are inacessible. Instead of static routes, you should consider to configure the next hop self command on Haiti and Cuba Routers, like this on Haiti as example:

M02rt37_0-1703860453738.png

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

I believe the issue is with the route map.
The Moment I removed the route map on my AS2(Jamaica) router, both Haiti and Cuba router show two routes.

Both.png

You want to advertise prefix to both peers with same MED see below my comment 

If you want to make one prefix have specific MED and other advertise  without any modify 

Then you need to add 

route-map MED permit 20
<- no match no set under this 20 line of route-map

MHM

Is it mandatory to advertise same MED for both peers?

ideally, I am not sure why the route is not forwarded from "Haiti" router to "cuba" router when only one MED is added on AS2.


As per your statement, I have added MED for both and it works (only if it has the same MED value). but not sure why keeping different MED or keeping MED only for one neighbor is not working.

Any explanantion or any link could be much helpful for me



MHM

Are there ibgp between cuba and Haiti?

MHM

Yes sir, IBGP is configured between CUBA and HAITI.

@RobotAjay 

What about Suriname Router ? What do you want ? To learn subnet 4.4.4.0/24 from Haïti and Cuba and prefer which one ? 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Well , For me the concern is only about the Routing table.
If I configure MED on AS2 only for one neighbor then , Haiti shows two paths to reach 4.4.4.0/24 while Cuba shows only one path to reach 4.4.4.0/24(BGP routing table -s how ip bgp).

I would like to understand this behavior.

@RobotAjay 

Please for that case: while Cuba shows only one path to reach 4.4.4.0/24(BGP routing table -s how ip bgp)...provide the output on Cuba: #sh bgp ipv4 unicast 4.4.4.0

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Review Cisco Networking for a $25 gift card