OSPF(Open Shortest Path First), a link-state routing protocol. classless routing protcols uses the concept of areas for scalability.
OSPF is a protocol witch uses cost as a metric.
1. Characteristics of OSPF
1.1 OSPF History
Interior Gateway Protocol | Exterior Gateway Protocols | ||||
Distance Vector | Link-State | Path Vector | |||
IPv4 | RIPv2 | EIGRP | OSPFv2 | IS-IS | BGP-4 |
IPv6 | RIPng | EIGRP for IPv6 | OSPFv3 | IS-IS For IPv6 | BGP-MP |
The initial development of OSPF began in 1987 by the IETF OSPF Working Group. At that time, the Internet was largely an academic and research network funded by the U.S. government.
In 1989, the specification for OSPFv1 was published in RFC 1131. Two implementations were written. One implementation was developed to run on routers and the other to run on UNIX workstations. The latter implementation became a widespread UNIX process known as GATED. OSPFv1 was an experimental routing protocol and was never deployed.
In 1991, OSPFv2 was introduced in RFC 1247 by John Moy. OSPFv2 offered significant technical improvements over OSPFv1. It is classless by design; therefore, it supports VLSM and CIDR.
At the same time the OSPF was introduced, ISO was working on a link-state routing protocol of their own, Intermediate System-to-Intermediate System (IS-IS). IETF chose OSPF as their recommended Interior Gateway Protocol (IGP).
In 1998, the OSPFv2 specification was updated in RFC 2328, which remains the current RFC for OSPF.
In 1999, OSPFv3 for IPv6 was published in RFC 2740. OSPF for IPv6, created by John Moy, Rob Coltun, and Dennis Ferguson, is not only a new protocol implementation for IPv6, but also a major rewrite of the operation of the protocol.
In 2008, OSPFv3 was updated in RFC 5340 as OSPF for IPv6.
1.2 OSPF Feature
Cisco AD Value
Route Source | Administrative Distance |
Connected | 0 |
Static | 1 |
EIGRP summary route | 5 |
External BGP | 20 |
internal EIGRP | 90 |
IGRP | 100 |
OSPF | 110 |
IS-IS | 115 |
RIP | 120 |
External EIGRP | 170 |
Internal BGP | 200 |
NOTE: Administrative distance (AD) is the trustworthiness (or preference) of the route source.
OSPF has a default administrative distance of 110.
1.3 OSPF Data Structures
Database | Table | Description |
Adacency Database | Neighbor Table | 1. List of all neighbor routes to which a router has established bidirection communication 2. This table is unique for eatch router 3. Can be viewed using the show ip ospf neighbor command |
Link-State Database(LSDB) | Topology Table | 1. Lists information about all other routers in the network 2. The database represents the netwrok topology. 3. All routers within an area have identical LSDB. 4. Can be viewed using the show ip ospf database command. |
Forwarding Database | Routing Table | 1. List of routes generated when an algorithm is run on the link-state database. 2. Each router's routing table is unique and contains information on how and where to send packets to other routers 3. can be viewed using the show ip route command. |
1.4 Routing Protocol Messages
OSPF exchanges messages to convey routing information using five types of packets.
1.5 Algorithm
The CPU processes the neighbor and topology tables using Dijkstra’s SPF algorithm.
The SPF algorithm is based on the cumulative cost to reach a destination.
The SPF algorithm creates an SPF tree by placing each router at the root of the tree and calculating the shortest path to each node.
The SPF tree is then used to calculate the best routes. OSPF places the best routes into the forwarding database, which is used to make the routing table.
1.6 OSPF Area
The hierarchical-topology possibilities of multiarea OSPF have these advantages:
2. OSPF Messages
2.1 OSPF Packet Description
Type | Packet Name | Description |
1 | Hello | Discovers neighbors and builds adjacencies between them |
2 | DBD | Checks for database synchronization between routers |
3 | LSR | Request specivic link-state records from router to router |
4 | LSU | Sends specivically requested link-state records |
5 | LSAck | Acknowledges the other packet types |
Hello Packet
The OSPF Type 1 packet is the Hello packet. Hello packets are used to:
The figure displays the fields contained in the Type 1 Hello packet. Important fields shown in the figure include:
LSU
|
|
|
|
|
3. OSPF Operation
Down State
init State
Two-Way State
ExStart State
Exchange State
Loading State
Full State