OSPF stands for Open Shortest Path First. It is a link-state protocol defined by RFC 2328. Some light reading when you have spare time
Link-state protocols are quick to respond to network changes. OSPF will send an update if any part of the network changes. Every 30 minutes OSPF will also send an update, a link-state advertisement, to the other routers. Just in case the other routers are not informed of any new or changed routes. The 30 minute timer is actually a value of the LSA Refresh to refresh the router’s neighbor database, as defined by RFC 2328:
LSRefreshTime
The maximum time between distinct originations of any particular LSA. If the LS age field of one of the router’s self-originated LSAs reaches the value LSRefreshTime, a new instance of the LSA is originated, even though the contents of the LSA (apart from the LSA header) will be the same. The value of LSRefreshTime is set to 30 minutes.
Thanks to @yandyr for clearing that up!
Updates about networks and routes are sent and received through link-state advertisements or LSAs.
A link-state advertisement (LSA) is created by a router when a network link is changed. An LSA is sent, in a link-state update (LSU), to a router’s neighboring router’s to multicast address 224.0.0.5 or 224.0.0.6
So what does a router do with an LSA?
The router takes each LSA, updates its own link-state database (LSDB), performs the SPF algorithm on the LSDB, forms its own LSA and sends it to it’s own neighboring routers.
This process occurs on each router until all routers, in the same area, knows the best path to each destination network. LSAs will later be described in a future post on OSPF. More good stuff!
That leads us into OSPF areas..
Areas are used to maintain the size of a LSDB. Through proper planning, the advantages to areas are:
- Reduced SPF calculations
- Smaller routing tables
- Reduced LSU (link-state update) overhead
Areas must be initially configured with Area 0. All other areas must connect to Area 0. This is to maintain a hierarchical structure throughout the network.
The types of routers within any given area are
- Internal routers within an area.
- Backbone routers within area 0.
- Area border routers (ABR) that connect a nonbackbone area to area 0.
- Autonomous System Boundry Router (ASBR) that attach external routing domains to an OSPF area.
The way routers send each other LSAs is by connecting to neighboring routers. There is a process in which they become actual neighbors, called adjacency.
Adjacent routers form by:
- Sending and receiving Hello packets to and from neighboring routers.
- Exchanging Hello packets with protocol-specific parameters that must match on each router to become a neighbor.
- Synchronized LSDBs with exchanged LSAs after becoming neighbors.
- New LSAs are formed to other neighboring routers.
In a broadcast network, neighboring routers will elect a Designated Router (DR) and a Backup Designated Router (BDR) in which all other routers form full adjacencies with.
With this method, the DR and BDR handle all LSAs and pass it on to other routers on the LAN. Routers that do not become the DR or BDR are called DROTHER (DR Other) and form a two-way adjacency with the DR and BDR.
This is the end of Part I of OSPF Operation. Future parts are coming soon!
This is Part I, Getting to Know OSPF of a series on OSPF Operation
Part II, OSPF Packets
Part III, OSPF Link-state Advertisements
Part IV, OSPF Network Types
Part V, OSPF Frame-Relay
Part VI, OSPF Route Summarization
Part VII, OSPF Stub Areas
Part VIII, OSPF Authentication
Part IX, Putting it All Together
Part X, Verification