| As a CCNA / CCNP candidate you are expected to | | | | 100Mbps interface. |
| understand how to set and interpret the OSPF cost | | | | 100,000,000/1000,000,000 = 1 |
| function on your Cisco device | | | | The same would apply for higher speed interfaces |
| During your career as a Cisco network engineer you | | | | such as 10Gbps interfaces which would also be |
| will have to deal with setting and manipulating the | | | | interpreted by OSPF as having a cost of 1, since |
| OSPF costs on an interface. | | | | OSPF cannot define interface costs as an integer |
| OSPF uses a metric called "Cost" to calculate the | | | | part of a decimal number i.e. 0.5 or 0.125. |
| metric of path. The cost is a cumulative value which | | | | So that OSPF may be able to calculate the cost of |
| is an incremental metric. | | | | an interface based on the bandwidth of the interface |
| The cost is as a default based on the bandwidth of | | | | with great accuracy we will need to change the value |
| the interface. The Higher the interface bandwidth the | | | | of the auto-cost reference-bandwidth value from |
| lower the cost that is associated to that interface, to | | | | 100,000,000 to a greater value. |
| see the cost that is assigned to any given interface | | | | To change the ACFB use the following |
| which is participating in OSPF issue the following | | | | commands:router(config)#router ospf 1 |
| command: | | | | R2_4(config-router)#auto-cost reference-bandwidth |
| Router# show ip ospf interface | | | | 10000 |
| The output of this command will show the current | | | | % OSPF: Reference bandwidth is changed. |
| cost given to this interface. The costs of the | | | | Please ensure reference bandwidth is consistent |
| interface is calculated by taking the bandwidth of the | | | | across all routers. |
| interface and dividing this number by a value known | | | | |
| as the "auto-cost reference-bandwidth". This | | | | The auto-cost reference-bandwidth now has a value |
| auto-cost reference-bandwidth is an integer used to | | | | of 10000,000,000 (The value is set in Mbps), |
| calculate a standard metric across OSPF and is set to | | | | therefore now the OSPF process will view the |
| 100,000,000. The cost is calculated as follows: | | | | 100Mbps interface as having a cost of 100, 1Gbps |
| 100,000,000/BW | | | | having a Cost of 10 and 10Gbps a cost of 1, another |
| If the interface bandwidth is 10Mbps, then the | | | | point worth mentioning is that the router will prompt |
| resulting cost would be 10: | | | | you to make sure that the auto-cost |
| 100,000,000/10,000,000 = 10 | | | | reference-bandwidth value is set consistently across |
| If the interface bandwidth is 100Mbps, then the | | | | all your routers. |
| resulting cost would be 1: | | | | Note: The cost given to a path is added to the |
| 100,000,000/100,000,000 = 1 | | | | metric only when the route is received inbound on an |
| The next example reveals some deficiencies with the | | | | interface, not outbound, therefore should you wish |
| auto-cost reference-bandwidth set at 100,000,000. If | | | | to alter the cost of the path you must do this on |
| we had a 1Gbp interface it's cost will be calculated by | | | | the inbound interface. |
| OSPF to be the exact same number as that for the | | | | |