cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1241
Views
12
Helpful
8
Replies

Dynamic Route or Default Route

kalyan.gogineni
Level 1
Level 1

When both routes are configured on the router,which route will take precedence to route traffic to the destination.

8 Replies 8

xyrrwcisco
Level 1
Level 1

Dynamic Route

the most specific route, which is usually the dynamically learned route. you can have default routes injected via dynamic routing btw.

Thanks for your reply.

I think you are asking which default route would be placed in the routing table in the event that one is learned dynamically and the other statically.

For example, one learned from OSPF and the other statically.

Something like that?

If so, the static route will be used because it has a lower Administrative Distance (AD) than any dynamic route, by default.

When comparable routes (same prefix length - specificity) are received by a router from the same routing protocol, it will select the one with the best metric and place it in the routing table. If, however, they come from 2 different sources, the AD will be examined and the one with the lower AD will be placed in the routing table.

Lastly, if the 2 routes are not comparable (different prefix lengths), it will utilize the more specific route to the destination, although both may exist in the routing table.

HTH

Victor

AJAZ NAWAZ
Level 5
Level 5

A static default would win over a dynamic default route.

That said, a static default pointing to an interface would be preferred over a static default pointing to a next-hop ip address.

test it you will see :-)

hth,

Ajaz

Does default route has any AD?

Yes and the router uses the AD to select the 'Best' default.

One point to note here is that the best default available on a router is zero (0), and it looks like this:

ip route 0.0.0.0 0.0.0.0 gigabit 1/0

And to complete the picture the following route will have the next best default on offer and as you can see points to an IP next-hop:

ip route 0.0.0.0 0.0.0.0 192.168.1.254

If there is no static route, and two defaults are being received by dynamic routing protocols, the one with the best AD will make it into the routing table. An eBGP default is the next best and so on and so forth (i.e. eigrp, ospf..)

hth,

Ajaz

Kalyan:

Why don't you read what I wrote to you?

I answered that question.

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco