Dynamic Routing Protocols

Dynamic routing protocols are the standard way of sharing routes between routers. They are “dynamic” because:

• they are automatically advertised by routers to their neighbours

• if some routes become unavailable or new ones are added, the topology will be automatically changed to reflect that and all routers will be made aware of it

Routers form “adjacencies” or “neighbour relationships” with other routers directly connected to them and share the routes they are aware of. Those can be direct routes (directly connected to the router) or “neighbour routes” (connected to other routers).

If multiple paths to a destination are learned, they are categorised by metric from lower to higher. Routes with the lowest cost are obviously preferred. If a route to a destination is learned via multiple routing protocols, the routing protocol with the lowest Administrative Distance (AD) is chosen:

__Route type______default AD_

  Connected        0
  Static           1
  EIGRP summary    5
  eBGP            20
  EIGRP           90
  OSPF           110
  IS-IS          115
  RIP            120
  EIGRP external 170
  iBGP           200
  Ignored        255

 

Looking at the table above, we can see that if the same route is learned via EIGRP and OSPF, the latter will be ignored due to its higher AD (90 vs 110). We can change the AD of a protocol if we deem it necessary though.

By the same token, static routes with a default AD of 1 will supersede those provided by any routing protocol. However, we can yet again increase the AD of a manually entered route to a value higher than other routing protocols to make dynamically learned routes preferred. If we do that, the static route becomes a floating route that we use as a fallback option.

Knowing that the AD decides the route chosen if multiple sources are available, we can guess that the metrics of the different protocols cannot be compared apples-to-apples. We shall cover later the metrics for RIP, EIGRP & OSPF.

There are two main categories of routing protocols:

IGP or Interior Gateway Protocol are used within a single Autonomous System (AS) and use “linkstate” (e.g. OSPF) or “distance vector” (RIP & EIGRP) algorithms.

EGP or Exterior Gateway Protocol are used to share routes with external AS and use “pathvector” algorithms. Examples: BGP.

In the next few pages we will focus only on IGP protocols and especially on RIP, EIGRP & OSPF (CCNA level). BGP is beyond scope.

Distance vector protocols (aka “routing by rumour”) operate by sending…


• their known destination networks

• and the metrics (or cost) to reach them

They do not know of any networks beyond those connected to their neighbours. They are called “distance vector” because only the “distance metric” and the “next-hop direction” are shared. Let’s look at a simple example:

R1 has not idea what router 192.168.4.0/24 is connected to or what is the full path to get there. It just knows that it is reachable via R2 with a cost of 2. Same for R3: it just knows it can get to it via R1 with a cost of 3. That’s all they need to know for routing to work.

Link-state protocols on the other hand create a “connectivity map” of the whole network. They advertise the networks in their own interfaces as well as the routes passed onto them by their neighbours. With that information, each router independently maps the best routes to each destination. If a given destination has 2 or more paths advertised by the same protocol with the same cost, they will be added to the routing table and the traffic will be load-balanced between them (ECMP = Equal Cost Multi-Path).

As we said before, the metric system each routing protocol uses is different:

IGP    Metric             Description
__________________________________________________________________________________________________________________
RIP    hop count          Each hop counts as one. Bandwidth & latency are assumed to be the same.
EIGRP  bandwidth & delay  Intricate formula but in summary: smallest bandwidth of route plus aggregate "delay".
OSPF   bandwidth          Only the bandwidth of all routers is counted.

As can be imagined, in networks with different bandwidths the RIP’s best routes might be totally inadequate. In the example below…

… RIP will assume that both paths from R1->R4 have an equal cost as they are the same number of hops away. So it will include both in the routing table and load balance the traffic between them. OSPF will not.

Previous : Static and floating routes             Next : RIP