Using distance command in OSPF

From: allboutcisco (frenzeus@streamyx.com)
Date: Sun Apr 30 2006 - 04:11:32 GMT-3


Hi Group,

I was working through one of the labs of IEWBv3, came through this task (TASK4.7) which I believe required the use of the distance command to be able to manipulate some of the destinations to be preffered via R1 over R2, since the task prohibits the use of ip ospf cost, bandwidth etc. R5 is hub with R1 & R2 as spokes connected to it. The hub-spoke is in ospf Area 1. R1 & R2 is ABR which is also connected to Area 0. R5 is supposed to prefer R1 over R2 to some destinations in Area 0 located behind R1 & R2. The destination networks are: 139.1.11.0/24, 139.1.2.0/24, 139.1.0.0/24, 139.1.6.0/24 & 139.1.7.0/24.

I couldn't get it working though. And upon checking with the solution guide, it seems that it is also using the same distance method. Below is the output & appreciate if someone could point my mistakes out:

Rack1R5(config-router)#do sh ip os int | in Area
  Internet Address 139.1.25.5/24, Area 1
  Internet Address 139.1.15.5/24, Area 1
Rack1R5(config-router)#do sh ip os nei

Neighbor ID Pri State Dead Time Address Interface
150.1.2.2 0 FULL/ - 00:00:37 139.1.25.2 Serial0/0.502
150.1.1.1 0 FULL/ - 00:00:30 139.1.15.1 Serial0/0.501
Rack1R5(config-router)#
Rack1R5(config-router)#do sh ip ro os
     139.1.0.0/24 is subnetted, 13 subnets
O IA 139.1.11.0 [110/65] via 139.1.15.1, 00:00:02, Serial0/0.501
O IA 139.1.2.0 [110/65] via 139.1.25.2, 00:00:02, Serial0/0.502
O IA 139.1.0.0 [110/129] via 139.1.25.2, 00:00:02, Serial0/0.502
                  [110/129] via 139.1.15.1, 00:00:02, Serial0/0.501
O IA 139.1.6.0 [110/130] via 139.1.25.2, 00:00:02, Serial0/0.502
                  [110/130] via 139.1.15.1, 00:00:02, Serial0/0.501
O IA 139.1.7.0 [110/130] via 139.1.25.2, 00:00:02, Serial0/0.502
                  [110/130] via 139.1.15.1, 00:00:02, Serial0/0.501
Rack1R5(config-router)#do sh access-lis
Standard IP access list PREFER_R1
    10 permit 139.1.11.0, wildcard bits 0.0.0.255 (6 matches)
    20 permit 139.1.2.0, wildcard bits 0.0.0.255 (9 matches)
    30 permit 139.1.6.0, wildcard bits 0.0.0.255 (9 matches)
    40 permit 139.1.7.0, wildcard bits 0.0.0.255 (9 matches)
    50 permit 139.1.0.0, wildcard bits 0.0.0.255 (9 matches)
Rack1R5(config-router)#distan 109 150.1.1.1 0.0.0.0 PREFER_R1
Rack1R5(config-router)#do sh ip ro os
     139.1.0.0/24 is subnetted, 13 subnets
O IA 139.1.11.0 [109/65] via 139.1.15.1, 00:00:04, Serial0/0.501
O IA 139.1.2.0 [110/65] via 139.1.25.2, 00:00:04, Serial0/0.502
O IA 139.1.0.0 [110/129] via 139.1.25.2, 00:00:04, Serial0/0.502
                  [110/129] via 139.1.15.1, 00:00:04, Serial0/0.501
O IA 139.1.6.0 [110/130] via 139.1.25.2, 00:00:04, Serial0/0.502
                  [110/130] via 139.1.15.1, 00:00:04, Serial0/0.501
O IA 139.1.7.0 [110/130] via 139.1.25.2, 00:00:04, Serial0/0.502
                  [110/130] via 139.1.15.1, 00:00:04, Serial0/0.501
Rack1R5(config-router)#

Appreciate really if someone could point me out if using the distance method in this scenario is possible. Since i've been frequently using the distance method and have never came across any issues like this. I apologize for the lengthy output.

Thanks.

-K



This archive was generated by hypermail 2.1.4 : Mon May 01 2006 - 11:41:59 GMT-3