Dynamic Routing
| Done |
|---|
Network Route: a route to a network/subnet. Also, the one with a prefix lower than /32
Host Route: route to a specific host → 2/32
A router form “adjacencies / neighbor relatioships / neighborships” with adjacent routers
If multiple routes to a destination are learned: if it has the same administrative distance, the lower metric will decide which one to use.
There are two types of dynamic routing protocols:
- IGP (Interior Gateway Protocol): This type is used inside a single autonomous system (AS),which is a single organization. For example: A company or a ISP.
- It is further divided into two Algorithm types (process it uses to share routes and choose the best one):
- Distance Vector:
- They were invented first. RIPv1 and Cisco’s proprietary IGRP (Later updated to EIGRP).
- In this algorithm, the router only have information that their neighbor provided. It is called this way because each router advertises the metric (Distance) and the next-hop router or direction (Vector).
- It is called “routing by rumour”
- Each router will advertise part or their whole routing table.
- Protocols:
- RIP (Routing Information Protocol)
- EIGRP (Enhanced Interior Gateway Routing Protocol)
- Link State:
- This algorith however, provides enough information for the router to build a “connectivity map”, that will be the same for all routers, that tells how the internetwork is arranged. Therefore, it doesn’t only know which neighbor to forward to a route, it knows how the entire path leads to the destination on the route.
- However, each router will process the “connectivity map” differently.
- This happens by routers sharing information about their interfaces (connected routes) to other routers.
- Altough CPU-heavy, they tend to reac faster to network changes.
- Protocols:
- OSPF (Open Shortest Path First)
- IS - IS (Intermediate System to Intermediate System)
- Distance Vector:
- It is further divided into two Algorithm types (process it uses to share routes and choose the best one):
- EGP (Exterior Gateway Protocol): It is used between autonomous systems.
- Path Vector:
- BGP (Border Gatway Protocol)
- Path Vector:

If a router learns two routes to the same destination with the same administrative distance and the same metric, both will be added to the routing table. Therefore, the traffic will be load-balanced between the two routes. → ECMP (Equal Cost Multi-Path)
| IGP | Metric | Description |
|---|---|---|
| RIP | Hop Count | Each router in the path counts as one “hop”. So the total path cost is the sum of all the routers (hops) to a destination. The downside is that it doesn`t take the speed into account, so all links are the same |
| EIGRP | Bandwidth and delay (by default) | Complex formula that can take many values. It uses the bandwidth of the slowest link in the route and the total delay of all links in the route. |
| OSPF | Cost | The cost of each link is calculated based on bandwidth. The total metric is calculated based on the sum of the cost of each link. |
| IS-IS | Cost | It associates a cost to each link, however it does not automatically calculate the cost of each link. Each link has a default cost of 10 (In the end, it is similar to RIP). |
| Routing Protocol | Administrative Distance |
|---|---|
| Directly Connected | 0 |
| Static Route | 1 |
| External BGP (eBGP) | 20 |
| EIGRP | 90 |
| IGRP | 100 |
| OSPF | 110 |
| IS-IS | 115 |
| RIP | 120 |
| EIGRP (External) | 170 |
| Internal BGP (iBGP) | 200 |
| Unusable route | 255 |
💡
The administrative distance of a route can be altered by adding it to the end of the ip route command.