In Depth Overview of OSPF.

OSPF :

Open Shortest path first is a link state routing protocol which is based in Dijkstra’s algorithm which was developed by Edsger Dijkstra in 1959.

As OSPF is a link state protocol and has overall view of the network path as compared to distance vector routing protocols like RIP, IGRP. Each Router has a full picture of the topology in their network thus they are able to make more accurate decisions than RIP & IGRP.

Link-state routers keep track of the following:

• Neighbours

• All other routers within the same area

•  Best paths towards a destination

Following characteristics will help us in understanding OSPF in more depth:

1. OSPF Areas

2. OSPF Tables

3. OSPF Packet Types

4. OSPF Adjanecy

5. OSPF Router ID.

6. OSPF Router Types

7. Configuring OSPF.

8. Verifying OSPF

1. OSPF Areas:

Routers can be grouped into a single logical domain called Areas while configuring OSPF on them . Routers in a particular Area maintain their topological tables for that area only. OSPF areas help to minimize route entries in the routing table. Thus provides an advantage of creating a hierarchical topology. There are 6 main types of areas called:

  • Backbone Area,
  • Normal Area or standard area
  • Stub Area
  • Totally stub area
  • Not so stub area
  • Totally not so stub area.

Each network which is configured with OSPF and divided into areas must follow below rules

1. All other areas must connect to Backbone or zero area.

2. If an area has to connect to backbone area through any other non-backbone area , A virtual link should be configured to connect that type of area.

2. OSPF Tables

OSPF maintains three different tables when configured on a router.

  • Neighbor table – which contains list of all its neighbors.
  • Topology Table – Which contain overall view of the topology in a particular area or it contains route of all paths in that particular network.
  • Routing Table –  Which contains best route to each path in that network.

3. OSPF Packet Types

OSPF uses five different packet types to form adjacency, exchange routing information etc.

The five packet types are :

  • Hello – They are used to establish and maintain adjacency with directly connected ospf routers.
  • Database Description – They contain description of routers topolofy database and a
  • Link-State Request – These are requests sent to get pieces of neighbor database.
  • Link-State Update : it is just reply sent to LSR .
  • Link State Acknowledgement – Sent by the router who sends LSR to acknowledge a LSU.

4. OSPF Adjacency

Routers configured with OSPF form adjacency using hello protocol and exchange routing information between each other.

To form an adjacency  routers pass hello messages which contain lots of information but Hello/Dead Interval , Area ID , Authentication password and stub area flag should match to form a adjacency.

5. OSPF Router ID.

Router ID is a 32 bit number which is used to uniquely identify a router within a AS.

Router ID is the highest loopback IP address or else highest interface IP address also same can be manually set using router-id command.

6. OSPF Router types.

Four main router types used in OSPF terminology are

  • DR (Designated Router)
  • BDR (Backup Designated Router)
  • ABR (Area Border Router)
  • ASBR (Autonomous system boundary router)

5. Configuring OSPF.

Basic OSPF: Single Area

Router(config)# router ospf process-id

Router(config-router)#network address inverse-mask area [area-id]

Example :

Router(config)# router ospf 100

Router(config-router)# network 10.2.1.0  0.0.0.255 area 0

6. Verifying OSPF

Below commands will help you to verify ospf configuration:

1. Show run | begin ospf – Gives you running configuration on a router beginning with ospf configuration.

2. show ip protocols – verifies the configured protocols on the router.

3. show ip ospf neighbor-  provides neighborship details of your router.

4. show ip route ospf - displays all ospf routes learned by the router.

5. show ip ospf interface – display’s OSPF Router ID, Area ID and adjacency information.