28 OSPF Routing Protocol
Configuration
28.1 OSPF Overview
OSPF (Open Shortest Path First) is an internal gateway routing protocol based on link status
as developed by IETF OSPF work group. OSPF is a routing protocol specially configured for
IP and directly runs on the IP layer. Its protocol number is 89 and it performs OSPF packet
switching through multicast, with the multicast address 224.0.0.5 (all OSPF routers) and
224.0.0.6 (specified routers).
The link status algorithm is an algorithm totally different from Huffman vector algorithm
(distance vector algorithm). The RIP is a traditional routing protocol that uses the Huffman
vector algorithm, while the OSPF routing protocol is the typical implementation of the link
status algorithm. Compared with the RIP routing protocol, the OSPF uses a different
algorithm, and also introduces the new concepts such as route update authentication,
VLSMs, and route summary. Even if the RIPv2 has made great improvements, and can
support the features such as route update authentication and VLSM, the RIP protocol still
has two fatal weaknesses: 1) small summary speed; 2) limited network size, with the
maximum hot count no more than 16. The OSPF is developed to overcome these
weaknesses of the RIP so that the IGP can also be adequate for large or complicated
network environments.
The OSPF routing protocol establishes and calculates the shortest path of every target
network by using the link status algorithm. This algorithm is complicated. The following
briefly describes how the status algorithm works:
In the initialization stage, the device will generate the link status notification, in which
includes all link statuses of this router.
All devices switch the link status information in the multicast way, and each of the
devices will copy the received update message of the link status to the local database
as well as transmit it to other routers.
When every router has a complete link status database, the device uses the Dijkstra
algorithm to calculate the shortest path tree for all target networks. The results include
target network, next-hop address, and cost, which are the key parts of the IP routing
table.