Open Shortest Path First is a routing protocol for Internet
Protocols networks by Interior Gateway Protocol. In mid- 1980s RIP (Routing
Information Protocol) was increasingly incapable of serving large, diverse
network, for that Internet Engineering Task Force created OSPF based on
shortest Path First (SPF) algorithm
If there are several routers in network, OSPF build a table
of the router connection. When data is send from one location to another, SPF
or Dijkstra algorithm compares the available options and chooses the most
efficient way for the data to be sent. This limits the unnecessary delays in
data transmission and prevents infinite loops.
Why OSPF?
Compared to other protocols for routing, there are major
reasons to select OSPF. Firstly, there is ease of configuration and
availability in a wide range of routers, most routers support it as it is an
open standard. As it is link-state route protocol used for allowing routers to
learn routes dynamically from other router types and for advertising the route
it finds to other router type as well. OSPF is a link-state routing protocol
that calls for the sending of link-state advertisement (LSAs) which is
summarized route information to all other routers within the same hierarchical
area.
OSPF uses “Cost” as the value of metric and uses a Reference
Bandwidth of 100 Mbps for cost calculation.
The formula to calculate the cost is Reference Bandwidth
divided by Interface Bandwidth. For example, in the case of 10 Mbps Ethernet,
OSPF
metric cost value is 100 Mbps/ 10 Mbps = 10.
Following table lists OSPF default cost values for some
common interface bandwidth,
|
Bandwidth
|
OSPF Cost
|
|
100 Gbps
|
1
|
|
40 Gbps
|
1
|
|
10 Gbps
|
1
|
|
1 Gbps
|
1
|
|
100 Mbps
|
1
|
|
10 Mbps
|
10
|
|
1.544 Mbps
|
64
|
|
128 Kbps
|
781
|
OSPF Basic Operation:
- OSPF sends Hello Packets out of all OSPF-enabled interfaces. If certain parameters in Hello Packets match between the neighboring routers then they form the relationship called the Adjacency.
- Then each router exchange special packets called Link State Advertisements contain details such as address/network masks configured on the link, the metric, the state of link (which is its relation to the rest of network), list of neighbors connected.
- Each router stores the LSAs in its Link State Database (LSDB).
- Each router runs Dijkstra algorithm to select the best path with loop free using LSDB. The best path stores in routing table.
An OSPF network is divided into areas that are logical
groupings of host and networks.
- Backbone Area – The backbone area (known as area 0) forms the core of an OSPF network. All other areas are connected to it and inter-area routing happens via routers connected to the backbone area and to their own associated areas.
- Stub Area - A stub area is
an area which does not receive route advertisements external to the AS
(Autonomous System-a collection of OSPF areas amongst which OSPF routing
information is shared) and routing from within the area is based entirely
on a default route of 0.0.0.0.
- Not-So-Stubby Areas – These areas are derived from the OSPF stub areas. The motivation behind is to allow OSPF Stub areas to carry external routes (routes learned using other routing protocols like RIP, EIGRP, BGP etc).
- Totally Stubby Area – Totally Stubby Areas protect internal routes by minimizing the routing table and summarizing everything outside the area with a default route. This is a proprietary Cisco solution. It keeps the topological databases and routing table as small as possible.
OSPF router Types:
When an OSPF AS is divided into areas, the routers are
classified by one or more of categories defined in table,
|
Router Type
|
Description
|
|
Internal Router
|
A router with all interfaces connected to the same area.
Internal routers each have a single LSDB.
|
|
Area Border Router (ABR)
|
A router with interfaces connected to different areas.
ABRs have multiple LSDBs, one for each attached area.
|
|
Backbone Router
|
A router with an interface on the backbone area. This
includes all ABRs and internal routers of the backbone area.
|
|
AS Boundary Router(ASBR)
|
A router that exchanges routes with sources outside of the
OSPF AS. ASBRs advertise external routes throughout the OSPF AS.
|
Based on the network
type, OSPF router can elect one router to be a Designated Router (DR) and one
router to be a Backup Designated Router (BDR). For example, on multi-access broadcast
networks (Such as LANs) routers defaults to elect a DR and BDR. DR and BDR serve
as the central point for exchanging OSPF routing information. Non-BDR router
will exchange routing information with the DR and BDR. Instead of exchanging
updates with every router on the network segment, DR will distribute topology
information to every router. This greatly reduces OSPF traffic.
For more, please visit my youtube channel -https://www.youtube.com/user/showkat