<f>In 1988, the Interior Gateway Protocol (IGP) Working Group of the Internet Engineering Task Force (IETF) was formed.
|
Its brief was to design an IGP based on the Shortest Path First (SPF) algorithm for use on the Internet.
|
The Routing Information Protocol (RIP) was increasingly unable to serve large, heterogeneous internetworks.
|
Open Shortest Path First (OSPF) was the result of their work.
|
As indicated by its name, Open Shortest Path First has two primary characteristics.
|
First it is open, that is, its specification is in the public domain.
|
The OSPF specification is described by RFC 1583.
|
Second it is based on the SPF algorithm.
|
The SPF algorithm is sometimes referred to as the @RDijkstra algorithm@r, after the person credited with its creation.
|
OSPF is a link-state routing protocol.
|
As such, routers send link-state advertisements (LSAs) to all other routers.
|
The LSAs contain information such as the attached interfaces and metrics used.
|
As OSPF routers accumulate link-state information, they use the SPF algorithm to calculate the shortest path to every node.
|
Unlike RIP, OSPF operates within a routing hierarchy.
|
This divides routers' responsibilities and so increases efficiency.
|
OSPF supports variable length subnet masks (VLSMs) to allow efficient allocation of IP addresses within a routing hierarchy.
|
Routing table entries are minimized by combining hierarchical areas and VLSM through route summarization.
@@
The OSPF router ID is the number by which the router is known to OSPF.
|
This identification is important in establishing neighbor relationships and coordinating messages between copies of the SPF algorithm running in the network.
|
By default the OSPF router ID is the highest IP address on an active interface, unless a loopback address has been assigned.
|
This has the disadvantage that if that particular interface goes down, the OSPF process must recalculate a new router ID and resend all of its routing information out its interfaces.
|
The default router ID should be overridden by using a loopback interface.
|
This allows you to assign an IP address to the router that is not used for anything else.
|
You can set up a loopback interface by entering the @RInterface loopback 0@r command in configuration mode.
|
You then enter an address on the loopback interface by typing @Rip address 10.1.1.1 255.255.0.0@r for example.
@@
OSPF routers use a @RHello protocol@r to identify and establish relationships with adjacent routers.
|
Adjacent routers are routers with interfaces to a common network.
|
The router sends @RHello packets@r to its neighbors and receives their Hello packets.
|
Routers on broadcast networks send Hello packets every 10 seconds, and routers on non-broadcast networks send Hello packets every 30 seconds.
|
In addition to helping acquire neighbors, Hello packets also act as "keepalives" to let routers know that other routers are still functional.
@@
One of the best features of OSPF is its ability to quickly adapt to topology changes.
|
There are two components to routing convergence:
 
• detection of topology changes
|
• recalculation of routes
|
OSPF uses two mechanisms to detect topology changes.
|
The first mechanism is interface status changes.
|
For example a carrier failure on a serial link.
|
The second mechanism is the failure of OSPF to receive a Hello packet from its neighbor within a timing window called a @Rdead timer@r.
|
Once this timer expires, the router assumes its neighbor is down.
|
You can configure the dead timer by entering @Rip ospf dead-interval@r at the configuration prompt.
|
The default value of the dead timer is four times the value of the Hello interval.
|
This results in a default of 40 seconds for broadcast networks and two minutes for non-broadcast networks.
|
The second component of routing convergence is the recalculation of routes.
|
Once a failure has been detected, the router that detected the failure sends a link-state packet with the change information to all routers in the area.
|
All the routers recalculate all of their routes using the SPF algorithm.
|
The time required to run the algorithm depends on a combination of the size of the area and the number of links and nodes in the database.
@@
OSPF is a link-state protocol.
|
OSPF routers periodically send out link-state advertisements (LSAs) to all other routers.
|
An LSA is an acknowledged message that contains the portion of the routing table that applies to the state of the router's own links.
|
Unlike distance vector routing updates, LSAs are event-driven.
|
For example, a change in the physical state of a link will trigger an LSA.
|
LSAs are also generated every 30 minutes as a method of ensuring topological database synchronization.
@@
Let's look at two scenarios where a router generates an LSA.
|
In the first scenario the router generates the LSA in response to the standard 30 minute refresh.
|
The LSA is sent to the nearest neighboring routers.
|
These routers check the LSA against their existing entries in the topological database.
|
If the entries are identical there is no need to forward the LSA to other routers.
|
The neighboring routers then reset their 30 minute timers.
|
This keeps the 30 minute database synchronization traffic localized in the network.
|
In the second scenario the router generates an LSA in response to a link failure.
|
Again, the LSA is sent to the nearest neighboring routers.
|
In this case the routers find that the incoming LSA is different from their topological databases.
|
They each update their databases by running the SPF algorithm.
|
They will forward the LSA on through the network until all databases are synchronized.
