Re: OSPF Distance Command .!

From: Paul Cosgrove <paul.cosgrove_at_gmail.com>
Date: Fri, 22 May 2009 09:13:07 +0100

I completely agree. In this case, if the link between R1 and R2 is
point-to-point, there is only one shortest path to R1 (R0-R1). Changing
the AD of a prefix advertised by that router, to make it more prefered
over the same prefix advertised by R2, might be expected to leave you
with a single route to that prefix. I've just tried this using ethernet
interfaces set to point to point and that is indeed what occurs - only
one route remains after the distance command is applied.

In Divin Mathew Johns case however, he still sees two paths. I do not
think this should occur, since R0's two routes to R1 are not equal
cost. It seems that the spf calculation is not simply adding the costs
to reach the advertising router to the advertised cost of the link,
rather it must be taking into account the fact that the same link is
also connected directly to R2. Otherwise it should only show the direct
path via R0-R1. If you were to use per packet load balancing, these two
installed paths will cause out of order packets to R1's 12.1.1.1
interface, which seems to be undesirable behaviour.

I would have expected to see both paths if he was matching the DR
address, and I do when I lab that, but in this case there is no DR so it
may be a bug. The configurations shown have changed slightly between
posts, maximum-paths 10 being added and the router-id matched by the
distance command being changed. Perhaps it is related to the order in
which the commands were applied, or simply IOS versions. For my own
tests I'm using dynamips with 7200s running 12.2(25)S15, and I have not
seen the same behaviour with that.

Paul.

Jose Miguel Huertas wrote:
> Use the command show "ip ospf database": if the route you want to modify is originally adevertised by the router-id you are interested on, the AD of this route should change to the value you configured. If not, the route keeps its AD by default (110 for OSPF).
>
> Jose.
>
>
> -----Mensaje original-----
> De: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] En nombre de Paul Cosgrove
> Enviado el: viernes, 22 de mayo de 2009 9:17
> Para: Jordan
> CC: Divin Mathew John; Chris Breece; Cisco certification
> Asunto: Re: OSPF Distance Command .!
>
> My understanding is that in this case the distance command is configured
> to match advertising router id 22.22.22.22, and link 12.1.1.0.
> Only the route to the 12.1.1.0 subnet learned from the router with RID
> 22.22.22.22 should have its distance changed.
> I understand that are flooded in multiple directions, and so can be
> learned via multiple directions. If equal cost paths are available then
> they may be used.
>
> In this example, neither 22.22.22.22 or 12.1.1.0 is local to the
> router where the distance command is applied, so I'm not sure what you
> are saying here.
>
> If the link between R1-R2 had a DR elected, the behaviour which has been
> described would seem perfectly normal to me. Divin Mathew John has
> however since said that this is not the case, and that the R1-R2 link is
> also serial link using the point-to-point network type.
>
> Paul.
>
> Jordan wrote:
>
>> Dear,
>> I confirm that you may a little bit misconceive the use of the router-id in
>> this scenario. It means that all the local link belong to this router will
>> be given the distance value you assign, in spite of where it is learned
>> from. So, 12.1.1.0 is the local link ,then all routes are given distance
>> value 90 (if you would like to assign) , no matter whether it is learned
>> from R1 or R2.
>>
>> 2009/5/22 Paul Cosgrove <paul.cosgrove_at_gmail.com>
>>
>>
>>
>>> This does not sound like a bug, just that your R1-R2 link is an OSPF
>>> network type which has a DR elected. The DR acts as a pseudonode which has
>>> 0 cost connections to each of the routers on that subnet; so it is a virtual
>>> router located between R1 and R2. It is the DR pseudonode which is
>>> advertising the link. When you apply your distance command it only has an
>>> effect if the router you match is advertising the subnet, i.e. if it is the
>>> DR. You have two equal cost paths to the pseudonode, so if your distance
>>> command matches the pseudonode, the AD of both will be changed.
>>>
>>> Hope this helps,
>>>
>>> Paul.
>>>
>>>
>>> Divin Mathew John wrote:
>>>
>>>
>>>
>>>> This is wht i got in the end of the day.
>>>>
>>>> R1-----R0------R2 and there is a connection between R1 and R2. So R0 has
>>>> 2
>>>> paths to that segment between R1 and R2.
>>>> R1
>>>> interface Loopback0
>>>> ip address 100.100.0.100 255.255.255.0
>>>> !
>>>> interface Loopback1
>>>> ip address 100.100.1.100 255.255.255.0
>>>> !
>>>> interface Loopback2
>>>> ip address 100.100.2.100 255.255.255.0
>>>> !
>>>> interface Loopback3
>>>> ip address 100.100.3.100 255.255.255.0
>>>> !
>>>> interface Serial0/0
>>>> ip address 10.1.1.1 255.255.255.252
>>>> serial restart-delay 0
>>>> !
>>>> interface Serial0/1
>>>> ip address 20.1.1.1 255.255.255.252
>>>> serial restart-delay 0
>>>> !
>>>> interface Serial0/2
>>>> no ip address
>>>> shutdown
>>>> serial restart-delay 0
>>>> !
>>>> interface Serial0/3
>>>> no ip address
>>>> shutdown
>>>> serial restart-delay 0
>>>> !
>>>> router ospf 1
>>>> router-id 100.100.100.100
>>>> log-adjacency-changes
>>>> network 10.1.1.1 0.0.0.0 area 0
>>>> network 20.1.1.1 0.0.0.0 area 0
>>>> network 100.100.0.100 0.0.0.0 area 0
>>>> network 100.100.1.100 0.0.0.0 area 0
>>>> network 100.100.2.100 0.0.0.0 area 0
>>>> network 100.100.3.100 0.0.0.0 area 0
>>>> distance 90 22.22.22.22 0.0.0.0 SELECT_12.1.1.0_from_R1
>>>> !
>>>> ip http server
>>>> ip forward-protocol nd
>>>> !
>>>> !
>>>> !
>>>> !
>>>> ip access-list standard ONLY_R1_LOOPBACKS
>>>> permit 1.1.0.0
>>>> ip access-list standard SELECT_12.1.1.0_from_R1
>>>> permit 12.1.1.0
>>>> ip access-list standard SELECT_12.1.exit
>>>> !
>>>> !
>>>> All router-id Hardcoded. all processes cleared. clear ip route * done.
>>>>
>>>>
>>>> R0's Routing Table
>>>> when R2's ROUTER-ID is lower than R1, A.D of the both the paths gets
>>>> changed
>>>> to the one configured on the Distance command.
>>>> R0#sir
>>>> Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
>>>> D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
>>>> N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
>>>> E1 - OSPF external type 1, E2 - OSPF external type 2
>>>> i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
>>>> level-2
>>>> ia - IS-IS inter area, * - candidate default, U - per-user static
>>>> route
>>>> o - ODR, P - periodic downloaded static route
>>>>
>>>> Gateway of last resort is not set
>>>>
>>>> 1.0.0.0/24 is subnetted, 1 subnets
>>>> O 1.1.0.0 [110/65] via 10.1.1.2, 00:02:07, Serial0/0
>>>> 2.0.0.0/24 is subnetted, 1 subnets
>>>> O 2.2.0.0 [110/65] via 20.1.1.2, 00:02:07, Serial0/1
>>>> 100.0.0.0/24 is subnetted, 4 subnets
>>>> C 100.100.0.0 is directly connected, Loopback0
>>>> C 100.100.1.0 is directly connected, Loopback1
>>>> C 100.100.2.0 is directly connected, Loopback2
>>>> C 100.100.3.0 is directly connected, Loopback3
>>>> 20.0.0.0/30 is subnetted, 1 subnets
>>>> C 20.1.1.0 is directly connected, Serial0/1
>>>> 10.0.0.0/30 is subnetted, 1 subnets
>>>> C 10.1.1.0 is directly connected, Serial0/0
>>>> 12.0.0.0/30 is subnetted, 1 subnets
>>>> O 12.1.1.0 [90/128] via 20.1.1.2, 00:02:08, Serial0/1
>>>> [90/128] via 10.1.1.2, 00:02:08, Serial0/0
>>>>
>>>> When R1's Router-ID is Lower than R2 and R1 hasnt reached the FULL state
>>>> with R0. The route thru R2 is shown with A.D of 90(specified in the
>>>> config.]
>>>> R0#sir
>>>> Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
>>>> D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
>>>> N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
>>>> E1 - OSPF external type 1, E2 - OSPF external type 2
>>>> i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
>>>> level-2
>>>> ia - IS-IS inter area, * - candidate default, U - per-user static
>>>> route
>>>> o - ODR, P - periodic downloaded static route
>>>>
>>>> Gateway of last resort is not set
>>>>
>>>> 2.0.0.0/24 is subnetted, 1 subnets
>>>> O 2.2.0.0 [110/65] via 20.1.1.2, 00:00:09, Serial0/1
>>>> 100.0.0.0/24 is subnetted, 4 subnets
>>>> C 100.100.0.0 is directly connected, Loopback0
>>>> C 100.100.1.0 is directly connected, Loopback1
>>>> C 100.100.2.0 is directly connected, Loopback2
>>>> C 100.100.3.0 is directly connected, Loopback3
>>>> 20.0.0.0/30 is subnetted, 1 subnets
>>>> C 20.1.1.0 is directly connected, Serial0/1
>>>> 10.0.0.0/30 is subnetted, 1 subnets
>>>> C 10.1.1.0 is directly connected, Serial0/0
>>>> 12.0.0.0/30 is subnetted, 1 subnets
>>>> O 12.1.1.0 [90/128] via 20.1.1.2, 00:00:09, Serial0/1
>>>>
>>>> After R0 -- R1 FULL state
>>>> R0#sir
>>>> Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
>>>> D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
>>>> N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
>>>> E1 - OSPF external type 1, E2 - OSPF external type 2
>>>> i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
>>>> level-2
>>>> ia - IS-IS inter area, * - candidate default, U - per-user static
>>>> route
>>>> o - ODR, P - periodic downloaded static route
>>>>
>>>> Gateway of last resort is not set
>>>>
>>>> 1.0.0.0/24 is subnetted, 1 subnets
>>>> O 1.1.0.0 [110/65] via 10.1.1.2, 00:00:01, Serial0/0
>>>> 2.0.0.0/24 is subnetted, 1 subnets
>>>> O 2.2.0.0 [110/65] via 20.1.1.2, 00:00:01, Serial0/1
>>>> 100.0.0.0/24 is subnetted, 4 subnets
>>>> C 100.100.0.0 is directly connected, Loopback0
>>>> C 100.100.1.0 is directly connected, Loopback1
>>>> C 100.100.2.0 is directly connected, Loopback2
>>>> C 100.100.3.0 is directly connected, Loopback3
>>>> 20.0.0.0/30 is subnetted, 1 subnets
>>>> C 20.1.1.0 is directly connected, Serial0/1
>>>> 10.0.0.0/30 is subnetted, 1 subnets
>>>> C 10.1.1.0 is directly connected, Serial0/0
>>>> 12.0.0.0/30 is subnetted, 1 subnets
>>>> O 12.1.1.0 [110/128] via 20.1.1.2, 00:00:02, Serial0/1
>>>> [110/128] via 10.1.1.2, 00:00:02, Serial0/0
>>>>
>>>>
>>>> I haven't beeen able to reason why this happens..? but it happens.! and
>>>> "Say
>>>> you have 2 paths to a destination network, then the A.D of the route thru
>>>> the Nieghbour with the lowest Router-ID is applied to the other routes
>>>> thru
>>>> different nieghbors or paths" I have no idea why..!
>>>>
>>>> any ideas?
>>>>
>>>> when R
>>>> Thanking You
>>>>
>>>> Yours Sincerely
>>>>
>>>> Divin Mathew John
>>>> divinjohn_at_gmail.com
>>>> divin_at_dide3d.com
>>>> http://www.dide3d.com
>>>> +91 9945430983
>>>> +91 9846697191
>>>> +974 5008916
>>>> PGP PUBLIC KEY BLOCK @ http://www.dide3d.com/divin_Public_PGP_key.txt
>>>> Sent from Bangalore, KA, India
>>>>
>>>> On Fri, May 22, 2009 at 5:52 AM, Chris Breece <cbreece1_at_gmail.com> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Hey Divin,
>>>>>
>>>>> I ran into this same thing on Wednesday. I tried to use the distance
>>>>> command in the same fashion. I wanted to prefer some routes to go to one
>>>>> neighbor instead of another. I got the same results as you show below. If
>>>>> there was another available next-hop, it changed the AD for both paths.
>>>>>
>>>>> I ended up doing "distance 255 1.1.1.1 0.0.0.0 Named_ACL". This
>>>>> effectively
>>>>> deleted one of the routes out of my routing table. In that scenario, I
>>>>> lost
>>>>> my redundant route... but it seemed to fit the requirements.
>>>>>
>>>>> I don't know that its a bug, but I can confirm another human being saw
>>>>> the
>>>>> same issue you did :P
>>>>>
>>>>> Chris
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, May 21, 2009 at 4:13 PM, Divin Mathew John <divinjohn_at_gmail.com
>>>>>
>>>>>
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>
>>>>>> I have this problem. i am trying to change the A.D of a particular path
>>>>>> in
>>>>>> OSPF using distance command. My config is pasted below.
>>>>>> Topology
>>>>>>
>>>>>> R0
>>>>>> interface Loopback0
>>>>>> ip address 100.100.0.100 255.255.255.0
>>>>>> !
>>>>>> interface Loopback1
>>>>>> ip address 100.100.1.100 255.255.255.0
>>>>>> !
>>>>>> interface Loopback2
>>>>>> ip address 100.100.2.100 255.255.255.0
>>>>>> !
>>>>>> interface Loopback3
>>>>>> ip address 100.100.3.100 255.255.255.0
>>>>>> !
>>>>>> interface Serial0/0
>>>>>> ip address 10.1.1.1 255.255.255.252
>>>>>> serial restart-delay 0
>>>>>> !
>>>>>> interface Serial0/1
>>>>>> ip address 20.1.1.1 255.255.255.252
>>>>>> serial restart-delay 0
>>>>>> !
>>>>>>
>>>>>> router ospf 1
>>>>>> log-adjacency-changes
>>>>>> network 10.1.1.1 0.0.0.0 area 0
>>>>>> network 20.1.1.1 0.0.0.0 area 0
>>>>>> network 100.100.0.100 0.0.0.0 area 0
>>>>>> network 100.100.1.100 0.0.0.0 area 0
>>>>>> network 100.100.2.100 0.0.0.0 area 0
>>>>>> network 100.100.3.100 0.0.0.0 area 0
>>>>>> distance 90 12.1.1.1 0.0.0.0 SELECT_12.1.1.0_from_R1
>>>>>> !
>>>>>> ip access-list standard SELECT_12.1.1.0_from_R1
>>>>>> permit 12.1.1.0
>>>>>>
>>>>>> R0#show ip ospf neighbor
>>>>>>
>>>>>> Neighbor ID Pri State Dead Time Address
>>>>>> Interface
>>>>>> 20.1.1.2 0 FULL/ - 00:00:37 20.1.1.2
>>>>>> Serial0/1
>>>>>> 12.1.1.1 0 FULL/ - 00:00:33 10.1.1.2
>>>>>> Serial0/0
>>>>>>
>>>>>> R0#sir
>>>>>> Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
>>>>>> D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
>>>>>> N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
>>>>>> E1 - OSPF external type 1, E2 - OSPF external type 2
>>>>>> i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
>>>>>> level-2
>>>>>> ia - IS-IS inter area, * - candidate default, U - per-user static
>>>>>> route
>>>>>> o - ODR, P - periodic downloaded static route
>>>>>>
>>>>>> Gateway of last resort is not set
>>>>>>
>>>>>> 1.0.0.0/24 is subnetted, 1 subnets
>>>>>> O 1.1.0.0 [110/65] via 10.1.1.2, 00:01:35, Serial0/0
>>>>>> 2.0.0.0/32 is subnetted, 1 subnets
>>>>>> O 2.2.0.2 [110/65] via 20.1.1.2, 00:01:35, Serial0/1
>>>>>> 100.0.0.0/24 is subnetted, 4 subnets
>>>>>> C 100.100.0.0 is directly connected, Loopback0
>>>>>> C 100.100.1.0 is directly connected, Loopback1
>>>>>> C 100.100.2.0 is directly connected, Loopback2
>>>>>> C 100.100.3.0 is directly connected, Loopback3
>>>>>> 20.0.0.0/30 is subnetted, 1 subnets
>>>>>> C 20.1.1.0 is directly connected, Serial0/1
>>>>>> 10.0.0.0/30 is subnetted, 1 subnets
>>>>>> C 10.1.1.0 is directly connected, Serial0/0
>>>>>> * 12.0.0.0/30 is subnetted, 1 subnets
>>>>>> O 12.1.1.0 [90/128] via 20.1.1.2, 00:01:36, Serial0/1
>>>>>> [90/128] via 10.1.1.2, 00:01:36, Serial0/0*
>>>>>>
>>>>>> according to my distance command only the route from R1 should have
>>>>>> changed
>>>>>> its A.D. but here even though i specified the ROUTER-ID of the router
>>>>>> whose
>>>>>> path i need to change the A.D it doesn't change that... it changes the
>>>>>> A.D
>>>>>> of all paths to the destination..! is this a BUG?
>>>>>>
>>>>>>
>>>>>> Thanking You
>>>>>>
>>>>>> Yours Sincerely
>>>>>>
>>>>>> Divin Mathew John
>>>>>> divinjohn_at_gmail.com
>>>>>> divin_at_dide3d.com
>>>>>> http://www.dide3d.com
>>>>>> +91 9945430983
>>>>>> +91 9846697191
>>>>>> +974 5008916
>>>>>> PGP PUBLIC KEY BLOCK @ http://www.dide3d.com/divin_Public_PGP_key.txt
>>>>>> Sent from Bangalore, KA, India
>>>>>>
>>>>>>
>>>>>> Blogs and organic groups at http://www.ccie.net
>>>>>>
>>>>>> _______________________________________________________________________
>>>>>> Subscription information may be found at:
>>>>>> http://www.groupstudy.com/list/CCIELab.html
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>> Blogs and organic groups at http://www.ccie.net
>>>>
>>>> _______________________________________________________________________
>>>> Subscription information may be found at:
>>>> http://www.groupstudy.com/list/CCIELab.html
>>>>
>>>>
>>>>
>>> Blogs and organic groups at http://www.ccie.net
>>>
>>> _______________________________________________________________________
>>> Subscription information may be found at:
>>> http://www.groupstudy.com/list/CCIELab.html
>>>
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html

Blogs and organic groups at http://www.ccie.net
Received on Fri May 22 2009 - 09:13:07 ART

This archive was generated by hypermail 2.2.0 : Mon Jun 01 2009 - 07:04:43 ART