Skip to content
  • There are no suggestions because the search field is empty.

Types of Routing Protocols

An autonomous system (AS), also known as a routing domain, represents a collection of Layer 3 devices, such as routers and firewalls, under the administrative control of a single organization or an ISP. Because the concept of an AS plays a crucial role in internet communications, routing protocols belong into one of two major categories:

  • IGP: An interior routing/gateway protocol (IGP) such as EIGRP, IS-IS, OSPF, and RIP is designed to share routing information within a single AS. 
  • EGP: An exterior routing/gateway protocol (EGP) such as BGP is designed to share routing information between autonomous systems.

Four autonomous systems connect, two representing enterprise networks, and the other two representing internet service providers

In the image above, four autonomous systems are interconnected. Among these, AS 65001 and AS 65002 correspond to Enterprises A and B, respectively, while AS 65111 and AS 65222 correspond to ISP 1 and 2, respectively. 

Each autonomous system in our example utilizes a different IGP, although they could also use the same IGP. Communication between these autonomous systems takes place through an EGP (BGP).

Distance Vector and Link-state Routing Protocols

There are two categories of interior gateway protocols: 

  • Distance vector protocols
  • Link-state protocols 

Distance vector protocols, such as RIP and EIGRP, determine the direction and distance to any link in the network through the use of rumor-based learning from directly connected neighbors. This means that the router only knows the exit interface and distance to a destination network but not the exact route how to get there.

Keep in mind that although the true nature of EIGRP is the distance vector protocol family, it is considered an advanced distance vector protocol (also known as a hybrid protocol because it incorporates some link-state features). 

Dynamic routing flow chart indicating the various IGP and EGP protocolsIn contrast, link-state routing protocols, like OSPF and IS-IS, learn network information from the source and always know the exact route for sending packets to a certain destination network. 

This is possible because this type of protocol works by having each node in the network build a detailed map of the entire network, including information about all the other Layer 3 nodes and their connections.

This approach allows the routers to choose a cost-efficient and loop-free path independently to reach all neighbors anytime. When properly designed, the link-state protocols can scale to very large networks because of the hierarchical design they depend on. That is why they are usually used as IGPs in internet service providers.

However, when there is a topology change, they send triggered updates to notify the neighbors with which neighbor relationships are established. This immediate notification generally leads to fast convergence times. 

In addition, regular updates are also sent every 30 minutes by default as a topology assurance in case some routers have different data in their databases.

Exam Note: Even though BGP is not a large focus of the CCNA exam, it is important to remember, as a side note, that this is the only exterior gateway protocol. It is a path vector routing protocol that uses 11 different attributes to calculate the best route to a network in contrast to the IGPs that use just a single parameter, such as bandwidth (EIGRP also uses delay).

Classless and Classful Routing Protocols

Another classification of the routing protocols is based on the routers’ method of exchanging information about the networks within the routing domain. Depending on the approach used, routing protocols can be considered classless or classful. Almost all routing protocols are classless and are considered standard according to today’s networking requirements.

Classful routing protocols are considered legacy and outdated, so they are not used in networks today. Such protocols are RIPv1 and the predecessor of Cisco's EIGRP, the Interior Gateway Routing Protocol (IGRP), which is not supported anymore. These two routing protocols are no longer in use because of the limited information they allow the routers to share.

These protocols do not include the subnet mask data in their routing updates, which makes it possible to use only one subnet mask within a major network. As a result, VLSM (subnets) and discontiguous networks are incompatible with them, which heavily limits them to satisfy today's routing standards.

Not advertising the subnet mask in the routing updates limits the router from learning subnets

As shown in the image above, not sharing the subnet mask in the routing updates from routers R1 and R3 limits R2 from learning about subnets 10.10.10.0/24 and 10.20.20.0/24. 

Instead, it learns about the major network 10.0.0.0/8 and uses both interfaces Fa0/1 and Fa0/2 (load balancing) to reach the network, causing some packets never to reach their destination. 

Classless routing protocols, on the other hand, are considered second-generation routing protocols because they overcome the limitations of classful routing protocols. The rest of the routing protocols, except RIPv1, are classless, meaning RIPv2, OSPF, IS-IS, EIGRP, and BGP share the same method of exchanging routes.

These routing protocols advertise subnet mask information in routing updates, which enables them to support discontiguous networks and VLSM (subnets). This means routers can exchange routing information for major networks for each class and subnet, which perfectly suits networks today, considering that subnets are always used.

Advertising the subnet mask in the routing updates allows the router to learn subnets

As shown in the image above, R1 and R3 include the subnet mask information in their updates when advertising to R2, allowing R2 to learn about these specific subnets. This results in R2 learning about 10.10.10.0/24 and 10.20.20.0/24 subnets behind R1 and R3 and mapping them with the corresponding exit interfaces in the routing table. 

Administrative Distance in Path Selection

As a general recommendation, only one routing protocol should be used in a single enterprise network. However, in some cases, multiple routing protocols might be used, such as when two companies merge and must connect their networks to exchange information.

Since routing protocols are incompatible because they use different algorithms, networks from one routing protocol must be redistributed into another, so routers learn about all networks in the topology. This process is called “route redistribution.”  

There is also a possibility for a router running two routing protocols, such as OSPF and EIGRP, to learn the same network from both protocols. Although this is a good thing, the router uses just one source in the end because only the best route to each destination network is installed in the routing table.

When the router must choose between routes to a single network learned from different sources (routing protocols), it uses a concept called “administrative distance (AD).” This is a predefined number that uniquely identifies the trustworthiness of the source. Like with most Cisco comparisons, the smaller the number, the better the source is.

The table below shows you more information about the default administrative distances used on Cisco IOS.

Source of route

Administrative distance

Connected

0

Static

1

BGP (external routes)

20

EIGRP (internal routes)

90

OSPF

110

IS-IS

115

RIP

120

EIGRP (external routes)

170

BGP (internal routes)

200

Unreachable

255

For example, when a router learns about the same network from OSPF and EIGRP, it will always use the route learned from EIGRP because of the smaller AD of 90 compared to the AD of 110 used by OSPF.

Note: Directly connected networks (AD of 0) and statically configured routes (AD of 1) are always preferred sources compared to dynamic routing protocols. Also, the default AD for each routing protocol can be changed to another value. Although this is not recommended, it is commonly used during redistribution.