OSPF Tutorial To Get You On the Right Path

ospf tutorialInterested in learning about basic OSPF?  OSPF stands for Open Shortest Path First and is a routing protocol adaptive for IP networks. It uses a routing algorithm at link state and falls into the interior protocols for routing and operating using one autonomous system. OSPF was originally defined as the 2nd version in RFC 2328. Basically, the concept of routing at link state is that every node connects to other nodes. Then, each of the nodes then calculates the next best path logical from this to every destination possible in the network. The node’s routing table will then be formed by the collection of best paths.  Here is an online course entitled Learn OSPF for Enterprise and Service Provider Networks that will help you learn everything you need to know to quickly configure OSPF.

OSPF is a protocol of routing allowing packets of date to follow and select the network’s most suitable and shortest data path. No particular manufacture maintains or owns this open standard protocol, in Cisco networks, OSPF is the most prevalent. In networks at enterprise level, this protocol is popular because in general it changes propagate quickly to client machines and is easy to configure. You do need some knowledge of TCP-IP, router and network principles to configure OSPF protocol, however.

Why Select OSPF?

Compared to other protocols of routings, there are major reasons to select OSPF. For one, there is ease of configuration and availability in a wide range of routers. For basic configurations, OSPF is actually one of those protocols easiest to configure and most routers support it as it is an open standard.

OSPF is actually a linking 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 types as well. All the link states are kept track of by the OSPF router between the networks it attempts of sending information to and also to itself. This makes a routing protocol link-state. Classless ranges of IP address is supported by OSPF with efficiency. The number of routes advertised is used by OSPF to organize into hierarchical structured network. LSA’s which stand for Link State Advertisements are advertisements that contain routes Route information is summarized to get the advertised number of routes reduced, thus reducing the load of the network. It uses a router designated for reducing frequency and quantity of the LSA. It is required by OSPF that the router has a processor full of power and compared to other protocols of routing, more memory as well.    Here is an article entitled An IP Subnet-the Building Blocks of Network Design that shows you how important IP subnets are.

Ideal routes are selected by OSPF through locating destination paths with the least cost. All links (called ‘router interfaces’) have costs.  A route’s cost equals to the configured costs sum on every link outbound between the destination network and the router, plus the configured cost on the interfaces that the LSA  was received on by OSPF. By the way if you are interested in becoming a full blown network engineer, this is the course to take. With that mentioned, here is a closer look at a good OSPF Network:

OSPF Routing Metric

Path cost is what OSPF uses as its basic metric for routing. In actual practices, many router types will determine the local cost on the router by looking at the internet speed. For instance, a 100Mbps link might have a cost of 1 and a 10Mbps might have a cost of 10.

Remember that this isn’t transport speed, however, but rather, interface speed. If you have a back haul that has a physical interface of 100Mbps but can only pass 5Mbps the router calculates this as an interface of 100Mbps for calculations of path cost.

Generally you can assume that in practice, OSPF calculates the best path to take by count of hop, assuming there are equal speeds of the interface. This calculation can be manipulated by putting fixed costs to an interface in particular. It is important that you are aware of which methods a router will take to decide where to send a packet.  Interested in re-routing OSPF? Here is a course about a video boot camp that has to do with OSPF, Stubs and More.

Discovering Neighbors

Any router that is neighboring hearing the message HELLO will then learn:

–          The RID/Router ID of all routers known

–          The RID/Router ID of the BDR

–          The Designated Router’s ID

–          Five HELLO’s Failed/The DEAD interval

–          HELLO intervals

–          Participating Area ID of the neighbor

–          RID/Router ID of the neighbor.

A neighbor of OSPF is other routes adjacent that has a connection to the routers, whether virtually (in a tunnel), logically or physically and to this the router supposedly should exchange route information and which runs OSPF as well. When enabling OSPF, a message of HELLO is addressed (Try typing 89 on your header IP) and this is sent to the 225.O.O.5 IP address, which is the OSPF multi-cast address that is assigned by IANA. This floods out all participating interfaces in OSPF ever ten seconds.

Router Types of OSPF

The first 2 routers are elected by OSPF to manage LSA’s or Link State Advertisements:

Back-up Designated Router(BDR) – When the DR fails, the BDR takes over. The Designated Router is determined by an election process which also elects a BDR.

Designated Router(DR) – Every area of OSPF has a BDR and a Designated Router (DR). The DR tracks of all the updates of the state of the links and ensures that using Reliable Multicast Transport, the LSA’s then flood the rest of the network. The router is this DR which gets LSA’s sent by all the other routers in the area.

Autonomous System Boundary Router (ASBR) – This is when the OSPF Autonomous System is connected by a router to another Autonomous System.

Area Border Router (ABR) – When not just a single area is connected by a router, this is called an ABR or Area Border Router. These are used for connecting areas that are non-backbone to the backbones. ABR’s are also utilized if virtual links are used by OSPF so that the area gets connected to other areas classified non-backbone using virtual links.

Backbone Router- In Area 0 Backbone Routers have more than one interface

Internal Router-These connect to only one area in OSPF. All of the interfaces connect to the area where it is located and not to any of the other areas.

Areas of OSPF

Areas of OSPF are used for imposing a structure of hierarchy to the data flow over each of the networks. A network that uses OPF always contain a minimum of a single area but if over a single area exists, then one needs to be an area called the ‘backbone.’ The hierarchy of OSPF just has  two levels, the backbones plus the other attached areas to this.  Each area is utilized for grouping routers into groups that can be managed which locally get route information exchanged. At the same time the areas also summarize the route information which externally advertises the routes. A standards network of OSPF looks a bit like a large bubble, this is the area called the backbone. There are many ‘stub areas’ as well, which are smaller ‘bubbles.’ For instance an ABR or Area Border Router is used for connecting each area. Next, a DR or designated router is then elected for every area as well as a designated backup router for assisting the flood of LSA’s in the vicinity.

Area O (Backbone)

Into any network that uses OSPF, the 1st location to build in all the time would be this one, Area 0, which is also known as the backbone. Every other area is to the backbone a directly connected part of OSPF. When you design a backbone OSPF, you need to ensure that there is minimal or no possibilities of this location being divided in 2 or more aspects through a link failure or a router. If Area 0 splits because access lists or hardware failure, sizable network areas may become hard to reach.

Stub/Stubby Areas

It is only to the area of the backbone that a stub is connected to. These areas are at the receiving ends of routes originating from inside the system of autonomy even if the routes come from external areas. At the same time, they do not get routes from out of the system of autonomy.

Totally Stub/ Stubby Area

These areas only have a connection to the area of the backbone. A totally stub, also known as ‘totally stubby’ areas don’t do advertisements of the known routes. It doesn’t send any LSA either. The only routes that totally stub areas receive are the route defaults from an area on the external, which is the backbone. Default routes allow totally stubby areas to be able to ‘talk’ to the remaining network.

Not-So-Stub/Stubby

Using separate networks for connecting the network of internal enterprise to the net is frequently advisable. There are provisions made by OSPF for positioning an ASBR within the non-backbone arenas. In cases like this, the area of the stub needs to find out what the route style is outside of the system of autonomy is of OSPF. When this happens, it allows external areas to know about route systems which are outside of the domain of OSPF routing.

OSPF Operations

Router Identification of OSPF

This will identify a router specified in the topology of OSPF. The ID of the Router is either the interface’s IP with the number highest for IP addresses or if the addresses are designated to the interface loopback. Using the interface for loopback makes the OSPF environment more stable as the interface for loopback (unlike interface that can fail such as the kind that is physical) is always going on.  When there is a failure for an interface that is physical, the router ID of OSPF might change, triggering the flooding of link state advertising and the router election.

OSPF Timers

In operations, there are many OSPF Timers including:

-Link Database Updates occur when there are changes in the OSPF table of routes, or it has been half an hour since the previous changes, whichever first occurs.

-The Dead Timer is by default forty seconds and is usually four times the HELLO timer.

-The HELLO Timer is by default ten seconds.

Election of Designated Router

Once you choose the designated router, this remains the router designated until failure occurs.

Hope this helps! If you are interested in learning more, here is an online course called CCNA OSPF On-Demand Video Boot Camp that tackles fundamentals of OSPF and the tricky configurations of hub and spoke!