09-23-2024 06:58 PM
If we have a circuit between two routers and have eigrp and static configured, which route do they prefer?
As I know :
Since a lower administrative distance is preferred, the routers will choose the static route over the EIGRP route.
But in some situation we have configured ebgp neig and default route (0.0.0.0 0.0.0.0 next_hope) as well, technically traffic prefered route to less AD distance but my traffic only go through BGp how static and dynamic protocol work together and how take decisions.
Solved! Go to Solution.
09-23-2024 08:35 PM - edited 09-23-2024 08:37 PM
Hello @ashishkumar01896 ,
compare
show ip route 0.0.0.0
with show ip route 10.100.145.10
Your default static route is:
>> froute1#sh run | i ip route
ip route 0.0.0.0 0.0.0.0 10.100.145.10
You are using a not directly connected IP next-hop that is resolved by recursion in three effective next-hops that are those shown in the output of show ip route 0.0.0.0:
>> * 10.105.145.59
Route metric is 0, traffic share count is 1
10.105.145.57
Route metric is 0, traffic share count is 1
10.105.145.9
Route metric is 0, traffic share count is 1
this static default route is installed in the IP routing table for its lower AD 1 < eBGP AD =20
As a result of this the BGP route for 0.0.0.0/0 has code r that means that the BGP route is valid but it couldn't be installed in the IP routing table because a better route for the same prefix has been provided by another protocol ( in this case static)
>> Network Next Hop Metric LocPrf Weight Path
r> 0.0.0.0 10.100.145.10 0 13683 61001 i
Apart the recursive static route what you see is normal and it is explained by the lower AD wins when comparing the same prefix.
0.0.0.0/0 from static compared to 0.0.0.0/0 from eBGP
prefixes with different prefix lengths are not comparable : for example 172.16.0.0/16 and 172.16.100.0/24 are treated as two different prefixes as they are and they are not compared and both preifixes can be installed in the IP routing table.
Hope to help
Giuseppe
09-23-2024 08:45 PM
The router prefer static default route than defualt route via ebgp.
The next-hop is not direct connect and it reachable via three path.
So I think there is no one link between two router but there is multi link
MHM
09-23-2024 07:07 PM
You see default route via ebgp or via static in rib?
MHM
09-23-2024 07:19 PM
Yes I see it.
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.100.145.10 4 13979 228 248 3 0 0 01:14:57 1
froute1#sh run | i ip route
ip route 0.0.0.0 0.0.0.0 10.100.145.10
Network Next Hop Metric LocPrf Weight Path
r> 0.0.0.0 10.100.145.10 0 13683 61001 i
*> 10.104.146.54/31 0.0.0.0 0 32768 i
09-23-2024 07:24 PM
There is one route which i see in both static and Bgp routing table
09-23-2024 07:25 PM
Share show ip route 0.0.0.0
MHM
09-23-2024 07:42 PM
route1#sh ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
Known via "static", distance 1, metric 0, candidate default path
Routing Descriptor Blocks:
* 10.105.145.59
Route metric is 0, traffic share count is 1
10.105.145.57
Route metric is 0, traffic share count is 1
10.105.145.9
Route metric is 0, traffic share count is 1
route1#
09-23-2024 08:35 PM - edited 09-23-2024 08:37 PM
Hello @ashishkumar01896 ,
compare
show ip route 0.0.0.0
with show ip route 10.100.145.10
Your default static route is:
>> froute1#sh run | i ip route
ip route 0.0.0.0 0.0.0.0 10.100.145.10
You are using a not directly connected IP next-hop that is resolved by recursion in three effective next-hops that are those shown in the output of show ip route 0.0.0.0:
>> * 10.105.145.59
Route metric is 0, traffic share count is 1
10.105.145.57
Route metric is 0, traffic share count is 1
10.105.145.9
Route metric is 0, traffic share count is 1
this static default route is installed in the IP routing table for its lower AD 1 < eBGP AD =20
As a result of this the BGP route for 0.0.0.0/0 has code r that means that the BGP route is valid but it couldn't be installed in the IP routing table because a better route for the same prefix has been provided by another protocol ( in this case static)
>> Network Next Hop Metric LocPrf Weight Path
r> 0.0.0.0 10.100.145.10 0 13683 61001 i
Apart the recursive static route what you see is normal and it is explained by the lower AD wins when comparing the same prefix.
0.0.0.0/0 from static compared to 0.0.0.0/0 from eBGP
prefixes with different prefix lengths are not comparable : for example 172.16.0.0/16 and 172.16.100.0/24 are treated as two different prefixes as they are and they are not compared and both preifixes can be installed in the IP routing table.
Hope to help
Giuseppe
09-23-2024 08:45 PM
The router prefer static default route than defualt route via ebgp.
The next-hop is not direct connect and it reachable via three path.
So I think there is no one link between two router but there is multi link
MHM
09-24-2024 12:21 AM
Hello
What are you trying to accomplish?
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