Internet Rounting Protocols
Published: 2020-12-23 12:48:15


# What are Routing Protocols ?
Routing protocols are the means by which routers exchange next-hop reachability information with each other. A routing protocol enables one router to tell all the other routers to which it is connected about the networks that it can reach.

## Overview of Routing Protocols
The purpose of routing protocols is to learn of available routes that exist on the enterprise network, build routing tables and make routing decisions. 
There are two primary routing protocol types although many different routing protocols are defined with those two types. Link state and distance vector protocols comprise the primary types.

### Distance vector protocols 
Advertise their routing table to all directly connected neighbors at regular frequent intervals using a lot of bandwidth and are slow to converge. When a route becomes unavailable, all router tables must be updated with that new information. The problem is with each router having to advertise that new information to its neighbors, it takes a long time for all routers to have a current accurate view of the network. Distance vector protocols use fixed length subnet masks which aren’t scalable.

### Link state protocols 
Advertise routing updates only when they occur which uses bandwidth more effectively. Routers don’t advertise the routing table which makes convergence faster. The routing protocol will flood the network with link state advertisements to all neighbor routers per area in an attempt to converge the network with new route information. They use variable length subnet masks, which are scalable and use addressing more efficiently.

### Open Shortest Path First (OSPF)
It is a true **link state protocol** developed as an open standard for routing IP across large multi-vendor networks. A link state protocol will send link state advertisements to all connected neighbours of the same area to communicate route information. Each OSPF enabled router, when started, will send hello packets to all directly connected OSPF routers.
The hello packets contain information such as router timers, router ID and subnet mask. If the routers agree on the information they become OSPF neighbours. Once routers become neighbours they establish adjacencies by exchanging link state databases.

### Border Gateway Protocol (BGP)
Border Gateway Protocol is an exterior gateway protocol, which is different from the interior gateway protocols discussed so far. The distinction is important since the term autonomous system is used somewhat differently with protocols such as EIGRP than it is with BGP. Exterior gateway protocols such as BGP route between autonomous systems, which are assigned a particular AS number. AS numbers can be assigned to an office with one or several BGP routers. The BGP routing table consists of destination IP addresses, an associated AS-Path to reach that destination and a next hop router address. The AS-Path is a collection of AS numbers that represent each office involved with routing packets. Contrast that with EIGRP, which uses autonomous systems as well. The difference is their autonomous systems refer to a logical grouping of routers within the same administrative system.

No matter what type of routing protocol is being used, there will be clear metrics that are used to measure which route is the best to take. A routing protocol can identify multiple paths to a destination network but needs to have the ability to work out which is the most efficient. Metrics allow the protocol to determine which routing path should be chosen to provide the network with the best service. 


The simplest metric to consider is hop count. The protocol uses hop count to measure the distance it takes for a data packet to reach its destination. The more hops that a packet has to travel through, the farther the packet has to travel. Thus the RIP protocol aims to choose routes while minimizing hops where possible. There are many metrics besides hop count that are used by IP routing protocols.
Metrics used include:
Hop count – Measures the number of routers that a packet must travel through
Bandwidth – Chooses the routing path based on which has the highest bandwidth
Delay – Chooses the routing path based on which takes the least time
Reliability – Assesses the likelihood that a network link will fail based on error counts and previous failures
Cost – A value configured by the administrator or the IOS which is used to measure the cost of a route based on one metric or a range of metrics
Load – Chooses the routing path based on the traffic utilization of connected links

## Closing Words
As you can see, routing protocols can be defined and thought of in a wide array of different ways. The key is to think of routing protocols as distance vector or link state protocols, IGP or EGP protocols, and classful or classless protocols. These are the overarching categories that common routing protocols like RIP, IGRP, OSPF, and BGP fall within.
Of course, within all of these categories, each protocol has its own nuances in how it measures the best routing path, whether that is by hop count, delay, or other factors. Learning everything you can about these protocols that you retain during day-to-day networking will aid you greatly in both an exam and real-world environment.