Jeremy’s IT Lab lecture video:

Day 24 - Dynamic Routing


Commands

Included in Later Lectures :)


Dynamic Routing Information

IPv4 Network Route: A route to a network/subnet (mask length < /32)
IPv4 Host Route: A route to a specific host (/32 mask)

Routers can use dynamic routing protocols to form adjacencies / neighbor relationships / neighborships with routers, and advertise information about the routes they know to these other routers.

If multiple routes to a destination are learned, the router determines which route is superior and adds it to the routing table. Routers use administrative distance and metric values to decide which routes are superior.


Types of Dynamic Routing

There are two main dynamic routing categories:

  1. Interior Gateway Protocol (IGP)
    • Used to share routes within a single autonomous system (AS), which is a single organization.
      • IGP Protocols:
        • Distance Vector:
          • Routing Information Protocol (RIP)
          • Enhanced Interior Gateway Routing Protocol (EIGRP)
        • Link State:
          • Intermediate System to Intermediate System (IS-IS)
          • Open Shortest Path First (OSPF)
  2. Exterior Gateway Protocol (EGP)
    • Used to share routes between different autonomous systems (AS).
      • EGP Protocols:
        • Path Vector:
          • Border Gateway Protocol (BGP)

Dynamic Routing - Algorithms

Distance Vector

  • Distance vector protocols operate by sending the following information to their directly connected neighbors:
    • Their known destination networks
    • Their metric to reach their known destination networks
  • This method of sharing route information is often called ‘routing by rumor’. This is because the router doesn’t know how the whole network topology looks like, but only knows whatever information its neighbors tell it.
  • It’s called Distance Vector because the routers learn the distance (metric) and vector (direction/next-hop) of each route.
  • When using a Link State routing protocol, every router creates a ‘connectivity map’ of the network. To accomplish this, each router advertises information about its interfaces (connected networks) to its neighbors. Then, these advertisements are sent to other routers in the network until all routers have developed the same map of the network.
  • After the connectivity map is done, each router uses the map to calculate the best routes to each destination.
  • Link State routing protocols use more resources, because more information is shared which leads to more calculations.
  • Link State is faster in reacting to changes in the network than Distance Vector protocols.

Dynamic Routing Protocols - Administrative Distance

Usually, one routing protocol is used in a single network, but there are cases when two different routing protocols are running on the network. To decide which routing protocol should have priority, we use the Administrative Distance (AD) value.

  • The Administrative Distance (AD) is used to determine which routing protocol is preferred. A lower AD is preferred, because it indicates that the routing protocol is considered more trustworthy or more likely to select good routes.
  • (A lower AD = better routing protocol)

Table of Important Cisco Administrative Distance Values

Route ProtocolAD
Directly Connected0
Static1
External BGP (eBGP)20
Internal EIGRP90
IGRP100
OSPF110
IS-IS115
RIP120
External EIGRP170
Internal BGP (iBGP)200
Unusable Route255

If the AD is 255, the router does not believe/trust the source of the route and will NOT add it to the routing table.


Dynamic Routing Protocols - Metric

  • When a router is using a dynamic routing protocol, it might find multiple paths to the same destination, and to determine which path is the best, it uses a value called metric.
  • (A lower metric = better route)
  • Each routing protocol uses a different way of calculating the metric value.
  • If a router learns two (or more) routes via the same routing protocol to the same destination with the same metric, then both routes will be added to the router’s routing table. Traffic will be load-balanced through Equal Cost Multi-Path (ECMP) over both routes.
Metric Cost Calculations in IGP

Administrative Distance VS. Metric

Administrative Distance is used to compare and determine which routing protocol is better.
Metric is used to compare routes learned through the same routing protocol.


Floating Static Routes

A floating static route is when you have a static route with an administrative distance higher than a dynamic route’s administrative distance to the same destination.

  • The route will not be used, unless the dynamic route is disabled/removed.