Overview OSPF
Open Shortest Path First (OSPF) is a dynamic routing protocol that is based on link statuses. It uses the Dijkstra's Shortest Path First (SPF) algorithm to calculate routes within a single Autonomous System (AS).
OSPF, which is developed by the Internet Engineering Task Force (IETF), solves the problems of slow convergence and liability to form loops for distance vector routes. It is applicable to medium- and large-sized networks. Currently, OSPF version 2 is available. It complies with RFC2328 and supports OSPF extended functions defined in other related RFCs.
In OSPF, each device maintains a database that describes the link status of an AS network. The databases of devices in the same area are the same. After the databases are completely synchronized, each device takes itself as the root and uses the SPF algorithm to calculate the shortest path tree without loops to describe the shortest paths it knows to reach each destination. Then each device constructs its routing table based on the shortest path tree.
The main features of OSPF include:
- Fast convergence: After the topology of the network changes, it sends an update packet immediately so that the change is synchronized in the AS.
- Loop free: OSPF runs SPF to calculate routes based on the link status database. The algorithm ensures that no routing loop will be formed.
- Dividing areas: OSPF allows to divide an AS into multiple areas to reduce network bandwidth occupancy, making it possible to construct layered network.
- Authentication support: Once an OSPF device receives a routing protocol packet, it verifies the authentication information contained in the packet to prevent information leakage or malicious attacks in the network.
- Supports subnet with different lengths: The routes advertised by OSPF carry network masks to support subnets with different lengths.
- Support load balancing: OSPF supports multiple equivalent routes to the same destination.