OSPF Version 2
RFC 1247

Document Type RFC - Draft Standard (July 1991; No errata)
Obsoleted by RFC 1583
Updated by RFC 1349
Obsoletes RFC 1131
Author John Moy 
Last updated 2013-03-02
Stream IETF
Formats plain text html pdf ps htmlized bibtex
Stream WG state (None)
Document shepherd No shepherd assigned
IESG IESG state RFC 1247 (Draft Standard)
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                             J. Moy
Request for Comments: 1247                                 Proteon, Inc.
Obsoletes: RFC 1131                                            July 1991

                             OSPF Version 2

Status of this Memo

This RFC specifies an IAB standards track protocol for the Internet
community, and requests discussion and suggestions for improvements.
Please refer to the current edition of the ``IAB Official Protocol
Standards'' for the standardization state and status of this protocol.
Distribution of this memo is unlimited.


This memo documents version 2 of the OSPF protocol.  OSPF is a link-
state based routing protocol.  It is designed to be run internal to a
single Autonomous System.  Each OSPF router maintains an identical
database describing the Autonomous System's topology.  From this
database, a routing table is calculated by constructing a shortest-path

OSPF recalculates routes quickly in the face of topological changes,
utilizing a minimum of routing protocol traffic.  OSPF provides support
for equal-cost multipath.  Separate routes can be calculated for each IP
type of service.  An area routing capability is provided, enabling an
additional level of routing protection and a reduction in routing
protocol traffic.  In addition, all OSPF routing protocol exchanges are

Version 1 of the OSPF protocol was documented in RFC 1131.  The
differences between the two versions are explained in Appendix F.

Please send comments to ospf@trantor.umd.edu.

1. Introduction

This document is a specification of the Open Shortest Path First (OSPF)
internet routing protocol.  OSPF is classified as an Internal Gateway
Protocol (IGP).  This means that it distributes routing information
between routers belonging to a single Autonomous System.  The OSPF
protocol is based on SPF or link-state technology.  This is a departure

[Moy]                                                           [Page 1]
RFC 1247                     OSPF Version 2                    July 1991

from the Bellman-Ford base used by traditional internet routing

The OSPF protocol was developed by the OSPF working group of the
Internet Engineering Task Force.  It has been designed expressly for the
internet environment, including explicit support for IP subnetting,
TOS-based routing and the tagging of externally-derived routing
information.  OSPF also provides for the authentication of routing
updates, and utilizes IP multicast when sending/receiving the updates.
In addition, much work has been done to produce a protocol that responds
quickly to topology changes, yet involves small amounts of routing
protocol traffic.

The author would like to thank Rob Coltun, Milo Medin, Mike Petry and
the rest of the OSPF working group for the ideas and support they have
given to this project.

1.1 Protocol overview

OSPF routes IP packets based solely on the destination IP address and IP
Type of Service found in the IP packet header.  IP packets are routed
"as is" -- they are not encapsulated in any further protocol headers as
they transit the Autonomous System.  OSPF is a dynamic routing protocol.
It quickly detects topological changes in the AS (such as router
interface failures) and calculates new loop-free routes after a period
of convergence.  This period of convergence is short and involves a
minimum of routing traffic.

In an SPF-based routing protocol, each router maintains a database
describing the Autonomous System's topology.  Each participating router
has an identical database.  Each individual piece of this database is a
particular router's local state (e.g., the router's usable interfaces
and reachable neighbors).  The router distributes its local state
throughout the Autonomous System by flooding.

All routers run the exact same algorithm, in parallel.  From the
topological database, each router constructs a tree of shortest paths
with itself as root.  This shortest-path tree gives the route to each
destination in the Autonomous System.  Externally derived routing
information appears on the tree as leaves.

OSPF calculates separate routes for each Type of Service (TOS).  When
several equal-cost routes to a destination exist, traffic is distributed
equally among them.  The cost of a route is described by a single
dimensionless metric.

OSPF allows sets of networks to be grouped together.  Such a grouping is

[Moy]                                                           [Page 2]
RFC 1247                     OSPF Version 2                    July 1991

called an area.  The topology of an area is hidden from the rest of the
Autonomous System.  This information hiding enables a significant
reduction in routing traffic.  Also, routing within the area is
determined only by the area's own topology, lending the area protection
from bad routing data.  An area is a generalization of an IP subnetted

OSPF enables the flexible configuration of IP subnets.  Each route
Show full document text