OSPF Reference Bandwidth

well explained

HI Rene,

Do you have to set the reference bandwidth on both sides of a link? Is there a way of distributing a reference bandwidth throughout an OSPF area?

Hi Max,

There is no way to synchronize the reference bandwidth so you’ll have to configure it yourself.

It’s not mandatory to use the same metric on both sides, you could use different metrics if you want.

i am little bit confused in refrence bandwidth
1> if i have gigabyte link in my side router and other side router also has a gigabyte link from which they are connected so i will set reference bandwidth to 1000mbps on both side router its compulsory
2> if i have gigabyte link in my side router and other side router has a fastethernet link from which they are connected so in this topology what we will do we will change the reference bandwidth on fastethernet router or not
(((Cisco IOS will warn you that you should do this on all OSPF routers ))) what about this line means

Hello Harshit

Fundamentally, reference bandwidth should always be the same on all routers taking part in OSPF. Now if you choose to use 1000 Mbps as the reference bandwidth or 10000Mbps, or even 100 Mbps, it doesn’t make a difference what the speeds on your interfaces are, as long as all routers are choosing costs based on the same reference bandwidth.

Now in the case where you have a GigabitEthernet interface connected to a FastEthernet interface, it shouldn’t make a difference. This is because if these two interfaces were connected, the GigabitEthernet link would revert to to 100Mbps, and the reference bandwidth used would refer to that speed rather than the GigabitEthernet speed. So even if you use 100Mbps or 1000Mbps for the reference bandwidth, the result would still be good.

Rule of thumb: always have the same reference bandwidth on all OSPF routers.

I hope this has been helpful!


1 Like

OSPF Unit 1: Chapter: Introduction to OSPF | Reference Bandwidth & Interface Bandwidth

I went through your video & Notes, i tried much, But I am not understanding,

  1. What is Reference Bandwidth & Interface Bandwidth in OSPF?

let me tell you, correct me please if i am wrong.

As per my understanding:

Interface Bandwidth Means: Device/ Router Physical Interface Bandwidth. Isn’t it?
Ex: 1000Mb: Gig0/0, 100Mb: Fa0/0, 10Mb: Eth0/0. Am i rite?

Reference Bandwidth Means: It is the Link Bandwidth. Isn’t it?
Ex: Internet Link: 50Mbps, MPLS Link: 10Mbps, P2P Link:2Mbps, Leased Line: 40Mbps. Am i rite?

I dint understand the below sentence in the OSPF Chapter, Unit 1: Chapter: Introdcution to OSPF

The reference bandwidth is a default value on Cisco routers which is a 100Mbit interface. You divide the reference bandwidth by the bandwidth of the interface and you’ll get the cost.

Acc to you: what is reference bandwidth is a default value on Cisco routers?

Hope you would help me soon.


Hello Sanjaykumar

There are several definitions involved here. These are the following:

Physical interface bandwidth is the bandwidth that the actual interface is capable of. For Ethernet this is typically 10, 100, 1000 Mbps, or 10 Gbps. This of course can be adjusted using the speed command in the interface configuration mode to one of these compatible speeds. Note here that the actual physical bandwidth does not get involved at all with the configuration of reference and interface bandwidth for OSPF.

Interface bandwidth is a configurable value that is attached to an interface. If you do a show interface command, you will see it like so:

Router#show inter gig 0/0
GigabitEthernet0/0 is administratively down, line protocol is down (disabled)
  Hardware is CN Gigabit Ethernet, address is 0060.478b.9501 (bia 0060.478b.9501)
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)

!<-- output omitted -->

In the above output you can see the value of interface bandwidth in the fourth line after the characters BW. For the above interface, the default value of BW is 1000000 Kbps which is 1 Gbps, which is the physical speed of the interface.

Now, interface bandwidth is configurable. You can change it on each interface using the bandwidth command. By changing the bandwidth, you do not change the actual bandwidth of the physical interface! But, it is a value that can be configured to be used by dynamic routing protocols, such as OSPF, to calculate metrics. So you can adjust the interface bandwidth of each particular interface to affect the metric assigned by OSPF, and thus affect the routing decisions being made.

Now the reference bandwidth is a global value per OSPF instance that is used in the overall calculation of the metric. By default, the reference bandwidth is 100 Mbps. This means that when the metric is calculated, we do the following:

reference bandwidth / interface bandwidth

So if we have an interface configured with an interface bandwidth of 100Mbps, with a default reference bandwidth of 100Mbps then we would have a cost of:

100 Mbps / 100Mbps = 1

The problem with this is that if we have an interface with a reference bandwidth of 1000 Mbps, the calculation would be:

100 Mbps / 1000 Mbps = 0.1

But because metric can only have integer values, this would be rounded up to 1.

So a GigabitEthernet interface and a FastEthernet interface, with their default interface bandwidths, would be considered to have the same cost in OSPF.

So why do we use such a small reference bandwidth? Because OSFP was developed many years ago, when 100Mbps was the fastest Ethernet available at the time.

To solve this problem, we can either go to all the interfaces on our routers and reduce the interface bandwidth values (remember this does not change the actual speeds, but only changes the evaluation of the metric by routing protocols) or we can simply change the single reference bandwidth that will allow the metric calculations to take larger speeds into account, such as 1 Gbps, 10 Gbps, 40 Gbps and beyond.

I hope this has been helpful!


Hi, I was looking at my OSPF setting on Cisco ASA. I don’t understand why would the interface cost is 10 instead of 1?

Hello Helen

According to most Cisco references, it’s not possible to change the reference bandwidth unit on the Cisco ASA at least as of version 9.8. But you can change the cost on an interface manually using the ospf cost XXX command using the interface mode. More info on this can be found here:

Check to see if the cost has been manually configured on this interface.

I hope this has been helpful!


Hi Laz,

Thank you for the document. My question is the cost = reference BW/ Interface BW which in this case is 100/1000. Why the cost is 10 instead of 1?


Hello Helen

I went in and fired up a Cisco ASA and found that the OSPF cost on all interfaces is actually 10 regardless of the reference bandwidth or the interface speed. Looking at Cisco documentation, there is nothing very clear about why this behaviour takes place. It actually says that:

The ASA calculates the cost of an interface based on link bandwidth rather than the number of hops to the destination. The cost can be configured to specify preferred paths.

But this does not seem to be the case. I am using a Cisco ASA Software Version 9.9(2) and all costs are indeed 10.

Digging a little further, I have found from a Cisco Press publication the following:

The unitless OSPF cost for the interface becomes interface_cost (0 to 65535; the default is 10). The higher the interface bandwidth, the lower the cost value becomes. A firewall has a default cost of 10 for all interfaces, regardless of their speeds. This behavior is different from Cisco routers running Cisco IOS Software, where both Fast Ethernet and Gigabit Ethernet have a cost of 1.

Practically speaking, it seems that the Cisco publication is correct, at least for the versions of ASA that you and I are using, and not the documentation. Further, it seems strange that OSPF actually has a reference bandwidth configured and stated in the output of the show ospf command even though it is not used to calculate the OSPF cost for interfaces.

It’s just one of those strange things that Cisco engineers have designed into the ASA without actually having that functionality. It’s just another one of those peculiar differences between IOS and ASA.

I hope this has been helpful!


Thank you very much Laz. Wish you a good day!

1 Like

Hi ,

So when reference bandwidth is adjusted it will be applied to all the interface associated on the Router so accordingly calculation will be made , am i right ?


Hello Shaan

Yes, that is correct. Remember that the reference bandwidth only applies to the calculations made locally on the router. Other routers, when they calculate their own metrics to destinations, will use whatever reference bandwidth is configured locally. For this reason, it is important to verify that the same reference bandwidth is used on all OSPF routers in your topology.

I hope this has been helpful!


Thank You Lazaros


It would be great if you tell what is updated ?


Hello Sims

Do you mean you’d like to keep track of what lessons have been updated recently? If that is the case, let me know and I can inform Rene.


I mean It would be helpful , if you can tell what update or changes has been made and why

Hello Sims

I assume you mean updates or changes made to the content of the lessons themselves, correct? I’ll let Rene know of this suggestion. Thanks for your feedback, it’s always useful and helpful!


Hello @sims,

I agree, that would be useful. We did an attempt with this page:

This page is automatically updated but it also happens when we save a lesson after editing a single typo. A “changelog” that shows what and when something is edited would be convenient. I’ll add it to my list and give it some more thought.