Friday 13 April 2012

OSPF Cost metric


OSPF uses the cost  metric to evaluate the quality of each link.
Route cost is a metric calculated based on the bandwidth of each link. Cisco
routers calculate the cost by dividing a default bandwidth of 100 Mbps (100
million bits per second) by the actual bandwidth of the link.
For example, the following list illustrates the default OSPF cost calculated by
Cisco routers for various bandwidths:
 ✦ 64-Kbps (64,536-bits-per-second) link: 100,000,000 / 64,536 = 1,562
 ✦ 1.544-Mbps (T1) link: 100,000,000 / 1,544,000 = 64
 ✦ 10-Mbps link: 100,000,000 / 10,000,000 = 10
 ✦ 100-Mbps link: 100,000,000 / 100,000,000 = 1
 ✦ 1-Gbps link: 100,000,000 / 1,000,000,000 = 0.1
 ✦ 10-Gbps link: 100,000,000 / 10,000,000,000 = 0.01
OSPF chooses the route with the lowest cost. You can modify the default
reference bandwidth used to calculate the OSPF cost using the  auto-cost
reference-bandwidth Cisco IOS command in global configuration mode.
It is very important to set the same reference bandwidth on all routers in
your network.
For example, if most links in your network are 1 Gbps, you set the reference
bandwidth to 1 Gbps instead of 100 Mbps using the following commands:
RT6751>enable (or en)
RT6751#configure terminal (or config t)
RT6751(config)#auto-cost reference-bandwidth 1000000000
RT6751(config)#exit
RT6751#disable
RT6751>

No comments:

Post a Comment