cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
782
Views
7
Helpful
7
Replies

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 7

GRANT3779
Spotlight
Spotlight

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 :)

Joseph W. Doherty
Hall of Fame
Hall of Fame

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 :). 

Julio E. Moisa
VIP Alumni
VIP Alumni

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. 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Thank you Julio moisa :)

It was a pleasure, have a great day!

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<