Showing results for 
Search instead for 
Did you mean: 

Ospf Configuration clarification


I have two routers with a firewall in a OSPF AS, the routers are primary/secondary and I want to understand the OSPF config.


The first router

router ospf 12
router-id X.X.X.X
log-adjacency-changes detail
auto-cost reference-bandwidth 1000
area 0 authentication message-digest
redistribute bgp XXXX subnets route-map BGP=>OSPF
network X.X.X.X subnet area 0
default-information originate


outer ospf 12
router-id b.b.b.b
log-adjacency-changes detail
area 0 authentication message-digest
redistribute bgp XXXXX subnets route-map BGP=>OSPF
network x.x.x.x area 0
default-information originate


I only different is highlighted.  The interfaces in all of these routers and the Firewall are 10 Gig.   Does the highlighted give that circuit/router prioirity?  Since everything is 10 gig is that bandwidth statement correct?  if not what could it be affecting.

5 Replies 5

MHM Cisco World

OSPF Metric Tuning 

As described in Chapter 13, OSPF calculates the cost of the links by dividing a reference bandwidth by the bandwidth of the link. By default, the reference bandwidth is 100 Mbps. 

In Data Center environments, there are typically Gigabit Ethernet links and even 10 Gigabit Ethernet links. To address this problem, you can change the reference bandwidth to 10 Gbps with the auto-cost reference-bandwidth 10000 command. You should use this change consistently in the OSPF network. 


VIP Guru VIP Guru
VIP Guru

if there is no cost means 100MB, if the cost mentioned then it will be overridden and whichever wins are prefered li based on the link capacity.


The calculation is Reference BW  / Configured BW  ( reference bandwidth always Mbits per second)


***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

The interfaces are 10 Gig but the links are only 3 and 2.5 Gig.  So I would assume I would use those for the bandwidth Calcuations?  is that command used for preference?  Meaing I prefer this circuit/router over the other 1 ?  if not what is that command used for and I only have it on 1 of the routers so I am assuming I should put it on both.

yes if the bearer is 10Gb and CIR is 2.5/3GB , then you need to calculate based on that and adjust it.


yes, that is for the prefered link over others more like Traffic engineering you want to do. if both the links same capacity (you do not want any preference, OSPF does equal load balance automatically (not un-equal).



***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

paul driver
VIP Expert VIP Expert
VIP Expert


Default Ref BW:100MB -  <---as you can see 100Mb and 1GB link would cost the same with the ospf default
100MB = 100,000,000/100,000,000=1
1GB = 100,000.000/1,000,000,000 =1

Ref BW:1GB = 1000
100MB = 1,000,000,000/100,000,000=10
1GB = 1,000,000.000/1,000,000,000 =1

Ref BW:10GB = 10000
100MB = 10,000,000,000/100,000,000=100
1GB = 10,000,000,000/1,000,000,000 =10

Ref BW:100GB = 100000
100MB = 100,000,000,000/100,000,000=1000
1GB = 100,000,000,000/1,000,000,000 =100
10GB = 100,000,000,000/10,000,000,000 =10

Any dual aggregation on the above interfaces will decrease the cost by half, and lasty it is recommended to be consistant with the auto-costing all al rtrs through your estate

Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers