Home To Know Networking OSPF (Open Shortest Path First)

OSPF (Open Shortest Path First)

319
3
SHARE
OSPF (Open Shortest Path First)

OSPF (Open Shortest Path First) is an open standards routing protocol that’s been implemented by a wide variety of network vendors including cisco.

If we have multiple routers and not all of them are cisco, then we can’t use EIGRP, so our remaining options are basically RIP V1, RIP V2, or OSPF. But if it’s a large network, then really we have options are OSPF or something called route redistribution. This works by using the Dijkstra Algorithm.

OSPF Converges quickly, although perhaps not as quickly as EIGRP and it supports multiple equal cost routes to the same destination. But unlike EIGRP, it only supports IP routing.

OSPF Provides Following Features

  1. Consists of areas and autonomous systems.
  2. Minimize routing update traffic.
  3. Allows scalability.
  4. Supports VLSM/CIDR.
  5. Has unlimited hop count.
  6. Allows multi-vendor deployment.

To see each router connects to the backbone – called area 0, or the backbone area. OSPF must have an area 0, and all routers should connect to this area if at all possible, but routers that connect other areas to the backbone within an AS are called Area Border Routers (ABRs).

OSPF runs inside an autonomous system, but can also connect multiple autonomous systems together. The Router that connects these ASes together is called an Autonomous System Boundary router (ASBR).

OSPF Area
OSPF Area

OSPF Terminology

  • Link: A link is a network or router interface assigned to any given network.
  • Router ID (RID): An IP address used to identify the router. Cisco Chooses the router ID by using the highest IP address of all configured loopback interfaces.
  • Neighbors: Neighbors are two or more routers that have an interface on a common network, such as two routers connected on a point- to – point serial link.
  • Adjacency: An adjacency is a relationship between two OSPF routers that permits the direct exchange of route updates.
  • Hello Protocol: The OSPF hello protocol provides dynamic neighbor discovery and maintains neighbor relationship. Hello packet are addressed to 224.0.0.5.
  • Neighborship Database: The neighborship database is a list of all OSPF routers for which Hello packets have been seen.
  • Topology Database: The topology database contains information from all of the link state advertisement packets that have been received for an area.
  • Designated Router: A designated router is elected whenever OSPF routers are connected to the same multi-access network.
  • Back up Designated Router: A backup designated router (BDR) is a hot standby for the DR on multi access links.
  • OSPF Areas: An OSPF area is a grouping of contiguous networks and routers. All routers in the same area share a common Area ID. Because a router can be a member of more than one area at a time, the area ID is associated with specific interfaces on the router. This would allow some interfaces to belong to area 1, while the remaining interfaces can belong to area 0. All of the routers within the same area have the same topology table. When configuring OSPF, you have got to remember that there must be an area o, and that this is typically configured on the routers that connect to the backbone of the network. Areas also play a role in establishing a hierarchical network organization.

Types of Network OSPF

Broadcast (Multi access)

Broadcast Multi-access networks such as Ethernet allow multiple devices to connect to the same network, as well as provide a broadcast ability in which a single packet is delivered to all nodes on the network.

Non-Broadcast Multi-Access

NBMA networks are types such as Frame Relay, X.25, and Asynchronous Transfer mode (ATM). These networks allow for multi-access, but have no broadcast ability like Ethernet so, NBMA networks require special OSPF configuration to function properly and neighbor relationships must be defined.

Point-to-Point

Point–to–Point refers to a type of network topology consisting of a direct connection between two routers that provides a single communication path.

Point-to-Multipoint

Point to multipoint refers to a type of network topology consisting of a series of a connection between a single interface on one router and multiple destination routers. All of the interfaces on all the routers sharing the point -to- multipoint connection belong to the same network.

SPF Tree Calculation

Within an area, each router calculates the best/shortest path to every network in that same area. This calculation is based up on the information collected in the topology database and an algorithm called shortest path first.

An interface set with a bandwidth of 64000 would have a default cost of 1563.

These two elements are the basic elements of OSPF configuration:

  1. Enabling OSPF (Router OSPF?)
  2. Configuring OSPF areas.

A value in the range 1 to 65,535

The OSPF process ID is needed to identify a unique instance ofan OSPF database and is locally significant.

We can create 0 to 4.2 billion areas.

OSPF use wild card mask.

Verifying OSPF Configuration

#sh ip route

The Show IP OSPF command is used to display OSPF information for one or all OSPF processes running on the router.

#sh ip ospf

The show ip ospf database command indicates the number of links and the neighboring routers ID and is the topology database mentioned earlier.

#show ip ospf database
#show ip ospf interface
#sh ip ospf neighbor
#show ip protocol

Loop back Interfaces are logical interfaces, which are virtual, software- only interfaces. Using loopback interfaces with your ospf configuration ensures that an interface is always active for ospf processes.

Let’s say that you are not using loopback interfaces and the serial interface of your router is the RID of the router because it has the highest IP address of active interfaces. If this interface goes down, then a re-election must occur on who is going to be the DR and BDR on the network. Not necessarily a big deal but what happens if this is a flapping link (going up /down). The routers will not converge because the election is never completed. This is obviously a problem with OSPF. Loopback interfaces solve this problem because they never go down and the RID of the router never changes.

The highest IP address of any logical interface will always become a routers ID.

#Conf t
Router (config)#int lo 0
#ip add 172.16.30.1 255.255.255.255
#no shut

I am sure that you are wondering, what the IP address mask of 255.255.255.255 /32 means and why we don’t just use 255.255.255.0 instead. Well, either mask works, but the /32 mask is called a host mask and works fine for loop back interfaces.

To verify loopback addresses use show run

Verify the new RIDs of each router

#sh ip ospf database
#sh ip ospf interface
#sh ip ospf

An important thing to keep in mind is that the new RIDs didn’t show p after setting the loopback interface on each router until I rebooted the routers.

It’s important to remember that although the IP address on the interface is higher than the loopbacks address the highest loopback address always beats any physical interface.

  • AD – 110
  • It supports unlimited hop count
  • Metric = Cost + 108 /Bandwidth
  • It supports load balancing with equal paths.
  • It supports manual summarization.
  • It supports Area System
  • It use Multicast
  • It supports incremental updates when any changes occur in the network.

OSPF Terminology

OSPF Terminology
OSPF Terminology

R1 (config) #router ospf 10
#network 10.0.0.0 0.255.255.255 area 0
#network 9.0.0.0 0.255.255.255 area 0
R2 (config) #router ospf 10
#exit
#network 9.0.0.0 0.255.255.255 area 0
#network 11.0.0.0 0.255.255.255 area 0
#exit

3 COMMENTS

  1. I discovered your blog site on google and check a few of your early posts. Continue to keep up the very good operate. I just additional up your RSS feed to my MSN News Reader. Seeking forward to reading more from you later on!

Leave a Reply