Advantage of Dynamic Routing

Why would you use dynamic routing over static routing, and what is the advantage of dynamic routing protocols?

Advantage of dynamic routing explained with a comparison between static manual routing and automated dynamic route calculation

1. Static vs Dynamic Routing

The primary difference between static and dynamic routing protocols is that static routing requires manual configuration of routes in the routing table.

In contrast, the advantage of dynamic routing comes from the fact that the protocol is intelligent. The router uses knowledge of the network and neighboring routers to configure routes.

The goals of static and dynamic routing are the same: Build and maintain the routing table despite events.

Static RoutingDynamic Routing
ComplexityIt’s simple. The routes stay fixed after configuration.More knowledge is required. Routes adapt automatically.
Route ManagementRoutes must be entered manually, one by one.Routes are calculated based on the network topology and neighbor information.
EfficiencyIt has very low CPU and RAM consumption.There is higher CPU and RAM consumption due to the calculation.
Use casesSmall networks, backup routes and default routes.Corporate and campus networks, as well as almost all other networks.

2. How Dynamic Routing works

Dynamix routing protocols use mechanisms to maintain the routing table dynamically, to share network knowledge with neighbors and to forward packets to non-adjacent networks.

  1. Learning about adjacent subnets and routers.
  2. Advertise routing knowledge to adjacent routers.
  3. If several paths lead to the same subnet, select the best path and add it to the routing table.
  4. Ensure reliability by recalculating the best route in case of a network link failure.
How routers exchange information and update routes dynamically when the network topology changes

As shown in the image, at point 1, R1 is aware of routers R2, R3, and R4 because they are adjacent to it. R1 will communicate with them to share network information.

At point 2, R2 responds by providing information about the 192.168.0.0/24 network.

Dynamic routing protocols are intelligent. This is an advantage because they can find the best route to a destination. At point 3, R1 decides to use the G0/0 interface rather than the G0/1 interface.

At point 4, R6 updated its routing table to address the link failure between R6 and R3. Packets will then pass through interface G0/0 and R5.

3. Interior vs Exterior Routing Protocols

There are two main types of routing protocols. The difference in the two categories is where they operate: inside an organization or between multiple organizations.

To understand this, you first need to learn about the concept of an autonomous system (AS).

AS have a unique identifier. This autonomous system number is assigned by the IANA. An AS is a network, or group of networks, that is under a single administrative control. This could be an enterprise, a university, or an Internet Service Provider (ISP).

For example, Google’s autonomous system number is 15169. You can find a list of autonomous systems at BGP Looking Glass.

There are two categories of dynamic routing protocol:

  • IGP (Interior Gateway Protocol)
  • EGP (Exterior Gateway Protocol)
Interior Gateway Protocol (IGP)Exterior Gateway Protocol (EGP)
OSPFBGP
EIGRP
RIP
IS-IS

IGPs (Interior Gateway Protocol) are responsible for exchanging routing information within an AS. Their goal is to determine the optimal path within the internal network.

EGPs (Exterior Gateway Protocols) are responsible for exchanging routing information between AS. On the Internet, different networks (AS) must share routing information..

Examples of IGPs are:

  • OSPF
  • EIGRP
  • RIP
  • ISIS

Examples of EGPs are:

  • BGP

For the CCNA, the only dynamic routing protocol you need to learn how to configure is OSPF.

4. Distance Vector and Link State Protocols

Finally, within the IGP group, routing protocols are categorized based on how the algorithms work. There are two types of algorithms: Distance Vector and Link State protocols.

A comparison of distance vector and link state routing protocols, with metrics based on hops and link cost.

Distance Vector protocols

Distance vector protocols calculate the best path based on the distance to the destination. The distance is equal to the number of hops, or the number of routers a packet needs to pass through.

With this type of protocol, two routers exchange routing table information and the number of hops to every destination.

Distance-vector routing protocols use the Bellman–Ford algorithm to determine the best path.

Distance Vector protocols require less CPU and RAM because they do not perform large calculations. Routers that run these protocols do not store network topology information. Instead, they update their routing tables when their neighbors update and share theirs.

Examples of Distance Vector protocols:

  • RIP
  • EIGRP (Use some link state functionalities. It’s considered a hybrid protocol.)

Link State protocols

In link-state protocols, each router creates an internal representation of the network topology, like a map. This topology shows how the routers are connected to each other an how to reach them in the fastest way as possible.

Each router keep a version of the network map internally. They calculates the best path from itself to every possible destination in the network based on a metric.

Google Maps uses metrics to get you to your destination as quickly as possible. These measurements include the speed of other drivers, accidents on the road, etc.

Link-state protocols like OSPF do exactly the same thing, but with their own parameters.

Link State protocols use the Dijkstra’s algorithm to calculates metrics.

Link State protocols use more CPU and RAM than Vector Distance protocols because they perform large calculations using neighbor information to update their routing tables. Additionally, these protocols have a faster convergence time.

Examples of Link State protocols:

  • IS-IS
  • OSPF