cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4709
Views
0
Helpful
5
Replies

Routing priority question

tinhnho123
Level 2
Level 2

Hello guys,

 

I have 2 lines below on my Cisco router, I just wanted to confirmthat i understand it right.

 

ip route 0.0.0.0/0 10.10.1.5 10
ip route 0.0.0.0/0 10.10.2.5 20

 

if my traffic hit this router then its outbound next hop would be 10.10.2.5 as that route has higher priority '20'?

 

Thanks.

5 Replies 5

Jon Marshall
Hall of Fame
Hall of Fame

No, the number is not a priority but an AD (Administrative Distance).

The lower the AD the better.

If you do a "sh ip route" on your router you should only see the default route via 10.10.1.5 in the routing table assuming the next hop is up and reachable.

Jon

Based on the lower AD, the route 10.10.1.5 would be preferred over the other one right? 

 

I'm current using ospf for routing protocol and trying understand how the ospf works. I've looked at the router config last few minutes and realized, we're using ospf and also static route, here is the configure:

 

interface g0/0
  ip address 10.10.1.6 255.255.255.0
  
interface g0/1
  ip address 10.10.2.6 255.255.255.0
  

router ospf 1
 router-id 172.20.1.2
 network 10.10.1.0 0.0.0.255 area 0
 network 10.10.2.0 0.0.0.255 area 0
 network 172.20.1.0 0.0.0.255 area 0

 

ip route 0.0.0.0/0 10.10.1.5 10
ip route 0.0.0.0/0 10.10.2.5 20

 

I know you mentioned the AD but why do i need static route 'ip route 0.0.0.0/0 10.10.1.5 10' and 'ip route 0.0.0.0/0 10.10.2.5 20 '  as I already have dynamic route ospf? 

 

Thanks,

 

 

Yes, based on the lower AD the route via 10.10.1.5 would be preferred but that doesn't mean it is used.

You need to look in the IP routing table to work out what is currently being used.

Do you have an OSPF default route ?

You may not need a default route but if you do and OSPF is not providing it then you need it from something else and perhaps that is why you have statics.

If you have a default OSPF route and it is pointing to 10.10.1.5 then no I can't see why you would need that route but even then the other static would be used because it would have a lower AD still than OSPF routes.

It's difficult to say without knowing your network as to what you need and don't need.

Jon

>>Do you have an OSPF default route though ?

I don't think I do. But to making sure, I ran 'sh ip route' and I don't see 'S* 0.0.0.0/0 via 10.10.1.5' or any other default route.

 

 

Where are 10.10.1.5 and 10.10.2.5 ie. what devices are they and how are they connected to your router.

Can you ping either of them ?

Jon

Review Cisco Networking products for a $25 gift card