• In contrast to Static Routing
  • Allows a group routers to automatically populate their routing tables by each router advertising their directly connected networks to adjacent/neighbor routers
    • Routers can also dynamically remove routes as connections are lost
    • Further, routers can replace bad routes with alternative Next-Best Routes
      • Dynamic Routing protocols make a cost calculation using their Metric, similar to STP’s Root Cost, to determine which routes are given priority, and which are saved as backups. (Lower metric = superior route)

Dynamic Routing Protocols

This page covers Dynamic Routing Protocols in a broad sense. For information on specific protocols follow the below links:

Types of Dynamic Routing Protocol

  • Dynamic routing protocols can be divided into two main categories:
    • IGP (Interior Gateway Protocol)
      • used to share routes within a single autonomous system (AS), which is a single organization (i.e. a company)
    • EGP (Exterior Gateway Protocol)
      • used to share routes between different autonomous systems
  • Dynamic routing protocols can be further divided by Algorithm Type - the processes used by a given protocol to share route information and decide best routes
    • IGP - two algorithm types:
      • Distance Vector
        • RIP (Routing Information Protocol)
        • EIGRP (Enhanced Interior Gateway Routing Protocol)
      • Link State
        • OSPF (Open Shortest Path First)
        • IS-IS (Intermediate System to Intermediate System)
    • EGP - only one algorithm in use:
      • Path Vector
        • In fact, there is only one EGP currently used in modern networks: BGP (Border Gateway Protocol)

Distance Vector Routing Protocols

  • Distance Vector protocols were invented before link state protocols
  • Early examples are RIPv1 and Cisco’s proprietary protocol IGRP (which was updated to EIGRP)
  • Distance vector protocols operate by sending the following 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 actually know about the network beyond its neighbors. It only knows the information that its neighbors tell it.
  • Called ‘distance vector’ because the routers only learn the ‘distance’ (metric) and ‘vector’ (direction, the next-hop router) of each route.
  • when using a link state routing protocol, every router creates a ‘connectivity map’ of the network.
    • This map should be the same on each router
  • Each router advertises information about its interfaces (connected networks) to its neighbors. These advertisements are passed along to other routers, until all routers in the network develop the same map of the network.
  • Using the connectivity map, each router independently calculates the best routes to each destination.
  • Link state protocols obviously use more system resources (CPU and memory) from every router
    • Tend to be faster in reacting to changes in the network than distance vector protocols
    • (Personal conjecture) Unless it’s a very complicated network, it probably still isn’t all that computationally expensive, even considering routers typically aren’t very powerful.

Dynamic Routing Protocol Metrics

  • A router’s route table contains the best route to each destination network it knows about.
  • If a router using a dynamic routing protocol learns two different routes to the same destination, how does it determine which is ‘best’?
  • Uses the metric value of the routes to determine which is best. A lower metric = better.
  • Each routing protocol uses a different metric. See Per-protocol Metrics
  • If a router learns two (or more) routes via the same routing protocol to the same destination that have a metric tie (metric is the same) then both routes will be added to the routing table. Traffic will be load-balanced over both routes.
    • This is called Equal Cost Multi-Path (ECMP)
    • You can statically configure this, if you want

Per-protocol Metrics

IGPMetricInfo
RIPHop CountEach router in the path counts as one ‘hop.’ The total metric is the total number of hops to the destination. Links of all speeds are equal
ERGRPMetric based on bandwidth & delay (by default)Complex formula that can take into account many values. By default, the bandwidth of the slowest link in the route and the total delay of all links in the route are used.
OSPFCostThe cost of each link is calculated based on bandwidth. The total metric is the total cost of each link in the route.
IS-ISCostThe total metric is the total cost of each link in the route. The cost of each link is not automatically calculated by default. All links have a cost of 10 by default.

Administrative Distance

  • In most cases a company will only use a single IGP - usually OSPF or EIGRP
  • In rare cases they might use two. E.g. two companies connect their networks to share information, two different routing protocols might be in use.
  • Metric is used to compare routes learned via the same routing protocol
  • Different protocols use totally different metrics, so they can’t be compared
    • Not effectively, anyway. In theory you could, I guess, but the resulting network would likely strongly prefer routes from one protocol over another, even if the underlying infrastructure is identical
    • E.g. an OSPF route to 192.168.4.0/24 may have a metric of 30, while an EIGRP route to the same destination might have metric of 33280. Which route is better? We don’t actually know; they could even be the exact same, but the router would choose the OSPF route every time.
  • The Administrative Distance (AD) is used to determine which routing protocol is preferred.
    • A lower AD is preferred, and indicates that the routing protocol is considered more ‘trustworthy’ (more likely to select good routes).
  • You can manually change the AD of a routing protocol
    • You can also change the AD of a static route - useful if you want a static route to be less preferred than routes learned by a dynamic protocol (the AD must be higher than the protocol’s AD!)
      • Called a ‘floating static route’
Route protocol/typeAD
Directly connected0
Static1
External BGP (eBGP)20
EIGRP90
IGRP100
OSPF110
IS-IS115
RIP120
EIGRP (external)170
Internal BGP (iBGP)200
Unusable route255

Router ID (RID)

  • Some Dynamic Routing Protocols use Router IDs (EIGRP, OSPF)
  • RIDs are presented as four period-separated octets, like an IPv4 address
  • RIDs are usually selected by the following criteria, listed in order of priority:
    • Manual configuration
    • Highest IP of a loopback interface
    • Highest IP of a physical interface