OSPF uses smaller routing tables due to segmentation of entire network into smaller areas. The network segmentation into area enable better administration. OSPF consists of a backbone Area “0” . The Area “0” links all other smaller areas within the hierarchy. The important components of an OSPF network are hardware components, areas, databases, Messages and algorithm:
Hardware components are included area border router (ABR) and AS boundry router.
Area Border Routers (ABR)
ABR is a router located near the border between one or more one OSPF areas. It establishes a link between backbone networks and the OSPF areas.
AS Boundary Routers
It is a router exchanging routing information with non-OSPF networks. AS boundary routers advertise externally learned routes throughout the OSPF AS. The AS Boundary Routers can also work as a ABR, backbone router or an internal router depending on the location. Router within a stub area cannot be an AS boundary router because stub area cannot contain any type 5 LSAs.
In OSPF a single autonomous system (AS) can be divided into smaller groups. These smaller groups called areas. Areas reduce the number of LSAs and also reduce other overhead traffic sent on the network. The areas also reduce the topology database size maintaining each router.
The backbone area consists of all networks in area ID 0.0.0.0, including attached routing devices, and all Area Border Routers. It distributes routing information between areas. The backbone is itself an area, so the rules and terminology of an areas also apply.
Areas where AS external advertisements are not flooded called stub areas. Stub areas are shielded from external routes but receive information about networks that belong to other areas of the same OSPF domain
Routing devices within a stub area rely on the default routes originated by the area’s ABR to reach external AS destinations. The default-metric must be configure on the ABR before it advertises a default route. The ABR advertises a default route in place of the external routes that are not being advertised within the stub area, so that routing devices in the stub area can reach destinations outside the area.
Not-So-Stubby Areas (NSSA)
It enables network administrator to configure OSPFv2 areas that provide the benefits of stub areas capable of importing external route information. These routes are then leaked into other areas. But, external routes from other areas still do not enter the NSSA.
Totally Stubby Area
This area filters out information of OSPF database on the bases of LSA types. An Area Border Router (ABR) in a Totally Stubby Area prevents LSA type 3, 4 and 5 to be flooded in to a Totally Stub Area. It replaces all these types of LSA with a default route.
The area through which we can configure the virtual link called transit area. The transit area must be in position of full routing information. The transit area cannot be a stub area.
The OSPF databases including adjacency database, link-state database (LSDB) and forwarding database. The introduction to the databases are following:
OSPF adjacency database maintain neighbor database. This database allows routers to exchange routing information. The routers must be neighbors, then they can become adjacent. Two routers only become adjacent if at least one of them is DR or BDR. The database contains the list of all neighbors routers establishes bidirectional communication. The adjacent database table is unique for each router. We can view this database using “show ip ospf neighbor” command.
Link-state database (LSDB)
The LSDB creates the topology table for every area to which the router belongs. The router links advertisements; network links advertisements, and summary link advertisements are the components of LSDB. The link-state database also maintains the list of all routers in the network. We can view LSDB using the “show ip ospf database” command.
This database creates and list the routing table of the router. Each router routing table is unique and containing information on how and where to send packet to other routers. We can view forwarding database using the “show ip route” command.
Routing Protocol Messages
OSPF exchange information between routers using different messages. The messages packet populates the routing table with the routing protocol’s choice of best paths. These packets discovers neighboring routers and also to exchange routing information to maintain accurate information about the network. There are five types of messages packet in OSPF also illustrates in the figure below:
- Hello packet
- Link-state request packet
- Database description packet
- Link-state update packet
- Link-state acknowledgment packet
The OSPF is link-state routing protocol and using the CPU processes the neighbor and topology tables using Dijkstra’s SPF algorithm. The SPF algorithm cumulative cost based algorithm to reach a destination. The SPF algorithm creates an SPF tree and calculates the shortest and best path to each node. OSPF places the best routes into the forwarding database and make routing table using the forwarding database.