Open Shortest Path First (OSPF) is a dynamic routing protocol that handles routing for IP traffic.

Originally designed in the 1980s, OSPF is defined for IPv4 in protocol version 2 by RFC 2328 (1998). The updates for IPv6 are specified as OSPF Version 3 in RFC 5340 (2008).

 

 

OSPF V2

OSPF V3

Advertises

IPv4 networks

IPv6 prefixes

Source Address

IPv4 source address

IPv6 link-local address

Multicast Address

224.0.0.5

224.0.0.6

FF02::5

FF02::6

IP Unicast Routing

IPv4 unicast routing is enabled

IPv6 unicast-routing not enabled by default

Multiple OSPF instances per interface

No

Yes

Authentication

Plain text and MD5

IPv6 authentication (IPSec)

LSAs

7

9

 

 

OSPF is a link-state routing protocol, it runs over IPv4 and IPv6, but does not use a transport protocol. It encapsulates its data directly in IP packets with protocol number 89. This is in contrast to other routing protocols, such as the Routing Information Protocol (RIP) and the Border Gateway Protocol (BGP). OSPF implements its own transport error detection and correction functions.

Protocol

Layer

Protocol Number

Port Number

RIP

Application

UDP

520

BGP

Application

TCP

179

IGRP

Transport

9

 

EIGRP

Transport

88

 

OSPF

Transport

89

 

 

OSPF establishes and maintains neighbor relationships in order to exchange routing updates with available routers and constructs a topology map of the network. It supports complex networks with multiple routers, including backup routers, to balance traffic load on multiple links to other subnets. Neighboring routers in the same broadcast domain or at each end of a point-to-point link communicate with each other via the OSPF protocol. Routers form adjacencies when they have detected each other. This detection is initiated when a router identifies itself in a hello protocol packet. Upon acknowledgment, this establishes a two-way state and the most basic relationship.