I can't get the "distance <distance> <router-id> <acl>" to work

From: Eric Poulin (epoulins@yahoo.com)
Date: Tue Jun 19 2007 - 17:35:09 ART


Hi GS,

I don't understand what's going on, but I just can't get the "distance <distance>
<router-id> <acl>" to work in OSPF with multiple equal cost routes. Here's the output of
the routing table without any distance manipulation:

Rack1R5#show ip route ospf
     139.1.0.0/16 is variably subnetted, 14 subnets, 2 masks
O IA 139.1.11.0/24 [110/65] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.13.0/24 [110/128] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.2.0/24 [110/65] via 139.1.25.2, 00:11:27, Serial0/0.25
O IA 139.1.0.0/24 [110/138] via 139.1.25.2, 00:11:27, Serial0/0.25
                     [110/138] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.6.0/24 [110/139] via 139.1.25.2, 00:11:27, Serial0/0.25
                     [110/139] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.7.0/24 [110/139] via 139.1.25.2, 00:11:27, Serial0/0.25
                     [110/139] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.23.0/24 [110/128] via 139.1.25.2, 00:11:27, Serial0/0.25

As you can see, I have a single route to network 11, 13 and 2 and two equal-cost routes
to network 0, 6, 7 and 23. Routes are learned either via 139.1.15.1 (RID 150.1.1.1) or
139.1.25.2 (RID 150.1.2.2). Under the OSPF process, if I manipulate the distance of
network 11, 13 or 2 which I only have a single route, everything works fine and I can
change distance to whatever I want. Here's an example:

router ospf 1
 distance 109 150.1.1.1 0.0.0.0 VLAN13

ip access-list standard VLAN13
 permit 139.1.13.0

Rack1R5#show ip route ospf
     139.1.0.0/16 is variably subnetted, 14 subnets, 2 masks
O IA 139.1.11.0/24 [110/65] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.13.0/24 [109/128] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.2.0/24 [110/65] via 139.1.25.2, 00:11:27, Serial0/0.25
O IA 139.1.0.0/24 [110/138] via 139.1.25.2, 00:11:27, Serial0/0.25
                     [110/138] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.6.0/24 [110/139] via 139.1.25.2, 00:11:27, Serial0/0.25
                     [110/139] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.7.0/24 [110/139] via 139.1.25.2, 00:11:27, Serial0/0.25
                     [110/139] via 139.1.15.1, 00:11:27, Serial0/0.15
O IA 139.1.23.0/24 [110/128] via 139.1.25.2, 00:11:27, Serial0/0.25

Now here's the bug, if I try changing the distance of any equal-cost routes, it does not
work. Here's an example:

router ospf 1
 distance 109 150.1.1.1 0.0.0.0 VIA_R1

ip access-list standard VIA_R1
 permit 139.1.6.0
 permit 139.1.7.0

Rack1R5#show ip route ospf
     139.1.0.0/16 is variably subnetted, 14 subnets, 2 masks
O IA 139.1.11.0/24 [110/65] via 139.1.15.1, 00:00:11, Serial0/0.15
O IA 139.1.13.0/24 [110/128] via 139.1.15.1, 00:00:11, Serial0/0.15
O IA 139.1.2.0/24 [110/65] via 139.1.25.2, 00:00:11, Serial0/0.25
O IA 139.1.0.0/24 [110/138] via 139.1.25.2, 00:00:11, Serial0/0.25
                     [110/138] via 139.1.15.1, 00:00:11, Serial0/0.15
O IA 139.1.6.0/24 [110/139] via 139.1.25.2, 00:00:11, Serial0/0.25
                     [110/139] via 139.1.15.1, 00:00:11, Serial0/0.15
O IA 139.1.7.0/24 [110/139] via 139.1.25.2, 00:00:11, Serial0/0.25
                     [110/139] via 139.1.15.1, 00:00:11, Serial0/0.15
O IA 139.1.23.0/24 [110/128] via 139.1.25.2, 00:00:11, Serial0/0.25

After seeing that, I decided to eliminate the access-list and see what happens when I
change the distance for all routes learned from 150.1.1.1:

router ospf 1
 distance 109 150.1.1.1 0.0.0.0

Rack1R5#show ip route ospf
     139.1.0.0/16 is variably subnetted, 14 subnets, 2 masks
O IA 139.1.11.0/24 [109/65] via 139.1.15.1, 00:05:06, Serial0/0.15
O IA 139.1.13.0/24 [109/128] via 139.1.15.1, 00:05:06, Serial0/0.15
O IA 139.1.2.0/24 [110/65] via 139.1.25.2, 00:05:06, Serial0/0.25
O IA 139.1.0.0/24 [110/138] via 139.1.25.2, 00:05:06, Serial0/0.25
                     [110/138] via 139.1.15.1, 00:05:06, Serial0/0.15
O IA 139.1.6.0/24 [110/139] via 139.1.25.2, 00:05:06, Serial0/0.25
                     [110/139] via 139.1.15.1, 00:05:06, Serial0/0.15
O IA 139.1.7.0/24 [110/139] via 139.1.25.2, 00:05:06, Serial0/0.25
                     [110/139] via 139.1.15.1, 00:05:06, Serial0/0.15
O IA 139.1.23.0/24 [110/128] via 139.1.25.2, 00:05:06, Serial0/0.25

None of the equal-cost routes changed, only the single route. This is a very strange
behavior, and I don't understand why. Can anyone explain me why this is occuring?

Thanks for your input,
Eric

       



This archive was generated by hypermail 2.1.4 : Sun Jul 01 2007 - 17:24:50 ART