Command
Auto-Cost Reference-Bandwidth
Use
Changes how OSPF calculates its metric. By default, a FastEthernet and above will have a cost of 1, so a gigabit interface will be equal with a fastethernet. This is not ideal.
Syntax
Router(config-router)#auto-cost reference-bandwidth <bandwidth>
Example

In this example, we will configure OSPF to have a reference bandwidth of 10000 Mbs. This means that a 10 Gbps interface would have cost of 1.
R2(config)#router ospf 1 |
Notice that fa0/0 now has a cost of 101.
R2(config-if)#do show ip route ospf |