Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updating diagrams

...

  • no hop count limitations;
  • multicast addressing is used to send routing information updates;
  • updates are sent only when network topology changes occur;
  • the logical definition of networks where routers are divided into areas
  • transfers and tags external routes injected into AS.

However, there are few disadvantages:

  • OSPF is quite CPU and memory intensive due to the SPF algorithm and maintenance of multiple copies of routing information;
  • more complex protocol to implement compared to RIP;

...

  • Neighbor - connected (adjacent) router that is running OSPF with the adjacent interface assigned to the same area. Neighbors are found by Hello packets (unless manually configured).
  • Adjacency - logical connection between a router and its corresponding DR and BDR. No routing information is exchanged unless adjacencies are formed.
  • Link - link refers to a network or router interface assigned to any given network.
  • Interface - physical interface on the router. Interface The interface is considered as a link , when it is added to OSPF. Used to build link database.
  • LSA - Link State Advertisement, data packet contains link-state and routing information, that is shared among OSPF Neighbors.
  • DR - Designated Router, chosen router to minimize the number of adjacencies formed. Option The option is used in broadcast networks.
  • BDR -Backup Designated Router, hot standby for the DR. BDR receives all routing updates from adjacent routers, but it does not flood LSA updates.
  • Area - areas are used to establish a hierarchical network.
  • ABR - Area Border Router, router connected to multiple areas. ABRs are responsible for summarization and update suppression between connected areas.
  • ASBR - Autonomous System Boundary Router, router connected to an external network (in a different AS). If you import other protocol routes into OSPF from the router it is now considered ASBR.
  • NBMA - Non-broadcast multi-access, networks allow multi-access but have no broadcast capability. Additional OSPF neighbour neighbor configuration is required for those networks.
  • Broadcast - Network that allows broadcasting, for example, Ethernet.
  • Point-to-point - Network type eliminates the need for DRs and BDRs
  • Router-ID - IP address used to identify OSPF router. If the OSPF Router-ID is not configured manually, a router uses one of the IP addresses assigned to the router as its Router-ID.
  • Link State - The term link state refers to the status of a link between two routers. It defines the relationship between a router's interface and its neighbouring neighboring routers.
  • Cost - Link-state protocols assign a value to each link called cost. the cost value is depend depends on to the speed of the media. A cost is associated with the outside of each router interface. This is referred to as interface output cost.
  • Autonomous System - An autonomous system is a group of routers that use a common routing protocol to exchange routing information.

All of these terms are important for understanding the operation of the OSPF and they are used throughout the article.

Understanding OSPF Areas

Distinctive A distinctive feature of OSPF is the possibility to divide AS into multiple routing Areas which contains their own set of neighboursneighbors.
Imagine a large network with 300+ routers and multiple links between them. Whenever link flaps or some other topology change happens in the network, this change will be flooded to all OSPF devices in the network resulting in a quite heavy load on the network and even downtime since network convergence may take some time for such a large network. 

Introduction of areas allows for better resource management since topology change inside one area is not flooded to other areas in the network. Concept The concept of areas enables simplicity in network administration as well as routing summarization between areas significantly reducing database size that needs to be stored on each OSPF neighbourneighbor.

Each OSPF area has its own unique Area ID and the area with an Area ID of 0.0.0.0 is the main one to which any other area should connect (it is called the Backbone area). Routers that connect to more than one area are  are called ABR (Area Border Routers), their main responsibility is summarization and update suppression between connected areas. Router The router connecting to other another routing domain is called ASBR (Autonomous System Boundary Router).

...

OSPF is a link-state protocol which that assumes that the interface of the router is considered an OSPF link. Whenever OSPF is started, it adds the state of all the links in the local link-state database.

There are several steps before the OSPF network becomes fully functional:

...

Link-state routing protocols are distributing, replicating database that describes the routing topology. The link-state protocol's flooding algorithm ensures that each router has an identical link-state database and the routing table is calculated based on this database.

After all steps above are completed link-state database on each neighbour neighbor contains full routing domain topology (how many other routers are in the network, how many interfaces routers have, what networks link between router connects, cost of each link, and so on).

Communication Between OSPF Routers

OSPF operates over the IP network layer using protocol number 89.
Destination A destination IP address is set to neighbourthe neighbor's IP address or to one of the OSPF multicast addresses AllSPFRouters (224.0.0.5) or AllDRRouters (224.0.0.6). Use The use of these addresses are is described later in this article.
Every OSPF packet begins with a standard 24-byte header.

Section


Column
width400px


Column


FieldDescription
Packet typeThere are several types of OSPF packets: Hello packet, Database Description (DD) packet, Link state request packet, link State Update packet and Link State Acknowledgement packet. All of these packets except Hello packet are used in link-state database synchronization
Router IDone of router's IP addresses unless configured manually
Area IDAllows OSPF router to associate the packet to the proper OSPF area.
ChecksumAllows receiving router to determine if packet was damaged in transit.
Authentication fieldsThese fields allow the receiving router to verify that the packet's contents was not modified and that packet really came from OSPF router which Router ID appears in the packet.




...

Assume we have the following network. Network consists of 4(four) routers. OSPF costs for outgoing interfaces are shown near the line that represents the link. In order to build shortest path tree for router R1, we need to make R1 the root and calculate the smallest cost for each destination.

Image Modified

...

Image Modified

As you can see from the image above multiple shortest paths have been found to 172.16.1.0 network, allowing load balancing of the traffic to that destination called equal-cost multipath (ECMP). After the shortest-path tree is built, a router starts to build the routing table accordingly. Networks are reached consequently to the cost calculated in the tree.

Routing table calculation looks quite simple, however, when some of the OSPF extensions are used or OSPF areas are calculated, routing calculation gets more complicated.

...