Friday, December 9, 2011

OSPF - auto-cost reference-bandwidth

The default reference bandwidth for OSPF is 10^8 bps or 100Mbit. Increasing the reference-bandwidth allows a more granular OSPF design. If changed it should be changed on all routers in the OSPF domain.

The reason you would change the reference-bandwidth is that you may have link faster than 100M in your network. If you have Gigabit networks but are using the default reference-bandwidth, then Gigabit links are equal in cost to fast Ethernet. This example uses serial interfaces, but it will allow you to get an idea of what this command does. Here is our basic topology, with R1 and R2 connected via 1544K serial links. R1 ---area0--- R2 R1#show ip route | begin Gateway Gateway of last resort is not set 1.0.0.0/32 is subnetted, 2 subnets C 1.1.1.1 is directly connected, Loopback0 C 1.1.1.2 is directly connected, Loopback1 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/65] via 172.12.12.2, 00:08:50, Serial1/0 4.0.0.0/32 is subnetted, 1 subnets O IA 4.4.4.4 [110/129] via 172.12.12.2, 00:08:50, Serial1/0 172.12.0.0/24 is subnetted, 2 subnets C 172.12.12.0 is directly connected, Serial1/0 O IA 172.12.23.0 [110/128] via 172.12.12.2, 00:08:50, Serial1/0 R1#show ip ospf int s1/0 | inc Cost Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 64 Chaging the reference-bandwidth under the ospf process as follows: R1(config)#router ospf 1 R1(config-router)#auto-cost reference-bandwidth 1000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers. R1(config-router)#^Z The cost of the interface has changed from 64 to 647 R1#show ip ospf int s1/0 | inc Cost Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 647 Here are the calculations: 100000000/1544000 = 64 1000000000/1544000 = 647 All routes have through this interface have a higher metric now: R1#show ip route | begin Gateway Gateway of last resort is not set 1.0.0.0/32 is subnetted, 2 subnets C 1.1.1.1 is directly connected, Loopback0 C 1.1.1.2 is directly connected, Loopback1 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/648] via 172.12.12.2, 00:01:30, Serial1/0 4.0.0.0/32 is subnetted, 1 subnets O IA 4.4.4.4 [110/712] via 172.12.12.2, 00:01:30, Serial1/0 172.12.0.0/24 is subnetted, 2 subnets C 172.12.12.0 is directly connected, Serial1/0 O IA 172.12.23.0 [110/711] via 172.12.12.2, 00:01:30, Serial1/0

No comments:

Post a Comment