< Home

Overview of OSPF

Definition

The Open Shortest Path First (OSPF) protocol is a link-state Interior Gateway Protocol (IGP) developed by the Internet Engineering Task Force (IETF).

OSPF constructs network topologies and routing tables by:
  • Dividing an Autonomous System (AS) into one or more logical areas

  • Advertising routes by sending Link State Advertisements (LSAs)

  • Exchanging OSPF packets between devices in an OSPF area to synchronize routing information

  • Encapsulating OSPF packets into IP packets and sending the packets in unicast or multicast mode

OSPF Version 2, as defined in RFC 2328, is designed for IPv4. OSPF Version 3, as defined in RFC 2740, is designed for IPv6. Unless otherwise stated, OSPF in this document refers to OSPF Version 2.

Advantages

Before the introduction of OSPF, the Routing Information Protocol (RIP) was the most widely used IGP. The rapid growth and expansion of networks have pushed RIP to its limits. RIP has certain limitations that can cause problems in large networks. OSPF can address many issues facing RIP. Table 1 compares RIP and OSPF.

Table 1 RIP versus OSPF

RIP

OSPF

RIP uses a distance-vector algorithm to calculate routes and uses the hop count as the metric, without considering the bandwidth.

OSPF uses a link-state algorithm to build and calculate the shortest path to all known destinations. It uses the link cost as the metric and considers the bandwidth while calculating routes.

RIP has a limit of 15 hops, which limits the RIP network scale.

OSPF does not have the hop limit and applies to large networks.

RIP updates and selects routes through route advertisements. Routers do not know the entire network topology, which can easily cause routing loops.

Each router knows the entire network topology and calculates routes using the shortest path first (SPF) algorithm, which can prevent routing loops.

RIP converges slower than OSPF. Route updates go through a period of a hold-down and garbage collection. This could cause routing inconsistencies between routers.

OSPF converges faster than RIP because route updates are propagated instantaneously to the entire network.

RIP cannot handle variable length subnet mask (VLSM).

OSPF can handle VLSM, which is helpful in IP address allocation.

In addition to the preceding advantages, OSPF has the following characteristics:

  • Multicast packet transmission, reducing the load on the switches not running OSPF

  • Classless Inter-Domain Routing (CIDR)

  • Load balancing among equal-cost routes

  • Packet authentication

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >