Today we are going to dive deeper into the Types of Routing Protocols. For a basic understanding of Routing Protocols, check out the previous blog in this series: Intro to Routing Protocols. Otherwise, if you have a good understanding of this topic already, please proceed!
As we previously mentioned, there are two major types of routing protocols, IGP and EGP. IGP is short for Interior Gateway Protocol which uses protocols such as OSPF, IS-IS and EIGRP. EGP is short for Exterior Gateway Protocol which consists of BGP (Border Gateway Protocol).
We will focus on dynamic routing but if you recall from the previous post in the series, you can either configure routes manually (static) in the routing table or allow routers to update their tables and automate the exchange process (dynamic).
Administrative Distances, or AD, is simply a scale from 0 to 255 of trustworthiness; 0 being the most trustworthy and 255, the least. This value is used to prioritize equal routes that come from different routing protocols. For example, if a router receives the same routes from two different routing processes (e.g. OSPF and RIP), it will check the AD value associated with each process before installing the update in its routing table. If the AD is the same, then hop count (amount of bandwidth) is used. Lastly, if there’s a tie, then the router will install both routes and load-balance traffic across the two separate links.
The following table lists the default AD values:
|Source||Default AD Value|
As we see in the above table, routes associated with a network interface have the highest level of trustworthiness, followed by static routes. It is important to note that AD values can be changed by a router’s administrator.
Routing Protocols Types
There are three types of routing protocols: distance vector, link state, and hybrid. Depending on the situation, each one has its pros and cons and should be considered on a case by case basis.
Distance vector – This class of protocols is used to find the best path to a remote network by looking at the distance. For this class of protocols, distance is typically computed by looking at the number of hops, or intermediate routers. The ones with the lowest hop count are preferred. RIP, RIPv2, and IGRP are examples of distance-vector routing protocols.
Link state – This class of protocols uses three sets of tables: one to handle the directly attached neighbors, one to undercover the topology of the network, and one for the routing table. Link-state routers know significantly more about the internetwork than any routers running distance vector protocols thanks to the topology table. Examples of link-state routing protocols are OSPF and IS-IS.
Hybrid – Hybrid routing protocols have a combination of both distance-vector and link-state characteristics. The only routing protocol in this category is EIGRP, which is a Cisco proprietary protocol. This protocol can be only used if your entire network is based on this vendor
If you recall from a previous post on IPv4 subnets, the IPv4 space is divided into classes to facilitate the assignment of IP addresses to hosts. In IPv4, there are five classes organized in alphabetical order from A and to E. Classes A, B, and C are assigned to unicast traffic, while class D is used for multicast traffic. Lastly, class E is reserved for future use.
In a classful addressing, networks within each class have a fixed subnet mask, based on the class they belong to. For example:
- Class A: Subnets in this class have a /8 mask, meaning that each of the 128 subnets can host 256 x 256 x 256 = 16,777,216 – 2 hosts. This class includes network ranges from 0.0.0.0 to 127.255.255.255. Two subnets within this class are reserved: the 127.x.x.x is reserved for loopback addresses and 0.x.x.x is reserved for the default network.
- Class B: Subnets in this class have a /16 mask, with each of the 16,384 networks that can host up to 256 x 256 = 65,536 – 2 hosts. This class includes network ranges from 126.96.36.199 to 188.8.131.52. An example of a Class B address is 172.16.1.1.
- Class C: Subnets in this class have a /24 mark and can host up to 254 hosts. You can use up to 2,097,152 class C networks. This range includes networks from 192.0.0.0 to 184.108.40.206. A common example of a class C address is 192.168.1.1 which is a pretty popular IP address for home gateways.
- Class D: Subnets out of class D are not used for unicast, so can’t be used for network addressing. This class includes networks from 220.127.116.11 to 18.104.22.168 and its subnet mask is not defined. Class D are used, for example, by OSPF and RIP to send updates and establish neighbor relationships with other routers.
- Class E: Likewise for class D networks, also these ranges are reserved. Class E subnets go from 240.0.0.0 to 255.255.255.255 and its subnet mask is also not defined.
Classful addressing is easy to work with, but highly impractical because it doesn’t optimize network assignment. For this reason, it became quickly obsolete as the Internet started scaling and becoming more popular in the 90s. In those years it became clear that classful networks would waste a lot of IP addresses, and was accelerating IPv4 exhaustion. As a result, today’s networks, and routing protocols, are based on classless addressing.
In the early 1990s, Classless Inter-Domain Routing (CIDR) was introduced as classless addressing. As mentioned before, classful addressing had a fixed network size and caused IP exhaustion within networks. Classless addressing optimizes IPv4 addresses assignment by (1) decoupling IP ranges from a default subnet mask and (2) allowing for variable-length subnet masking (VLSM).
For example, let’s say you need 700 IP addresses. With classless addressing, instead of having to use a class B with over 65,000 addresses, wasting over 98% of them, you can just use a /22 block which gives us 1022 usable IP addresses. This technique avoids wasting significantly less IP addresses in the process.
Routing protocols have a pretty long history. Many of the current standards such as CIDR are being leveraged almost 30 years later. Some networking companies still hold onto proprietary protocols such as EIGRP. Unlike other parts of networking, it seems that we have found standards that still work and function without any severe bottlenecks.