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!
==Concepts== OSPF is an [[interior gateway protocol]] (IGP) for routing [[Internet Protocol]] (IP) packets within a single routing domain, such as an [[Autonomous system (Internet)|autonomous system]]. It gathers link state information from available routers and constructs a topology map of the network. The topology is presented as a [[routing table]] to the [[internet layer]] which routes packets based solely on their destination [[IP address]]. OSPF detects changes in the topology, such as link failures, and [[Convergence (routing)|converges]] on a new loop-free routing structure within seconds.<ref>{{citation |url=https://routing-bits.com/2009/08/06/ospf-convergence/ |title=OSPF Convergence |date=August 6, 2009 |accessdate=2016-06-13 |archive-date=August 5, 2016 |archive-url=https://web.archive.org/web/20160805141839/https://routing-bits.com/2009/08/06/ospf-convergence/ |url-status=usurped }}</ref> It computes the [[shortest-path tree]] for each route using a method based on [[Dijkstra's algorithm]]. The OSPF routing policies for constructing a route table are governed by link [[Metrics (networking)|metrics]] associated with each routing interface. Cost factors may be the distance of a router ([[round-trip time]]), data throughput of a link, or link availability and reliability, expressed as simple unitless numbers. This provides a dynamic process of traffic load balancing between routes of equal cost. OSPF divides the network into routing ''areas'' to simplify administration and optimize traffic and resource utilization. Areas are identified by 32-bit numbers, expressed either simply in decimal, or often in the same octet-based [[dot-decimal notation]] used for IPv4 addresses. By convention, area 0 (zero), or 0.0.0.0, represents the core or ''backbone'' area of an OSPF network. While the identifications of other areas may be chosen at will, administrators often select the IP address of a main router in an area as the area identifier. Each additional area must have a connection to the OSPF backbone area. Such connections are maintained by an interconnecting router, known as an area border router (ABR). An ABR maintains separate link-state databases for each area it serves and maintains [[route summarization|summarized routes]] for all areas in the network. OSPF runs over IPv4 and IPv6, but does not use a [[transport protocol]] such as [[User Datagram Protocol|UDP]] or [[Transmission control protocol|TCP]]. It encapsulates its data directly in IP packets with [[List of IP protocol numbers|protocol number 89]]. This is in contrast to other routing protocols, such as the [[Routing Information Protocol]] (RIP) and the [[Border Gateway Protocol]] (BGP). OSPF implements its own transport error detection and correction functions. OSPF also uses [[multicast]] addressing for distributing route information within a broadcast domain. It reserves the [[multicast address]]es {{IPaddr|224.0.0.5}} (IPv4) and {{IPaddr|FF02::5}} (IPv6) for all SPF/link state routers (AllSPFRouters) and {{IPaddr|224.0.0.6}} (IPv4) and {{IPaddr|FF02::6}} (IPv6) for all Designated Routers (AllDRouters).{{Ref RFC|2328|rp=185}}{{Ref RFC|5340|rp=57}} For non-broadcast networks, special provisions for configuration facilitate neighbor discovery.<ref name="rfc2328" /> OSPF multicast IP packets never traverse IP routers, they never travel more than one hop. The protocol may therefore be considered a link layer protocol, but is often also attributed to the application layer in the TCP/IP model. It has a virtual link feature that can be used to create an adjacency tunnel across multiple hops. OSPF over IPv4 can operate securely between routers, optionally using a variety of authentication methods to allow only trusted routers to participate in routing. OSPFv3 (IPv6) relies on standard IPv6 protocol security ([[IPsec]]), and has no internal authentication methods. For routing [[IP multicast]] traffic, OSPF supports the [[Multicast Open Shortest Path First]] (MOSPF) protocol.{{Ref RFC|1584}} Cisco does not include MOSPF in their OSPF implementations.<ref>{{citation |url=http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/configuration/12-4t/iro-12-4t-book/iro-cfg.html |publisher=[[Cisco Systems]] |title=IP Routing: OSPF Configuration Guide |quote=Cisco routers do not support LSA Type 6 Multicast OSPF (MOSPF), and they generate syslog messages if they receive such packets. |accessdate=2016-06-13 |archive-date=August 10, 2016 |archive-url=https://web.archive.org/web/20160810192612/http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/configuration/12-4t/iro-12-4t-book/iro-cfg.html |url-status=live }}</ref> [[Protocol Independent Multicast]] (PIM) in conjunction with OSPF or other IGPs, is widely deployed. OSPF version 3 introduces modifications to the IPv4 implementation of the protocol.<ref name="rfc5340" /> Except for virtual links, all neighbor exchanges use IPv6 link-local addressing exclusively. The IPv6 protocol runs per link, rather than based on the [[subnet]]. All IP prefix information has been removed from the link-state advertisements and from the ''hello'' discovery packet making OSPFv3 essentially protocol-independent. Despite the expanded IP addressing to 128 bits in IPv6, area and router Identifications are still based on 32-bit numbers. <!--As a [[link-state routing protocol]] it was based on the link-state algorithm developed for the [[ARPANET]] in 1980 and the [[IS-IS]] routing protocol. OSPF was first standardized in 1989 as RFC 1131, which is now known as OSPF version 1. The development work for OSPF prior to its codification as an open standard was undertaken largely by the [[Digital Equipment Corporation]], which developed its own proprietary [[DECnet]] protocols.<ref>{{Cite book|title=Data Networks, IP and the Internet: Protocols, Design and Operation|url=https://archive.org/details/datanetworksipin00clar|url-access=limited|author=Martin P. Clark|publisher=John Wiley & Sons|year=2003| isbn=9780470848562|pages=[https://archive.org/details/datanetworksipin00clar/page/n255 237]}}</ref> Routing protocols like OSPF calculate the ''shortest'' route to a destination through the network based on an algorithm. The first routing protocol that was widely implemented, the [[Routing Information Protocol]] (RIP), calculated the shortest route based on hops, that is the number of routers that an [[IP packet (disambiguation)|IP packet]] had to traverse to reach the destination host. RIP successfully implemented [[dynamic routing]], where routing tables change if the [[network topology]] changes. But RIP did not adapt its routing according to changing network conditions, such as [[data-transfer rate]]. Demand grew for a dynamic routing protocol that could calculate the ''fastest'' route to a destination. OSPF was developed so that the shortest path through a network was calculated based on the ''cost'' of the route, taking into account [[bandwidth (computing)|bandwidth]], delay and load.<ref>{{Cite book|title=Data Networks, IP and the Internet: Protocols, Design and Operation|url=https://archive.org/details/datanetworksipin00clar|url-access=limited|author=Martin P. Clark|publisher=John Wiley & Sons|year=2003| isbn=9780470848562|pages=[https://archive.org/details/datanetworksipin00clar/page/n241 223]}}</ref> Therefore, OSPF undertakes route cost calculation on the basis of link-cost parameters, which can be weighted by the administrator. OSPF was quickly adopted because it became known for reliably calculating routes through large and complex local area networks.<ref>{{Cite book|title=Data Networks, IP and the Internet: Protocols, Design and Operation|url=https://archive.org/details/datanetworksipin00clar|url-access=limited|author=Martin P. Clark|publisher=John Wiley & Sons|year=2003| isbn=9780470848562|pages=[https://archive.org/details/datanetworksipin00clar/page/n250 232]}}</ref> As a link-state routing protocol, OSPF maintains link-state databases, which are really network topology maps, on every router on which it is implemented. The ''state'' of a given route in the network is the cost, and OSPF algorithm allows every router to calculate the cost of the routes to any given reachable destination.<ref>{{Cite book|title=Data Networks, IP and the Internet: Protocols, Design and Operation|url=https://archive.org/details/datanetworksipin00clar|url-access=limited|author=Martin P. Clark|publisher=John Wiley & Sons|year=2003| isbn=9780470848562|pages=[https://archive.org/details/datanetworksipin00clar/page/n256 238]}}</ref> Unless the administrator has made a configuration, the link cost of a path connected to a router is determined by the [[bit rate]] (1 Gbit/s, 10 Gbit/s, etc.) of the interface. A router interface with OSPF will then advertise its link cost to neighboring routers through multicast, known as the ''hello procedure''.<ref>{{Cite book|title=Data Networks, IP and the Internet: Protocols, Design and Operation|url=https://archive.org/details/datanetworksipin00clar|url-access=limited|author=Martin P. Clark|publisher=John Wiley & Sons|year=2003| isbn=9780470848562|pages=[https://archive.org/details/datanetworksipin00clar/page/n262 244]}}</ref> All routers with OSPF implementation keep sending hello packets, and thus changes in the cost of their links become known to neighboring routers.<ref>{{Cite book|title=Data Networks, IP and the Internet: Protocols, Design and Operation|url=https://archive.org/details/datanetworksipin00clar|url-access=limited|author=Martin P. Clark|publisher=John Wiley & Sons|year=2003| isbn=9780470848562|pages=[https://archive.org/details/datanetworksipin00clar/page/n263 245]}}</ref> The information about the cost of a link, that is the speed of a point-to-point connection between two routers, is then cascaded through the network because OSPF routers advertise the information they receive from one neighboring router to all other neighboring routers. This process of flooding link-state information through the network is known as ''synchronization''. Based on this information, all routers with OSPF implementation continuously update their link-state databases with information about the network topology and adjust their routing tables.<ref>{{Cite book|title=Data Networks, IP and the Internet: Protocols, Design and Operation|url=https://archive.org/details/datanetworksipin00clar|url-access=limited|author=Martin P. Clark|publisher=John Wiley & Sons|year=2003| isbn=9780470848562|pages=[https://archive.org/details/datanetworksipin00clar/page/n265 247]}}</ref> OSPF has become a popular dynamic routing protocol. Other commonly used dynamic routing protocols are the RIPv2 and the [[Border Gateway Protocol]] (BGP).<ref>{{Cite book|title=Data Networks, IP and the Internet: Protocols, Design and Operation|url=https://archive.org/details/datanetworksipin00clar|url-access=limited|author=Martin P. Clark|publisher=John Wiley & Sons|year=2003| isbn=9780470848562|pages=[https://archive.org/details/datanetworksipin00clar/page/n248 230]}}</ref> Today routers support at least one interior gateway protocol to advertise their [[routing tables]] within a local area network. Frequently implemented interior gateway protocols besides OSPF are RIPv2, IS-IS, and [[EIGRP]] (Enhanced Interior Gateway Routing Protocol).<ref>{{Cite book|title=Data Networks, IP and the Internet: Protocols, Design and Operation|url=https://archive.org/details/datanetworksipin00clar|url-access=limited|author=Martin P. Clark|publisher=John Wiley & Sons|year=2003| isbn=9780470848562|pages=[https://archive.org/details/datanetworksipin00clar/page/n287 269]}}</ref> -->
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)