Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Route selection

Hi Friends,

Hope you all re doing good :)

I have one query, If i have configured one router to reach the destination as below:

Source: 192.168.1.1

Destination : 10.0.0.5

1. I configured Static Routing

10.0.0.0/24

2. I configured for OSPF

Here i specified the network 10.0.0.0 /27

Best path will prefer based on AD value or the prefix.?

If its AD value, its choose the Static routing Or it will choose the prefix length it will use the oSPF route (Because it has longer prefix match).

Kindly advise, That process to select the best route.

Thank you :)

7 REPLIES
Bronze

They are technically two

They are technically two different routes. I belive the OSPF route would be chosen in this case due to the longer prefix.

If both routes were the same, e.g /24 then the AD would come into play and the static would be preferred.

Thank you Grant :)

Thank you Grant :)

Super Bronze

As the others have already

As the others have already noted, longer prefix is preferred.  For the same prefix, lower AD is preferred.

Normally (i.e. by default) a static route would have a lower AD than OSPF, but both their ADs can be modified.

Thank you Doherty :). 

Thank you Doherty :). 

Hi

Hi

The router will always prefer the most specific entry into the routing table, for example:

You want to reach the IP 10.0.0.1 from your router:

You are receiving a prefix 10.0.0.0/8 via OSPF but you already have a static route 10.0.0.1/32 (ip route 10.0.0.1 255.255.255.255 next hop IP), the router will prefer the most specific and in this case is: 10.0.0.1/32

In your case /27 is most specific than /24 so it should prefer the prefix received by OSPF.

The AD is useful when you have different routing protocols or static routes and you want to prefer other path. 

Thank you Julio moisa :)

Thank you Julio moisa :)

It was a pleasure, have a

It was a pleasure, have a great day!

:-)

8
Views
7
Helpful
7
Replies
CreatePlease login to create content