Hi all,
 
I think I posted about some of this before, but I think is an interesting 
"feature" and I'd love to have your opinion on it. 
The task is to change the admin distance of ospf prefixes for a specific ospf 
neighbor.
According to cisco doc 
http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_ospf/command/ospf-a1.html#GUID-C4090D42-B8FD-40F5-8DDA-AE2FEAB3ADD0
 this is simply done by using:
distance weight [ip-address wildcard-mask [access-list name]] 
only to discover that it doesn't work. Doing a bit of search on the internet I 
have found this thread on the leraningcisco site talking about a  possible bug 
CSCeh46993 
https://learningnetwork.cisco.com/thread/8963
 
I run some test and the command behaves differently to its definition on the 
doc, below are my findings, I would love for someone to give me some feedback 
on this. Thanks.
 
R2#sh run | sec ospf
router ospf 1
 router-id 136.10.2.2
 log-adjacency-changes
 passive-interface Loopback0
 network 136.10.2.2 0.0.0.0 area 0
 network 136.10.24.2 0.0.0.0 area 0
 network 136.10.25.1 0.0.0.0 area 0
 network 136.10.100.2 0.0.0.0 area 0
 neighbor 136.10.100.6 cost 56
 neighbor 136.10.100.5 cost 56
R2#sh ip ospf neigh
Neighbor ID     Pri   State           Dead Time   Address         Interface
136.10.4.4        0   FULL/  -        00:00:31    136.10.24.4     Serial1/1.24
136.10.5.5        0   FULL/  -        00:00:35    136.10.25.2     Serial1/2
136.10.6.6        0   FULL/  -        00:01:57    136.10.100.6    Serial1/1.256
136.10.5.5        0   FULL/  -        00:01:39    136.10.100.5    Serial1/1.256
R2#sh ip ospf int bri
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               136.10.2.2/24      1     LOOP  0/0
Se1/1.24     1     0               136.10.24.2/29     64    P2P   1/1
Se1/2        1     0               136.10.25.1/30     64    P2P   1/1
Se1/1.256    1     0               136.10.100.2/27    64    P2MP  2/2
R2#sh ip route ospf
     136.10.0.0/16 is variably subnetted, 15 subnets, 6 masks
O       136.10.6.6/32 [110/57] via 136.10.100.6, 00:10:19, Serial1/1.256
O       136.10.5.5/32 [110/57] via 136.10.100.5, 00:10:19, Serial1/1.256
O       136.10.4.4/32 [110/65] via 136.10.24.4, 00:10:19, Serial1/1.24
R2#
Let's say I want to change the admin distance for routes received from 
136.10.100.6, acccording to documentation I would do
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#distance 109 136.10.100.6 0.0.0.0
Let's have a look:
R2(config-router)#do sh ip route ospf
     136.10.0.0/16 is variably subnetted, 15 subnets, 6 masks
O       136.10.6.6/32 [110/57] via 136.10.100.6, 00:00:36, Serial1/1.256
O       136.10.5.5/32 [110/57] via 136.10.100.5, 00:00:36, Serial1/1.256
O       136.10.4.4/32 [110/65] via 136.10.24.4, 00:00:36, Serial1/1.24

nothing, admin distance is still 110
Look what happens now:
R2(config-router)#no distance 109 136.10.100.6 0.0.0.0
R2(config-router)#distance 109 136.10.100.6 255.255.255.0
R2(config-router)#do sh ip route ospf
     136.10.0.0/16 is variably subnetted, 15 subnets, 6 masks
O       136.10.6.6/32 [109/57] via 136.10.100.6, 00:00:35, Serial1/1.256
O       136.10.5.5/32 [110/57] via 136.10.100.5, 00:00:35, Serial1/1.256
O       136.10.4.4/32 [110/65] via 136.10.24.4, 00:00:35, Serial1/1.24

Weird, the admin distance has changed for 136.10.100.6,let's carry on, let's 
see where it breaks
R2(config-router)#no distance 109 136.10.100.6 255.255.255.0
R2(config-router)#distance 109 136.10.100.6 255.255.254.0
R2(config-router)#do sh ip route ospf
     136.10.0.0/16 is variably subnetted, 15 subnets, 6 masks
O       136.10.6.6/32 [109/57] via 136.10.100.6, 00:00:02, Serial1/1.256
O       136.10.5.5/32 [110/57] via 136.10.100.5, 00:00:02, Serial1/1.256
O       136.10.4.4/32 [110/65] via 136.10.24.4, 00:00:02, Serial1/1.24

It works if the wild card mask is 255.255.254.0, let's try the third octect .252
R2(config-router)#no distance 109 136.10.100.6 255.255.254.0
R2(config-router)#distance 109 136.10.100.6 255.255.252.0

R2(config-router)#do sh ip route ospf
     136.10.0.0/16 is variably subnetted, 15 subnets, 6 masks
O       136.10.6.6/32 [110/57] via 136.10.100.6, 00:00:03, Serial1/1.256
O       136.10.5.5/32 [110/57] via 136.10.100.5, 00:00:03, Serial1/1.256
O       136.10.4.4/32 [110/65] via 136.10.24.4, 00:00:03, Serial1/1.24

It doesn't. Don't ask, I have no idea why it does that, hope you can help
Fulvio                                    
_______________________________________________
For more information regarding industry leading CCIE Lab training, please visit 
www.ipexpert.com

Are you a CCNP or CCIE and looking for a job? Check out 
www.PlatinumPlacement.com

http://onlinestudylist.com/mailman/listinfo/ccie_rs

Reply via email to