cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1095
Views
5
Helpful
25
Replies

BGP Query

Fred Stanton
Level 1
Level 1

Hello cisco people
Can you please tell me why i see multiple routes for the same destination from different destinations but the nexthop is the same ip address, also why I only see a metric zero value for one of them?

sh ip bgp
   Network     Next Hop    Metric  LocPrf   Weight Path
* 200.0.0.0  100.100.1.2                                0 4000 2000 i
*>                  100.100.1.2   0                          0 2000 i
*                     100.100.1.2                               0 3000 2000 i

25 Replies 25

Hello M02@rt37 
thank you for you reply , but may I ask why is see the same next-hop address and a metric value for only one of the paths?

@Fred Stanton 

All the routes have the same next hop (100.100.1.2). This indicates that the routes to the destination 200.0.0.0 are reachable through the same next hop router, which is common in BGP scenarios when multiple routes are learned from different BGP peers.

Also, if the router that's advertising the route is not setting a MED for all paths, only the ones where it's configured will show a metric other than zero.

In your BGP scenario, you are observing multiple eBGP peers on the same network segment (100.100.1.2), which is common when different routers advertise routes for the same destination (`200.0.0.0`) while using the same next hop. This behavior, known as the third-party next-hop feature, allows BGP to simplify routing information by indicating that multiple peers are directly reachable and thus advertising the next hop of the originating eBGP peer. The presence of a metric value only on one of the paths indicates that this metric, known as the MED, was set by the originating router before it advertised the route to your router, showing its internal cost for reaching the prefix. The other routes, when re-advertised by different routers, do not carry this MED because BGP does not propagate MED values for routes it has not originated, as these routers lack knowledge of the originating AS's internal cost metrics. Therefore, while you see the same next hop for all routes, the metric is only present for the route that originated from the eBGP peer that defined it, demonstrating how BGP manages route advertisements and metrics in multi-homed environments.

 

 

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

Hello @Fred Stanton 
I assume this a simulation you are running looking at the addressing and ASN numbering?
Your OP suggests you have multiple ebgp peering's sharing the same network segment 100.100.x.x?

What you see is a 3rd party next-hop feature of bgp, its basically stating the above = multiple ebgp peering from the same network segment.

BGP is saying in this instance i can reach each peer directly and rather than advertising its own nexthop to your rtr it will advertise originating ebgp peer (as either nexthop is on same network segment anyway)

So 200.0.0.0 is originating from 100.100.1.2 ebgp peer that is directly connected, it also sees the same network two more times from the other ebgp peer that are also directly connected.

As for the metric ONLY showing on one of the paths and not the others, Med is used for internal cost metric of the neighboring ASNs local prefix its advertising , In this case metric 0 is the directly connected cost from the directly connected AS that is originating the route to you, in other words its telling your router of its internal cost for the prefix its originating

The others paths in your bgp rib table don't have that metric because as when the other routers initially received it then re-advertised to your rtr it bgp would have removed it for there is no reason for them to re-advertise a internal cost metric to another AS for a prefix that they didn't originate.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello @paul driver 
You are correct, i am using packet tracer simulation to understand bgp also all my 4 routers are using the same subnet

this real network or PT lab ?

MHM

Thanks that explain the confuse point between me and @paul driver 
it indeed 3rd Next-hop 

Understanding Third-Party Next-Hop (ine.com)


where in your lab the router that inject the prefix is 100.100.1.2 (AS2000)
and since AS3000 and AS4000 also form ebgp with AS2000 router these router also re-adv this prefix into AS1000

here the 3rd party work and change the next-hop instead of point to AS3000 and AS4000 it point directly to AS2000 (origin of prefix)

above explain the next-hop 
for metric this is weight and any prefix not originate from router have weight ""0""

sh ip bgp
   Network     Next Hop    Metric  LocPrf   Weight Path
* 200.0.0.0  100.100.1.2                                0 4000 2000 i
*>                  100.100.1.2   0                          0 2000 i
*                     100.100.1.2                               0 3000 2000 i

Screenshot (828).png

check my other comments 
thanks

MHM 

Hello @MHM Cisco World 

I am interest to see lab how one router get three path for same prefix without additional path send/receive



In this instance PIC (additional path) has no relevance on what the OP is seeing here, Its entirely separate, What the OP is seeing is basic bgp advertisement from multiple ebgp peering using a single shared network segment (3rd party next-hop ) and default bgp metric advertisement with the output of the OPs bgp table confirming this?


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Fred Stanton
Level 1
Level 1

Hello @paul driver M02@rt37 @MHM Cisco World 
Thank you all for your help its been a good learning experience.

You are welcome 

next time share your topology with Q it help us to answer you 

MHM

Review Cisco Networking for a $25 gift card