Static and Dynamic Routing
Static or Dynamic?
As we all know, Routing can be either Static or Dynamic, but which should be used? The simple answer is both! Static and Dynamic Routing are not mutually exclusive, and most of the time they go hand in hand. You’ll usually find a combination of both in a Routing Table.
Static Routes
Static routes are usually used in the following scenarios:
- Configured as a default route forwarding packets to an ISP (Internet Service Provider).
- For Routes outside the Routing Domain and not learned by any Dynamic Routing Protocol.
- When one wants to explicitly define a path for a specific network.
- For Routing between Stub Networks.
Static Routes are useful for smaller networks with just one single path to an outside network. Such routes are also able to provide security in a larger network for specific types of traffic, and/or links to other networks that require more control.
Dynamic Routing Protocols
Dynamic Routing Protocols help eliminate a considerable part of the process of configuring and maintaining Static Routes. Dynamic Routing Protocols are implemented in all types of networks which include more than just a few routers. Such protocols are highly scalable and are able to automatically detect a change in the network and re-calculate the best routes when required.
Dynamic routing protocols are usually used in the following scenarios:
- Networks which include more than just a few Routers.
- When a change in topology requires the network to automatically detect and re-calculate another path.
- For situations where scalability is required as the network grows thanks to their ability to discover new networks.
Below is a representation of some of the differences between Static and Dynamic Routing:
| Feature | Static | Dynamic |
|---|---|---|
| Configuration complexity | Increases with network size | Independent of network size |
| Topology changes | Configuration Updates required | Automatically adapts to topology changes |
| Scalability | Will do for simple topologies | Suitable for simple to complex network topologies |
| Security | Security is inherent | Security must be configured |
| Resource Usage | No additional resources required | Uses CPU, memory, and link bandwidth |
| Path Predictability | Explicitly defined by the administrator | Explicitly defined by the administrator |
Dynamic Routing Evolution
Dynamic Routing Protocols has been used in networking since the late 1980s. One of the first Dynamic Routing Protocols was RIP. RIPv1 was released in 1988, but some of its basic algorithms were used on the ARPANET (Advanced Research Projects Agency Network) in 1969.
Of course, networks became more complex over the years and new Routing Protocols emerged. The RIP protocol was in-fact updated to Version 2 (RIPv2), to be able to satisfy growth in networks.
After a while RIPv2 still wasn’t able to scale to larger networks as the ones we have today, therefore two advanced routing protocols were created, being OSPF (Open Shortest Path First) and IS-IS (Intermediate System-to-Intermediate System). Cisco developed what’s known as IGRP (Interior Gateway Routing Protocol), which was later replaces by EIGRP (Enhanced IGRP), which scales really well in large scale networks.
Also, there was the need to connect the different Routing Domains of different organizations and provide Routing between them. BGP (Border Gateway Protocol), which is the successor of EGP (Exterior Gateway Protocol) is commonly used between ISPs. BGP is also used between the ISP and private organizations at times to exchange Routing Information.
The following portrays a brief timeline of when various protocols where introduced
| Date | Protocol |
|---|---|
| 1982 | EGP |
| 1985 | IGRP |
| 1988 | RIPv1 |
| 1990 | IS-IS |
| 1991 | OSPFv2 |
| 1992 | EIGRP |
| 1994 | RIPv2 |
| 1995 | BGP |
| 1997 | RIPng |
| 1998 | BGP-MP |
| 1999 | OSPFv3 |
| 2008 | IS-ISv6 |
Since of course networks started to operate using IPv6 communication, newer versions of such Routing Protocols were required and had been developed as shown below.
Such table classifies the present Routing Protocols. IGPs (Interior Gateway Protocols), are routing protocols used to exchange routing information within a Routing Domain.
There is only one EGP and it is BGP. BGP is used to exchange Routing Information between different organizations, widely referred to as “AS” (Autonomous Systems). BGP is used by ISPs to route packets over the internet.
Distance Vector, Link-State, and Path-Vector Routing Protocols refer to the type of Routing Algorithm used to determine the best path.
Dynamic Routing Protocol Concepts
A Routing Protocol is basically a set of processes, messages, and algorithms that are used to exchange routing information and fill in the Routing Table with a list of best paths. The primary purposes of a Dynamic Routing Protocol include the following:
- Discovery of remote networks
- Maintaining up-to-date Routing Information
- Choosing the best path to destination networks
- Ability to find a new best path if the current path is no longer available
The primary components of a Dynamic Routing Protocol include the following:
| Data Structures |
| Routing Protocols typically use tables or databases for their operations. Such information is stored in the RAM |
| Routing Protocol Messages |
| Routing Protocols use different types of messages to discover Neighbouring Routers, exchange Routing Information, and other tasks to learn and maintain accurate information about the network. |
| Algorithm |
| An Algorithm is a list of steps used to complete a task. Routing Protocols use these algorithms to facilitate Routing Information and for Best Path Determination. |
Routing Protocols allow Routers to dynamically share information about Remote Networks and automatically offer such information to their own Routing Tables.
Routing Protocols determine the best path/route to each network. That Route is then offered to the Routing Table.
If there is no other Routing Source having a lower Administrative Distance, then the Route will be enlisted in the Routing Table.
An important benefit of Dynamic Routing Protocols is that Routers exchange Routing information when there is a topology change. This exchange allows Routers to automatically learn about new networks and find alternate paths when there is a link failure to a current network.
Best Path
Before a Route to a Remote Network is offered to the Routing Table, the Dynamic Routing Protocol must primarily determine the best path/route to that particular network. Finding the best path may require the evaluation of multiple routes to the same destination network and selecting the best or shortest path to reach such a network. If multiple paths to the same network exist, each path uses a different exit interface on the Router to reach that network.
The best path will be elected by a Routing Protocol based on the value or metric it uses to determine the distance to reach a network. A metric is a quantitative value used to measure the distance to a network. The Route to a network is the one with the lowest metric.
Dynamic Routing Protocols usually use their own rules and metrics to properly build and maintain Routing Tables. The Routing algorithm generates a value or a metric for each path through the network. Metrics can be based on either a single or multiple characteristics of a path. Some Routing Protocols are able to base Route Selection on multiple metrics and combining them in one single metric.
Below is a list of common Dynamic Routing Protocols and their respective metrics:
| RIP (Routing Information Protocol) |
|---|
| The metric used is “Hop Count”. |
| Each router along the path adds 1 “Hop” to the “Hop Count”. |
| The maximum of Hops allowed is 15. |
| OSPF (Open Shortest Path First) |
|---|
| The metric used is “Cost”, which is based on the cumulative bandwidth from source to destination. |
| Faster links will be assigned “lower costs” when compared to slower links (higher costs) |
| EIGRP (Enhanced Interior Gateway Routing Protocol) |
|---|
| The metric is calculated based on the slowest bandwidth and delay values. |
| This could also include “Load” and “Reliability” into the metric calculation |
Load Balancing
A Routing Table is allowed to have 2 or more paths with the same identical metrics to the same destination network.
When this happens and a Router has 2 or more paths to a destination with equal cost metrics, the Router will forward the packets using both paths equally at the same time. This is known as “Equal Cost Load Balancing”. The Routing Table will still contain a single destination network but will have multiple exit interfaces, in other words, it will have an exit interface for each equal cost path. The Router will then forward packets using the multiple exit interfaces listed in the Routing Table.
Load Balancing increases the reliability and performance of a network drastically if configured properly.
Equal Cost Load Balancing is implemented automatically by Dynamic Routing Protocols. It is enabled with Static routes when there are multiple Static Routes to the same destination network using different next-hop Routers.
[NOTE] Only EIGRP supports “Unequal Cost” load balancing.