cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
225
Views
5
Helpful
2
Replies

admin distances and routing

carl_townshend
Spotlight
Spotlight

Hi all

If I have 2 routes on my router to the same destination, 1 is ospf, the other static, if I make the Admin distance of the static route higher than the ospf one, will the ospf route take precedence ?

2 Replies 2

mahmoodmkl
Level 7
Level 7

Hi

Yes the ospf route will take precedence.

Thanks

Mahmood

Marwan ALshawi
VIP Alumni
VIP Alumni

hi

if you change the Admin distacce the less will be prefered however as you know routing always prefer the logest match before regarless whats the AD

if you leav distance to the default static normally prefered

but you can make the ospf preferd without changing the AD

as bellow example

thorugh ospf you see 192.168.1.0/24

justmake your static route as

ip route 192.168.0.0 255.255.252.0 [next hop ip]

for network 192.168.1.0/24 ospf will be prefered as it has longer mask

please, if helpful Rate

good luck

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