Below are the few main points to remember in OSPF.
- Open Shortest Path First – (OSPF)
- OSPF is a link-state protocol IGP
- Uses Dijkstra’s Shortest Path First (SPF) algorithm.
- Like all link state protocols, OSPF’s major advantages over distance vector protocols are fast
reconvergence, support for much larger internetworks, and less susceptibility to bad routing information.
- OSPF does not use a TCP/IP transport protocol (UDP, TCP), but is encapsulated directly in IP datagrams with protocol number 89. This is in contrast to other routing protocols, such as the Routing Information Protocol (RIP), or the Border Gateway Protocol (BGP). OSPF handles its own error detection and correction functions.
- Features of OSPF are:
- Use of areas reduces the protocol’s impact on CPU and memory
- Fully classless behavior, eliminating such classful problems as discontiguous subnets.
- Support of classless route table lookups, VLSM, and supernetting for efficient address
- A dimensionless, arbitrary metric
- Equal-cost load balancing for more efficient use of multiple paths
- The use of reserved multicast addresses to reduce the impact on non-OSPF-speaking devices
- Support of authentication for more secure routing
- The use of route tagging for the tracking of external routes
OPERATION OF OSPF
- OSPF-speaking routers send Hello packets out all OSPF-enabled interfaces. If two routers sharing
a common data link agree on certain parameters specified in their respective Hello packets, they
will become neighbors.
- Adjacencies, which may be thought of as virtual point-to-point links, are formed between some
neighbors depending on the network type and router type.
- Each router sends link state advertisements (LSAs) over all adjacencies.
- Each router receiving an LSA from a neighbor records the LSA in its link state database and
sends a copy of the LSA to all of its other neighbors.
- By flooding LSAs throughout an area, all routers will build identical link state databases.
- When the databases are complete, each router uses the SPF algorithm to calculate a loop-free
graph describing the shortest (lowest cost) path to every known destination, with itself as the root.
This graph is the SPF tree.
- Each router builds its route table from its SPF tree.
Note: Before any LSAs can be sent, OSPF routers must discover their neighbors and establish adjacencies.
Selection Process of Router ID
1. The router chooses the numerically highest IP address on any of its loopback interfaces.
2. If no loopback interfaces are configured with IP addresses, the router chooses the numerically
highest IP address on any of its physical interfaces. The interface from which the Router ID is
taken does not have to be running OSPF.
Hello Packets : OSPF routers sends hello packets to discover neighbors.
DR & BDR : Designated Routers (DRs) and Backup Designated Routers (BDRs) on Broadcast and
Nonbroadcast Multiaccess (NBMA) networks which will make the communication easy and less overhead.
HelloInterval : The period at which two OSPF routers sends Hello packets and is configured on a per interface basis. Cisco uses a default HelloInterval of 10 seconds. The default is 30 seconds on NBMA interfaces. The value can be changed with the command ip ospf hello-interval.
Contents of Hello Packets
- The Router ID of the originating router
- The Area ID of the originating router interface
- The address mask of the originating interface
- The authentication type and authentication information for the originating interface
- The HelloInterval of the originating interface
- The RouterDeadInterval of the originating interface
- The Router Priority
- The DR and BDR
- Five flag bits signifying optional capabilities
- The Router IDs of the originating router’s neighbors. This list contains only routers from which
Hellos were heard on the originating interface within the last RouterDeadInterval.
Fields to Match in Hello Packets to establish Adj : Area ID, Authentication, Network Mask, HelloInterval, RouterDeadInterval, and Options values.
show ip ospf interface – used to observe the components of an interface data structure.