cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4233
Views
15
Helpful
4
Replies

Regarding multiple default routes

ncnaveen_arasu
Level 1
Level 1

Hi

If we define two default routes in a router, which route it prefers. Please clarify.

Thanks & Regards,

Naveen                  

4 Replies 4

Peter Paluch
Cisco Employee
Cisco Employee

Hi Naveen,

If you configure them as static routes with the same administrative distance, they both will be placed into the routing table, e.g.:

ip route 0.0.0.0 0.0.0.0 192.0.2.1

ip route 0.0.0.0 0.0.0.0 223.255.255.2

will result into:

Router# show ip route static

S*   0.0.0.0/0 [1/0] via 223.255.255.2

               [1/0] via 192.0.2.1

In this case, the router will use them both and will do load-sharing.

If any of these routes had a lower administrative distance, it would be preferred and it would be the only one installed into the routing table. This also goes for default routes learned from routing protocols: the protocol with the lowest administrative distance wins. And of course, a static default route having the administrative distance of 1 always wins over any dynamically learned default route because dynamic routing protocols have their administrative distance higher than 1.

Best regards,

Peter

Hi Peter,

Thanks for the clarification.

If the static routes were redistributed under dynamic routing protocol and from here if one default route is redisributed with OSPF and one with EIGRP.

Will it prefer the defaukt route learned via EIGRP ?

Naveen,

Will it prefer the defaukt route learned via EIGRP ?

In fact, no, it will prefer the default route via OSPF. Because the default route will be redistributed into EIGRP, its administrative distance will be 170. OSPF has the same administrative distance of 110 for intra-area, inter-area and external routes. So if the default route is being learned both by OSPF and EIGRP, OSPF will win.

To be very precise, you can not redistribute a default route into OSPF. You can redistribute any other route (i.e. any other prefix) but the only way to make OSPF inject a default route is to use the default-information originate command. Cisco's OSPF implementation internally skipa the default route when redistributing routes to avoid potential problems if the default route is redistributed unintentionally.

Best regards,

Peter

kcnajaf
Level 7
Level 7

Hi Naveen,

This will do a per session load-balancing (unique source/destination address) and then the traffic will flow nearly 50% on both links.

More details on the load balancing can be found on below link

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/5212-46.html

Hope that helps.

Regards

Najaf

Please rate when applicable or helpful !!!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card