cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1562
Views
0
Helpful
4
Replies

OSPF Distance

kondratev
Level 1
Level 1

Hello,

I have a simple network (see attachements). On R3 I have a route 10.10.10.0/24 from two sources: 1.1.1.1 and 2.2.2.2. R3 need to choose the route from 1.1.1.1. And I must do it with administrative distance for some reason. I can't change any OSPF metrics (the network is more complex, than at the pictue; I didn't draw all network elements for simplicity).

I have the following configuration at R3:

router ospf 1

dstance 140 2.2.2.2 0.0.0.0 NET

!

ip access-list standard NET

permit 10.10.10.0 0.0.0.255

But the distance of route from R2 is 110 as before.

And if I input the command 'dstance 255 2.2.2.2 0.0.0.0 NET', the route from R2 disappear as expected.

Could you tell me why does this command work correctly with distance 255 only?

2 Accepted Solutions

Accepted Solutions

skarthic
Cisco Employee
Cisco Employee

This is an expected behavior for changes in AD within a process will not have an effect on the routes.

Please check the following link:http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCeh46993

So changing the AD will not influence in Path selection in OSPF.

Regards,
Subramaniya Karthic.R

Please rate helpful posts.

View solution in original post

It is an interesting link that Subramaniya Karthic.R provided. And it does explain your intial symptoms.

The explanation for what happens when you set the distance to 255 is a bit different. Most of the setting of AD are to compare prefixes learned from different sources. And the bug referenced in the link is quite clear that this is for comparing between multiple processes and should have no effect within a single routing process. The setting of AD to 255 is a special case of AD. Set to 255 is an indicator that the prefix is not trustworthy and should not be used in routing at all. This is why setting it to 255 changes the behavior.

It is perhaps a subtle bit of logic but setting AD to some value less than 255 helps guide the choice when there are two alternatives (and works between two routing processes) but setting AD to 255 assures that there will only be a single alternative to choose from.

HTH

Rick

HTH

Rick

View solution in original post

4 Replies 4

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

If you want r1 to be the exit point from r3, then make sure r3 to r1 interface has lower metric.

under the interface use

ip ospf cost xx

if both interfaces are for example 100MB, then you can raise the cost between r3 and r2, so r3 to r1 is prefered

ip ospf cost 10

HTH

Reza

skarthic
Cisco Employee
Cisco Employee

This is an expected behavior for changes in AD within a process will not have an effect on the routes.

Please check the following link:http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCeh46993

So changing the AD will not influence in Path selection in OSPF.

Regards,
Subramaniya Karthic.R

Please rate helpful posts.

But if I input the command 'dstance 255 2.2.2.2 0.0.0.0 NET', AD influences Path selection. Or it's a bug also?

I have IOS 12.2(53)SE2. So there is no such bug in it.

It is an interesting link that Subramaniya Karthic.R provided. And it does explain your intial symptoms.

The explanation for what happens when you set the distance to 255 is a bit different. Most of the setting of AD are to compare prefixes learned from different sources. And the bug referenced in the link is quite clear that this is for comparing between multiple processes and should have no effect within a single routing process. The setting of AD to 255 is a special case of AD. Set to 255 is an indicator that the prefix is not trustworthy and should not be used in routing at all. This is why setting it to 255 changes the behavior.

It is perhaps a subtle bit of logic but setting AD to some value less than 255 helps guide the choice when there are two alternatives (and works between two routing processes) but setting AD to 255 assures that there will only be a single alternative to choose from.

HTH

Rick

HTH

Rick
Review Cisco Networking for a $25 gift card