R2 --[area1]-- R5 --[area0]-- R6
R2 is advertising 4 loopbacks into area 1, each with different costs:
R2#show run | section interface
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Loopback1
ip address 2.2.2.3 255.255.255.255
ip ospf cost 100
interface Loopback2
ip address 2.2.2.4 255.255.255.255
ip ospf cost 200
interface Loopback3
ip address 2.2.2.5 255.255.255.255
ip ospf cost 300
R2#show run | section router ospf
router ospf 1
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 25
network 172.12.25.0 0.0.0.255 area 25
Router 6 has the following entries in the route table:
R6#show ip route | section 2.0.0.0
2.0.0.0/32 is subnetted, 4 subnets
O IA 2.2.2.2 [110/129] via 172.12.45.5, 01:17:58, Serial1/1
O IA 2.2.2.3 [110/228] via 172.12.45.5, 00:04:18, Serial1/1
O IA 2.2.2.4 [110/328] via 172.12.45.5, 00:04:35, Serial1/1
O IA 2.2.2.5 [110/428] via 172.12.45.5, 00:04:45, Serial1/1
R6#
Now if I want to summarize these routes into 2.2.2.0/24, what would the cost of the summary route be?
On router 5:
R5(config)#router ospf 1
R5(config-router)#area 25 range 2.2.2.0 255.255.255.0
R5(config-router)#
On router 6:
R6#show ip route | section 2.0.0.0
2.0.0.0/24 is subnetted, 1 subnets
O IA 2.2.2.0 [110/129] via 172.12.45.5, 00:00:02, Serial1/1
The summary route takes the lowest cost of the specific routes, in this case the cost 129 of route to 2.2.2.2
Ah but wait!
This behavior was changed in RFC 2328. In RFC 2328, the cost of the summary route should be the cost of the component route with the highest metric. To change this behavior in IOS, enter the following command (on R5 in this example):
R5(config-router)#no compatible rfc1583
Now check R6:
R6#show ip route | section 2.0.0.0
2.0.0.0/24 is subnetted, 1 subnets
O IA 2.2.2.0 [110/428] via 172.12.45.5, 00:01:42, Serial1/1
The cost is 428 which was the cost of the route to 2.2.2.5.
Friday, May 30, 2008
Subscribe to:
Post Comments (Atom)
More about this command and others can be found in the OSPF Design Guide from Cisco:
ReplyDeletehttp://www.cisco.com/warp/public/104/1.html
Thanks for posting that - that caused some confusion for me after reading rfc and looking at my lab set up.
ReplyDelete