\n\t

OSPF Routing Cost

OSPF routing cost - quick overview

The ospf routing cost is part of what the OSPF network uses to choose between alternative routes within the network.

The higher the routing cost the slower the link

Cisco devices can auto set the routing cost - the default value they use is rubbish because any speed of link 100Mbits/sec and over have equal weighting.


At IC we have chosen 500Gigabits/sec as the auto-routing cost

Cisco configuration looks like this as it is specified in megabits

Router ospf 10
 auto-cost reference-bandwidth 500000

 

Juniper configuration for OSPF

Juniper ospf is slightly different to the Mikrokik -

The Interfaces which have OSPF on them are specified on per area - see below:

protocols { 
    Ospf {
      reference-bandwidth 500g;
      area 0.0.0.10 {
         nssa;
         interface lo0.0 passive;
         interface ge-0/0/0.0;
         interface ge-0/0/1.0;
         interface ge-0/0/2.0;
         interface ge-0/0/3.0;
         interface ge-0/0/4.0;
        }
     }
}


Mikrotik do not have an auto option and the cost per interface is specified as a direct cost

BEWARE the default cost on a Mikrotik is 10 or 400 gigabits per sec.

on a mikrotik it is specified in the interface directly to tell the interface it has 100Megs

/routing ospf interface
 add authentication=md5 authentication-key=xxxxxxx cost=5000 interface=ether2 network-type=broadcast

 

The table of costs we will set are shown below

Bits/secRouting Cost
500G 1
200G 3
100G 5
40G 13
10G 50
1G 500
500M 1,000
200M 2,500
150M 3,333
100M 5,000
80M 6,250
60M 8,333
50M 10,000
40M 12,500
30M 16,667
20M 25,000
10M 50,000