OSPF is a complex routing protocol. It uses many terms to define its functions and operations. This tutorial explains the meaning of the terms OSPF routing protocol uses.
Link
A link is a router's interface connected to an IP subnet. When we add an interface to the OSPF process, OSPF considers the interface as a link.
State
Since a link is an interface, it has two states: up and down. The up state shows the link (interface) is operational and OSPF can reach the IP subnet connected to the link. The down state shows the link is not operational and OSPF cannot reach the IP subnet connected to the link.
Link state protocol
OSPF is a link-state protocol. Link state protocols use the Shortest Path First (SPF) algorithm to calculate the best path to a destination. To run this algorithm, link-state protocols learn the complete topology of the network. In a big size network, this feature creates scalability problems. To solve this problem, OSPF uses two concepts: autonomous systems and areas.
Autonomous System
An autonomous system is a group of networks under a single administrative control which can be a group of companies, a company, or a division within the company. There are two types of routing protocols: Interior Gateway Protocol (IGP) and Border Gateway Protocol (BGP). IGP routing protocols provide routing within a single AS. BGP routing protocols provide routing between different AS. OSPF is a IGP routing protocol. OSPF provides routing within a single AS.
Hierarchical Design and Areas
Within the AS, OSPF uses areas and hierarchical design. OSPF implements a two-layer hierarchy: backbone area and areas off the backbone. OSPF uses the backbone area to provide routing between areas off the backbone and areas off the backbone to control when and how much routing information is shared between routers.
An area is a group of contiguous networks. Each area uses a unique area ID. All routers in the same area use the same area ID. The following image shows how OSPF uses areas for hierarchical routing.
The following table lists some common terms used in the hierarchical design and the area concept.
Term | Description |
Backbone area | A special area to which all other areas must connect. |
area | A set of contiguous routers that share the same routing information. |
Backbone routers | Routers in the backbone area |
Internal routers | Routers in areas off the backbone |
ABR | A router that connects the area to the backbone area |
Intra-area route | A route within the same area |
Interarea route | A route between the areas |
Router ID (RID)
RID is the name of the router OSPF uses to identify the router. OSPF uses the highest configured IP address as RID. If loopback interfaces are configured, OSPF uses them to choose RID. If loopback interfaces are not configured, OSPF uses all active physical interfaces to choose RID.
Neighbors
OSPF neighbors are two or more routers that have an interface in the same network and have certain configuration values same. These configure values are called neighborship requirements.
Adjacency
OSPF does not share routing updates with all neighbors. An OSPF router shares routing updates with adjacent neighbors only. An adjacency is a relationship between two adjacent routers that permits them to directly exchange routing updates.
Designated router (DR)
OSPF uses the concept of DR and BDR in the broadcast network to minimize the number of adjacencies formed. In a broadcast network, one router is selected as DR. A designated router shares routing updates with all routers.
Backup Designated Router (BDR)
A BDR is a hot standby router for the DR. The BDR keeps the backup copy of all databases running on DR. If DR fails, BDR immediately takes over the position of DR.
Hello protocol
OSPF uses the hello protocol to discover OSPF routers in the network and maintain the relationship with neighbors. Hello packets are sent to multicast address 224.0.0.5.
OSPF database
OSPF maintains two types of databases: neighborship database and topological database. It uses the neighborship database to store a list of all OSPF routers for which hello packets have been seen. It uses the topological database to store information about all LSA packets.
Link State Advertisement (LSA)
LSA is an OSPF data packet containing link-state and routing information. OSPF routers share LSA packets only with established adjacent routers.
LSDB
An LSDB is a collection of all LSAs received by the OSPF router. Each LSA has a unique sequence number. OSPF stores an LSA in LADB with its sequence number. Adjacent routers maintain the same LSDB.