10-09-2024 05:53 AM
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
Solved! Go to Solution.
10-09-2024 06:41 AM - edited 10-09-2024 06:50 AM
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.
10-09-2024 06:45 AM
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.
10-09-2024 11:15 AM
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
10-09-2024 11:57 AM
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?
10-09-2024 05:56 AM
This IP for BGP route reflector ?
MHM
10-09-2024 06:36 AM
Hello @MHM Cisco World
no this is not a route reflector
10-09-2024 06:38 AM - edited 10-09-2024 12:00 PM
check below
MHM
10-09-2024 06:43 AM - edited 10-09-2024 12:00 PM
check below
MHM
10-09-2024 06:53 AM
Hello @MHM Cisco World
@MHM Cisco World wrote:
100.100.1.2 this router if not route reflector it ibgp neighbor that why AS is different but it end with ""i""
MHM
The prefix is being advertised from the rtr either via a network statement in the bgp process or its a directly connected route
10-09-2024 07:43 AM - edited 10-09-2024 12:01 PM
check below
MHM
10-09-2024 08:12 AM
Hello @MHM Cisco World
I’m tbh not sure what you mean -
you raised the question about (i) at the end of an received bgp route -As i’ve already stated - this code indicates such prefix is being advertised into bgp by the originator rtr via the network command from either an igp process or a directly connected route - So the nexthop will not be 0.0.0.0
10-09-2024 10:50 AM
Hello @MHM Cisco World
sorry i dont understand, what is additional-path send?
10-09-2024 10:53 AM - edited 10-09-2024 12:01 PM
check below
MHM
10-09-2024 10:58 AM
Hello
I have multiple paths already as shown in my post just like @paul driver said, so i am not sure i understand you - does this mean additional path send is applied already if so i do not see it and is that making the output I now see with the same next-hop and metric?
10-09-2024 11:03 AM - edited 10-09-2024 12:01 PM
check below
MHM
10-09-2024 11:12 AM
Hello @MHM Cisco World
I have 4 routers in my simulation, and the i am receiving this route from routers 2-4 not from router 1 as you have said?
when i do show ip route I only see the 1 route via router 2 but when i do show ip bgp i see 3 paths for the same route all with the same next hop and 1 path with a metric 0, so my question was why i see those 3 paths and metric like I have shown?
Sorry but I am getting confused
10-09-2024 11:14 AM
Can you draw topolgy
MHM
10-09-2024 06:01 AM
Hello @Fred Stanton
The multiple routes you're seeing for the same destination 200.0.0.0 with the same next-hop IP 100.100.1.2 represent different paths learned through BGP from various AS sources (`4000 2000`, `2000`, and `3000 2000`).
Even though the next-hop is the same, these paths differ based on their AS paths, and BGP stores them all for potential use. The second route is marked as the best (*>), indicating that BGP has selected it as the active path based on its shortest AS path length (`2000`), which BGP prioritizes. The "Metric" (which refers to the MED, or Multi-Exit Discriminator) is shown only for the route through AS 3000, and its absence on other routes means they default to a value of 0. Since MED is used to influence route selection when multiple entry points exist between ASes, and all routes here share the same next-hop, BGP focuses on the AS path length first. Therefore, the route through AS 2000 is preferred, while others are stored as backups for redundancy, despite having the same next-hop...
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