Re: OSPF Distance Command .!

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

Hi Divin Mathew John,

I am not getting confused with Type 7 conversion, though I have not
tested this fully and so perhaps my description is not complete. The
following example has two E2 routers advertised by R1 and R2. R0, R1
and R2 are in the same area. Both routes are received by R0, only one
is used. Whether you use E1 or E2 makes no difference, only one is
installed when the neighbors form (the route via R2). Lab uses
dynamips, 7200s with 12.2(25)S15.

       R3
      / \
    R1 R2
     \ /
       R0

R3 does not run any routing protocols, but has Lo0: 3.3.3.3 for testing.
R1 and R2 both have static routes to R3's loopback.
R0, R1 and R2 run OSPF between each other.

Shutdown all interfaces and cleared OSPF process. Then no shut interfaces.
When it reestablishes, R0 shows:

R0(config-router)#do sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:38 192.168.20.2 Serial1/1
1.1.1.1 0 FULL/ - 00:00:33 192.168.10.1 Serial1/0
R0(config-router)#

            OSPF Router with ID (10.10.10.10) (Process ID 1)

        Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 496
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 3.3.3.0 (External Network Number )
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xFCAE
  Length: 36
  Network Mask: /24
    Metric Type: 2 (Larger than any link state path)
    TOS: 0
    Metric: 20
    Forward Address: 192.168.123.3
    External Route Tag: 0

  Routing Bit Set on this LSA
  LS age: 483
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 3.3.3.0 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x3F50
  Length: 36
  Network Mask: /24
    Metric Type: 2 (Larger than any link state path)
    TOS: 0
    Metric: 20
    Forward Address: 0.0.0.0
    External Route Tag: 0

R0(config-router)#

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.123.0/24 [110/65] via 192.168.10.1, 00:05: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:05: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:05:58, Serial1/1
     3.0.0.0/24 is subnetted, 1 subnets
O E2 3.3.3.0 [110/20] via 192.168.20.2, 00:05: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-router)#

Both LSAs exist in the database, but only one is installed. If you
throw different ospf areas into the mix, the behaviour changes again;
forwarding addresses also muddy the waters. Like I said, external route
selection is very different to that of internal routes.

Paul.

Divin Mathew John wrote:
> @Paul
> I think you getting confused with the NSSA Type 7 to Type 5 Conversion at
> the ABR. in that case if you have more than one ABR then the Type 7 to type
> 5 conversion is done by the ABR having the highest router-id.
> 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 7:05 PM, Paul Cosgrove <paul.cosgrove_at_gmail.com>wrote:
>
>
>> Hi Chris,
>>
>> Would be interested to see your scenario and ios version. External route
>> calculation is quite different to that of intra area routes. I can't think
>> how you would see the same thing if you have a similar topology (three
>> routers) and are changing the distance of a router in a similar position
>> (instead of matching against a third router reach via the p2m subnet). The
>> forwarding address should not be set on a p2m, and each router will have /32
>> for its neighbors. If I remember correctly (which I might not) you should
>> only have a single external LSA in that case, the one learned from the
>> router with the highest RID (assuming costs to the ASBR are equal).
>>
>> If the forwarding address were set you could certainly see something
>> similar, as you may have multiple paths to an address which is directly
>> connected to either spoke. Without that set I would have thought you would
>> only have one path, unless your topology involved more devices. Will have
>> to try it out, and then figure out what I've missed..... :-)
>>
>> Paul.
>>
>>
>>
>>
>> Chris Breece wrote:
>>
>>
>>> Hey Paul,
>>>
>>> The scenario I saw these results was a point-to-multipoint frame
>>> network....
>>> no DR involved. The router was the hub and the two spokes were advertising
>>> an external E1 to the hub. The distance command using the router ID of one
>>> of the spokes, changed the AD for the route to both of the spokes.
>>>
>>> Chris
>>>
>>>
>>>
>>>
>>> On Fri, May 22, 2009 at 2:04 AM, Paul Cosgrove <paul.cosgrove_at_gmail.com
>>>
>>>> wrote:
>>>>
>>>
>>>
>>>> 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 - 16:11:19 ART

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