The Open Shortest Path First (OSPF) protocol is a link-state hierarchical routing protocol primarily used within larger autonomous system networks. Sophos UTM on AWS supports OSPF version 2. Compared to other routing protocols, OSPF uses cost as its routing metric. The cost of an OSPF-enabled interface is an indication of the overhead required to send packets across a certain interface. The cost of an interface is inversely proportional to the bandwidth of that interface. Therefore, a higher bandwidth indicates a lower cost. For example, there is more overhead (higher cost) and time delays involved in crossing a 56 Kbit/s serial line than crossing a 10 Mbit/s Ethernet line.
The OSPF specification does not specify how the cost of an attached network should be computed—this is left to the vendor. Therefore you are free to define your own computation formula. However, if your OSPF network is adjacent to other networks that have cost already defined, you are advised to apply the same computation base.
By default, the cost of an interface is calculated based on the bandwidth. Cisco, for example, computes the cost by dividing 108 through the bandwidth of the interface in bits per second. Using this formula, it will cost 108/10000000 = 10 to cross a 10 Mbit/s Ethernet line, whereas it will cost 108/1544000 = 64 to cross a 1.544 Mbit/s line (T1) (note that the cost is rounded down to the nearest integer).