Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Open Shortest Path First
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Routing metrics== OSPF uses ''path cost'' as its basic routing metric, which was defined by the standard not to equate to any standard value such as speed, so the network designer could pick a metric important to the design. In practice, it is determined by comparing the speed of the interface to a reference-bandwidth for the OSPF process. The cost is determined by dividing the reference bandwidth by the interface speed (although the cost for any interface can be manually overridden).<ref>{{Cite web |title=reference-bandwidth (Protocols OSPF) {{!}} Junos OS {{!}} Juniper Networks |url=https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/reference-bandwidth-edit-protocols-ospf.html |access-date=2025-03-26 |website=www.juniper.net}}</ref><ref>[https://www.oreilly.com/library/view/cisco-ios-cookbook/0596527225/ch08s04.html Adjusting OSPF Costs] {{Webarchive|url=https://web.archive.org/web/20210414034040/https://www.oreilly.com/library/view/cisco-ios-cookbook/0596527225/ch08s04.html |date=April 14, 2021 }}, OReilly.com</ref> Here is an example table that shows the routing metric or 'cost calculation' on an interface. * Type-1 LSA has a size of 16-bit field (65,535 in decimal)<ref>{{cite news |title=OSPF Stub Router Advertisement |url=https://datatracker.ietf.org/doc/html/rfc3137 |newspaper=Ietf Datatracker |publisher=Internet Engineering Task Force |access-date=23 October 2021 |date=June 2001 |archive-date=October 23, 2021 |archive-url=https://web.archive.org/web/20211023222149/https://datatracker.ietf.org/doc/html/rfc3137 |url-status=live }}</ref> * Type-3 LSA has a size of 24-bit field (16,777,216 in decimal) {| class="wikitable mw-collapsible" style="text-align: right" |+ Calculation for reference speed |- ! scope="col" rowspan="2" | Interface speed ! scope="col" colspan="2" | Link cost ! scope="col" rowspan="2" | Uses |- ! scope="col" | Default (100 Mbit/s) ! scope="col" | 200 Gbit/s |- | 800 Gbit/s || 1 || 1 || style="text-align: left" | [[Small form-factor pluggable transceiver#SFP-DD|QSFP-DD112]] |- | 200 Gbit/s || 1 || 1 || style="text-align: left" | [[SFP-DD]] |- | 40 Gbit/s || 1 || 5 || style="text-align: left" | [[Small form-factor pluggable transceiver#40 Gbit/s QSFP+|QSFP+]] |- | 25 Gbit/s || 1 || 8 || style="text-align: left" | [[Small form-factor pluggable transceiver#25 Gbit/s SFP28|SFP28]] |- | 10 Gbit/s || 1 || 20 || style="text-align: left" | [[10 GigE]], common in data centers |- | 5 Gbit/s || 1 || 40 || style="text-align: left" | [[2.5GBASE-T and 5GBASE-T|NBase-T]], Wi-Fi routers |- | 1 Gbit/s || 1 || 200 || style="text-align: left" | common gigabit port |- | 100 Mbit/s || 1 || 2000 || style="text-align: left" | low-end port |- | 10 Mbit/s || 10 || 20000 || style="text-align: left" | 1990's speed. |} OSPF is a layer 3 protocol. If a layer 2 switch is between the two devices running OSPF, one side may negotiate a speed different from the other side. This can create an asymmetric routing on the link (Router 1 to Router 2 could cost '1' and the return path could cost '10'), which may lead to unintended consequences. Metrics, however, are only directly comparable when of the same type. Four types of metrics are recognized. In decreasing preference (for example, an intra-area route is always preferred to an external route regardless of metric), these types are: # Intra-area # Inter-area # External Type 1, which includes both the external path cost and the sum of internal path costs to the ASBR that advertises the route,<ref>Whether an external route is based on a Type-5 LSA or a Type-7 LSA (NSSA) does not affect its preference. See RFC 3101, section 2.5.</ref> # External Type 2, the value of which is solely that of the external path cost,
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)