OSPF Reference Bandwidth

OSPF uses a simple formula to calculate the OSPF cost for an interface with this formula:

cost = reference bandwidth / interface bandwidth

The reference bandwidth is a value in Mbps that we can set ourselves. By default this is 100Mbps on Cisco IOS routers. The interface bandwidth is something we can lookup.

Let’s take a look at an example of how this works. I’ll use this router:

Cisco Router FastEthernet Serial Interface

The router above has two interfaces, a FastEthernet and a serial interface:

R1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0       YES manual up                    up      
Serial0/0             YES manual up                    up

Let’s enable OSPF on these interfaces:

R1(config)#router ospf 1
R1(config-router)#network area 0
R1(config-router)#network area 0

After enabling OSPF we can check what the reference bandwidth is:

Router#show ip ospf | include Reference
 Reference bandwidth unit is 100 mbps

By default this is 100 Mbps. Let’s see what cost values OSPF has calculated for our two interfaces:

Router#show interfaces FastEthernet 0/0 | include BW
  MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec
Router#show ip ospf interface FastEthernet 0/0 | include Cost
  Process ID 1, Router ID, Network Type BROADCAST, Cost: 1

The FastEthernet interface has a bandwidth of 100.000 kbps (100 Mbps) and the OSPF cost is 1. The formula to calculate the cost looks like this:

100.000 kbps reference bandwidth / 100.000 interface bandwidth = 1

What about the serial interface? Let’s find out:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 739 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

536 Sign Ups in the last 30 days

100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Forum Replies

  1. “It now has a cost of 1 which means that a Gigabit interface would end up with a cost of 1.”

    Did you mean 10? :wink:

  2. I have only seen auto-cost reference-bandwidth for OSPF (both in IOS 12 and 15). There is a reference-bandwidth command, but it is in the NX-OS and unrelated to OSPF.

  3. 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

    ... Continue reading in our forum

  4. 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

    ... Continue reading in our forum

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

21 more replies! Ask a question or join the discussion by visiting our Community Forum