Re: OSPF Distance Command .!

From: Paul Cosgrove <paul.cosgrove_at_gmail.com>
Date: Fri, 22 May 2009 16:29:54 +0100

Hi Sadiq,

I would have to recommend trying it again yourself, as it does work:

   R1 ----- R2
      \ /
       \ /
        \ /
         R0

All links are network type point to point.
Shutdown interfaces, cleared ospf process, no shut and waited for
neighbors to establish.

R0 then shows the following:

Gateway of last resort is not set

O 192.168.12.0/24 [110/128] via 192.168.20.2, 00:00:58, Serial1/1
                     [110/128] via 192.168.10.1, 00:00:58, Serial1/0
     1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 192.168.10.1, 00:00:58, Serial1/0
     2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 192.168.20.2, 00:00:58, Serial1/1
C 192.168.10.0/24 is directly connected, Serial1/0
C 192.168.20.0/24 is directly connected, Serial1/1
     10.0.0.0/32 is subnetted, 1 subnets
C 10.10.10.10 is directly connected, Loopback0

R0(config)#access-list 10 permit 192.168.12.0
R0(config)#router ospf 1
R0(config-router)#distance 90 1.1.1.1 0.0.0.0 10
R0(config-router)#do sh ip ro
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, E - EGP
       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

O 192.168.12.0/24 [90/128] via 192.168.10.1, 00:00:05, Serial1/0
     1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 192.168.10.1, 00:00:05, Serial1/0
     2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 192.168.20.2, 00:00:05, Serial1/1
C 192.168.10.0/24 is directly connected, Serial1/0
C 192.168.20.0/24 is directly connected, Serial1/1
     10.0.0.0/32 is subnetted, 1 subnets
C 10.10.10.10 is directly connected, Loopback0
R0(config-router)#

AD can and is often used to differentiate routes in the same protocol.
EIGRP externals and BGP internal routes being some obvious examples.

Paul.

Sadiq Yakasai wrote:
> Gents, a little search over GS archives would second Bryan's point! This
> issue hunted me down in my first attempt!
>
> While some have even gone to TAC, others have tried bugging it! But from the
> research I carried out a while ago, my conclusion is you are not to use AD
> to influence prefix selection WITHIN the same routing protocol - use metric
> instead! BETWEEN 2 or more routing protocols, use AD.
>
> Otherwise, you are in for a long, unreliable and incoherent exercise.
>
> Sadiq
>
> On Fri, May 22, 2009 at 3:23 PM, Bryan Bartik <bbartik_at_ipexpert.com> wrote:
>
>
>> Hello,
>>
>> Divin, I think you hit it right on :) I have labbed this several times
>> before and what I found was that you cannot use AD to prefer one ospf route
>> over another in the same ospf process (There may be crazy scenarios where
>> you can, but I don't recall finding any). Makes sense, since like you said
>> AD is to prefer one protocol over another. You could place the link to R1
>> in
>> another process on R0 and then change the distance in that process.
>>
>> Bryan Bartik
>> CCIE #23707 (R&S), CCNP
>> Sr. Support Engineer - IPexpert, Inc.
>> URL: http://www.IPexpert.com
>>
>>
>> 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 - 16:29:54 ART

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