When it comes to directing traffic towards its destination quickly and efficiently, there are few tools as good as dynamic routing protocols. Rather than spending years creating manual configurations for static routing protocols you can outsource the job to dynamic routing protocols to do the job for you! Dynamic routing protocols have been an important element of networks since the 1980s. One of the first and most important protocols was called the Routing Information Protocol (RIP).
RIP was originally released in 1988 designed to use an algorithm to help make routing decisions. Today RIP is one of the most famous routing protocols in the form of RIPv2. However, besides the RIP protocol, there have been a number of dynamic routing protocols released since 1982. We’ve listed these below:
- 1982 EGP
- 1985 IGRP
- 1988 RIPv1
- 1990 IS-IS
- 1991 OSPFv2
- 1992 EIGRP
- 1994 RIPv2
- 1995 BGP
- 1997 RIPng
- 1999 BGPv6 and OSPFv3
- 2000 IS-ISv6
The growing complexity of networks has led to the rise of new dynamic routing protocols away from the familiarity of RIP and RIPv2. Today larger networks are using the likes of Open Shortest Path First (OSPF) and Intermediate System-to-Intermediate System (IS-IS) to conduct routing on a larger scale than ever before.
- 1 What Are Dynamic Routing Protocols?
- 2 Why Do We Need Dynamic Routing Protocols?
- 3 Dynamic Routing Protocols
- 4 IGP and EGP
- 5 Classful and Classless Routing Protocols
- 6 RIPv2
- 7 EIGRP
- 8 OSPF
- 9 BGP
- 10 Dynamic Routing vs Static Routing
- 11 Dynamic Routing Protocols: High-Speed Routing
What Are Dynamic Routing Protocols?
Dynamic routing is where a protocol residing inside of a router automatically creates and updates a dynamic routing table. Essentially a routing protocol helps to exchange routing data between multiple routers. This data is used to build a routing table that details the best path for traffic to take.
This is a departure from static routing where an administrator would have to define this manually. One of the main advantages of dynamic routing protocols is that they allow you to avoid configuring traffic paths manually.
Dynamic routing protocols include RIPv2, EIGRP, OSPF, and BGP.
Dynamic routing protocols are comprised of:
- Data structures – Routing protocols use RAM to store tables and databases for their operations.
- Routing protocol messages – Dynamic routing protocols use messages to find nearby routers and exchange routing information. This helps to maintain up-to-date information on the network.
- Algorithms – Routing protocols use algorithms to collect routing information and to determine the best path for transfers.
Why Do We Need Dynamic Routing Protocols?
There are a number of reasons as to why organizations need to use dynamic routing protocols. Ultimately these all boil down to convenience. The main reason why is to keep your routing information up-to-date. This allows you to choose the best path to send data to its destination. If something goes wrong with the current path then the protocol can switch to a new path instead.
Because dynamic routing protocols are designed to find the best path to a network, this ensures that transfers are conducted efficiently. Even if your network topology changes, routing protocols will establish a new path so that your connection doesn’t suffer. Dynamic routing protocols are a welcome alternative to static routing because they require less administration. The tradeoff is that a router does have to dedicate some of its resources to running dynamic routing protocols.
Dynamic Routing Protocols
Before we look at the dynamic routing protocols in further detail, we’re going to look at an overview:
|Operation||Distance Vector Routing Protocols||Link State Routing Protocols||Path Vector|
EIGRP for IPv6
IS-IS for IPv6
|BGPv4 for IPv6
As you can see from the table, the operation of dynamic routing protocols can be broken down into three types; Distance vector protocol, link-state protocol, or path-vector protocol.
- Distance Vector Protocol – A type of routing protocol that uses distance and hop count to find the best forwarding path.
- Link State Routing Protocol – These protocols retain a map of the network and send multicast messages to connected devices on the links connected to the router.
- Path Vector Protocol – A routing protocol that maintains path information. Path vector protocols ensure that paths through the network stay loop free.
IGP and EGP
In this discussion, you’ll also see the terms Interior Gateway Protocols (IGPs) and Exterior Gateway Protocols (EGPs). IGPs are used for routing within an autonomous system and EGPs are used for routing in between autonomous systems. IGP Protocols include RIP, IGRP, EIGRP, OSPF, and IS-IS. In contrast, EGP is used by BGP which is the black sheep of the dynamic routing protocols (we’ll look at this in more detail below).
Classful and Classless Routing Protocols
Another key concept that crops up when examining dynamic routing protocols is classful and classless routing protocols. The difference between these two is that classful routing protocols don’t send subnet mask information with routing updates and classless routing protocols do include the subnet mask and network address in routing updates.
Most modern networks rely on classless routing protocols because they support more complex network topologies and variable-length subnet masks (VLSM). On the other hand, classful routing protocols can function within modern enterprise environments but they are more restricted in terms of when they can be used. For instance, they can’t be used when a network has been subnetted with multiple subnet masks.
RIPv2 is a distance-vector protocol that was released as an update to the original RIP protocol. The RIPv2 protocol was widely-used throughout the 1990s but has since fallen in popularity due to the increasing requirements of modern networking. The RIPv2 protocol has a maximum hop count of 15 devices which makes it unscalable. This means that RIPv2 is unable to connect to a router that is over 15 hops away.
In order to keep its performance stable, RIP uses a number of different timers. The timers used by RIP include a routing-update timer, a route-timeout timer, and route-flush timer. The routing-update timer is used to measure the time between routing updates. Nine times out of ten this interval is set to 30 seconds with a little extra time as the router resets.
This ensures that there is no network congestion if other routers try to update at the same time. RIPv2’s limitations have led to it being sidelined in favor of other protocols that offer greater path selection capabilities. Today the only networks that use RIPv2 for route selection are networks that are old or running old hardware.
How to Configure RIPv2
Given that RIPv2 is one of the simplest dynamic routing protocols it is considerably easy to configure. To configure RIPv2 you need to:
- Enable RIP with the router rip global configuration command
- Tell the router to use RIPv2 with the ‘version’ 2 command
At this point, we need to let RIP know the networks to advertise through the use of additional network commands. Now you use the network command to specify which interfaces will take part in the routing process. If you have two routers with subnets that are directly connected then you will need to make sure RIP is enabled on both routers. Once RIP is enabled you want to advertise it with the network command.
- On the first router, go to global configuration mode and use the router rip command to activate RIP. Next change the version to RIPv2 with the version 2 command.
- Now use the network 10.0.0.0 command to add the Fa0/1 interface on the first router to the routing process. This command will cover every interface starting with 10.
You now need to add the link between the two routers to the routing process by using the following command:
network statement, network 172.16.0.0
Your configuration will look like the following:
R1 (config) #router rip R1 (config-router) #version 2 R1 (config-router) #network 10.0.0.0 R1 (config-router) #network 172.16.0.0 R1 (config-router) #
(This will be slightly different on Router 2 with a different network number for the subnet).
You can check that the routing process has been successful by using the
show ip route command.
EIGRP or Enhanced Interior Gateway Routing Protocol is a hybrid distance vector protocol used to automate routing decisions. EIGRP is a superior version of RIPv2 that supports scalability and minimizes network traffic. It only consumes a small number of network resources making it a good choice for both small and large networks. It also offers extremely fast convergence times when the network topology is changed.
EIGRP offers support for class routing, VLSM, and load balancing. It is important to note that all routers with EIGRP will be Cisco routers because this is a Cisco protocol. Routers running EIGRP need to become neighbors before they can exchange routing information. EIGRP-enabled routers store information in a neighbor table, topology table, and routing table. When it comes to sending messages EIGRP uses Reliable Transport Protocol (RTP).
How EIGRP establishes neighbor relationships is key to how this protocol works. As mentioned above, EIGRP needs to be neighbors with other routers before it can exchange any information. Relationships are established by routers sending packets every few seconds. ON LAN interfaces this is every five seconds but on WAN interfaces this is a 60-second interval. Packets are sent out through 188.8.131.52 (a multicast address).
These initiation packets include an Autonomous System Number (ASN), subnet number, and K values. Once the relationship has been established, these packets are still sent every few seconds to make sure the relationship is still active. If there is no response, the router uses a hold-down timer to ascertain when the relationship was terminated. The hold-down timer is a timer around three times the interval of a hello packet and is used to measure when the relationship has terminated.
However, EIGRP is not without a significant fault. Originally EIGRP was only available on Cisco hardware. While this has since changed you have to be careful to check that your hardware supports the use of EIGRP. This lack of clarity has lead to EIGRP waning in popularity.
How to Configure EIGRP
While EIGRP isn’t without its shortcomings it does offer a simple configuration process. The first thing you need to do is to access your router and go into global configuration mode. Once you’ve done this you want to create routing instance for EIGRP with the
router eigrp autonomous-system-number command. The system number means that neighbors with matching numbers will communicate with the device.
At this point, you need to advertise the network you want to route by using the
network 192.168.1.0 command. This means that any interface using this network will be advertised with EIGRP.
It is worth noting that EIGRP has automatic summarization enabled by default so that if no interface is configured on your router, via the route you specified, then a summary route will be used instead. In many cases, this won’t be what you want so you need to enter the
no auto-summary command.
Open Shortest Path First (OSPF) is an Interior Gateway Protocol (IGP) that acts as an alternative to EIGRP. OSPF is an excellent choice for scalable networks because it has no limits on hop count. This gives it the reach to function well on larger networks. OSPF’s reach has led to it being the go-to dynamic routing protocol on modern networks. OSPF has a reputation as a protocol that it is quite difficult to set up. This is certainly true when compared to EIGRP but it isn’t too difficult.
Like other dynamic routing protocols OSPF uses a hello packet system to identify neighbor devices running OSPF. The hello packet includes the following information:
- Version number
- Packet length
- Router ID
- Area ID
- Network Mask
- Rtr Pr
- Designated Router
- Backup Designated Router
If OSPF is detected on a neighboring device then the OSPF devices attempts to form an adjacency with the device. Once this has been established, the devices exchange routing information through Link-State Advertisements (LSA).
Hello packets are sent out to nearby routers regularly to establish a relationship with nearby devices. The intention is to establish bidirectional communication. Hello packets achieve this by listing the address of the destination router so that the receiving router knows that there is bidirectional communication.
How to Configure OSPF
The process for configuring OSPF is relatively simple. In order to configure OSPF you first need to enable OSPF on your router. To do this you need to use the
router ospf PROCESS-ID global configuration command. Once you’ve done this you need to specify which interfaces OSPF is going to be running on and the networks it’s going to advertise. You can do this by using the network
IP_ADDRESS WILDCARD_MASK AREA_ID command within the OSPF configuration mode.
If you’re attempting to configure OSPF on two neighbor routers then you need to specify what network is going to be advertised. You want to do this by entering the following network commands on both routers:
R1 (config-router) #router ospf 1 R1 (config-router) #network 10.0.1.0.0.0.0.255 area 0 R1 (config-router #network 172.16.0.0.0.0.255.255 area 0 R2 (config) #router ospf 1 R2 (config-router) #network 192.168.0.0.0.0.0.255 area 0 R2 (config-router) #network 172.16.0.0.0.0.255.255 area 0
Note that the network commands entered include the connected subnets of each router. If you want to check that the routers have become neighbors then you can use the show ip ospf neighbors command:
R1#show ip ospf neighbor
Likewise, you can check that the routing information has been updated by using the show ip route command. It is useful to remember that any route marked with an O is an OSPF route.
BGP or Border Gateway Protocol (BGP) is the dark horse of the dynamic routing protocols. RIPv2, EIGRP, and OSPF are all IGPs whereas BGP is an Exterior Gateway Protocol (EGP). IGPs are used on internal networks whereas EGPs are used to connect separate networks and route traffic across the internet. BGP is a layer 4 protocol which is more scalable than all other available routing protocols. However, BGP isn’t relevant for everyone. If you’re working on a smaller network then you’re unlikely to need the internet traffic routing ability of this protocol.
When routing over the internet, BGP is used instead of static routing because BGP can automatically failover if a link fails. Similarly, BGP can use its routing table to find the best internet path to its destination. The main drawback of BGP is that it is more complex than its counterparts.
How to Configure BGP
To configure two routers with BGP we first need to configure interface fa0/0 and loopback0 on both routers. We can do that by entering the following:
R1 (config) #interface fastethernet0/0 R1 (config-if) #ip address 184.108.40.206.255.255.255.0 R1 (config-if) #no shutdown R1 (config-if) #interface loopback 0 R1 (config-if) #ip address 220.127.116.11 255.255.255.0
R2 (config) #interface fastethernet0/0 R2 (config-if) #ip address 18.104.22.168.255.255.255.255.0 R2 (config-if) #no shutdown R2 (config-if) #interface loopback 0 R2 (config-if) #ip address 22.214.171.124 255.255.255.0
Next, you’ll need to configure the first router with the router
bgp command and keep the same BGP AS number that is used by the router. The second line refers to the IP address of the neighbor and includes the BGP AS. On Router 1 enter the following:
R1 (config) #router bgp 1 R1 (config-router) #neighbor 126.96.36.199 remote-as 2
After you’ve entered this you should see a message telling you that the neighbor is up (this lets you know the adjacency is setup).
Once this is done it is time to make the routers exchange routes with each other. To do this you need to advertise the loopback interface to Router 2. To do this go to Router 1 and enter the following command:
R1(config router) #network 188.8.131.52 mask 255.255.255.0
Note that you have to use the subnet mask in order to advertise the route correctly. Once you’ve done this the routing tables will be updated with a new route.
Dynamic Routing vs Static Routing
When discussing dynamic routing protocols the subject of static routing protocols often comes up. However, there is a distinct difference between the two. In static routing, you manually configure a router to send traffic to the destination via a configured path. In dynamic routing, you use a protocol such as OSPF, EIGRP, or BGP which figures out the paths it should travel on its own.
Dynamic routing adjusts to the needs of the network and configures routes on its own without your having to intervene. The main advantage of this is that you don’t have to go through the process of configuring routes the way you do when using static routing. This frees up time to concentrate on other things.
Dynamic Routing Protocols: High-Speed Routing
Dynamic routing protocols are a versatile bunch and have a multitude of ways to learn about network paths. The distinction between the protocols can be difficult to get your head around, but it is important to remember that they all have the same end goal in mind: to route the network. Whether they do this inside the network (like RIPv2) or outside of the network (like BGP), they are attempting to pull the best information to navigate the network and discover remote networks.
The automatic efforts of dynamic routing protocols make them the perfect replacement for static routing protocols. This is because administrators don’t have to continually configure them, and dynamic routing protocols keep routing information up-to-date without additional intervention. Even if the topology changes routing protocols keep the routers informed about what is going on.