OSPF...What a Protocol!
For today let's discuss a routing protocol that was being thought of in 1987 by the Internet Engineering Task Force (IETF). OSPF currently has three versions and the first version was in the 1980s when the internet was still being used for research. What is interesting about the first version of OSPF is although one version ran on routers the other type of version ran on UNIX computers. When OSPFv2 come out in the 1990s the International Organization for Standardization (ISO) was working on another routing protocol called IS-IS (Intermediate System-to-Intermediate System). OSPF is considered to be an interior gateway protocol which is like IS-IS but unlike OSPF IS-IS runs on the data-link layer while OSPF runs at layer three the network layer. OSPF is considered to be a link-state protocol, unlike RIP, RIPv2 and IGRP , this protocol is what OSPF shines on. Instead of looking at hop-count like RIP, OSPF looks at the cost of the link. Take for example the picture below, two routes are available to the destination. One is one hop away while the other is two hops away. If we are using RIP then the route with the least amount of hops is the preferred route. However if OSPF was running it would look at the cost of the link like the bandwidth of the link. In this example the link with the lowest hop count is also the slowest of the two links. So OSPF would use the link with the highest hop count but in this example that link is also the fastest out of the two.
What makes OSPF also a feature is it supports multiple venders instead of Cisco. OSPF is recognized by RFC 2328 and RFC 2740 (IPv6). Compared to RIP OSPF is fast to converge and is able to scale better to larger networks unlike RIP which can only scale to 16 hops and converges slowly compared to OSPF. OSPF has different packet types or LSPs (Link-State Packets) which help OSPF function like it should:
- Hello packets Like the name suggest these packets are like keep-alives and maintain adjacent with other OSPF routers. The meaning of a hello packet is to discover OSPF neighbors and set up adjacencies. In order for each router to form a neighbor the routers must agree on hello interval, dead timer and network type.
- DBD - Database description which has a short list of the sending router's link state database which is checked against the local link state database.
- LSR - Routers receiving OSPF information can ask more information about any entry in the DBD by sending a link-state request (LSR)
- LSU - (Link-state update) Packets used to reply to LSRs and to announce new information. These packets contain seven different types of link-state advertisements (LSA). This goes into a deeper topic that is aimed at the CCNP level, in short LSA and LSUs can be used interchangeably. A LSU has one or more LSAs and a LSA contains route information for destination routes, just remember at the CCNA level their are different types of LSAs which fall under LSUs. Confused? I'll stop :)
- LSAck- When an LSU is recived, the router sends a link-state acknowledgment to confirm the router received the LSU.
OSPF does elect a DR (Designated Router) and a BDR (Backup Designated Router) The DR's job is to update all other OSPF routers which a called DROthers. when a change happens when using the multiaccess network the BDR monitors the DR and takes over as the DR if the current DR fails. That's my introduction in to OSPF and it is a somewhat complex protocol that needs a complete understanding before going deeper into the beast! Like always I hope this information helps if you have an idea of the next topic I should cover either with ICND1 or ICND2 comment below. Questions about OSPF? let me hear it!
Related articles
- Link-State Protocols (lewiryan.github.io/ciscoskills)
- Black Hat: Routers Using OSPF Open to Attacks (pcworld.com)
- Route Redistribution (mycciepursuit.wordpress.com)
- Incremental SPF option for OSPF (houstonchannels.wordpress.com)
- Routing Protocol Redistribution and Path optimization (cciethebeginning.wordpress.com)