Dynamic Routing Protocol Explained

Dynamic routing is a network routing technique that automatically updates the routing tables in a network as changes occur, such as changes in network topology or link availability. In dynamic routing, routers exchange information about the state of the network and use that information to determine the best path for forwarding data packets. This article gives details about dynamic routing protocols.

Feb 25, 2023 - 15:22
Dynamic Routing Protocol Explained
Dynamic Routing

Dynamic routing protocols are used to facilitate the exchange of routing information between routers. These protocols allow routers to communicate with each other and share information about network topology, link cost, and other relevant factors.

When a router receives information about changes in the network, such as a new link being added or an existing link going down, it updates its routing table to reflect the new information. The router then uses this updated routing table to determine the best path for forwarding data packets.

The key advantage of dynamic routing is that it allows networks to adapt to changing conditions in real-time. As new links are added or existing links fail, routers can quickly and automatically adjust their routing tables to ensure that data packets are sent along the most efficient path.


Dynamic Routing Protocols

Dynamic routing protocols can be divided into two main categories:

  • IGP (Interior Gateway Protocol)
  • EGP (Exterior Gateway Protocol)

And dynamic routing protocols can be divided to sub-categories according to alghorithm types as well:

  • Distance Vector
    • RIP (Routing Information Protocol)
    • EIGRP (Enhanced Interior Gateway Routing Protocol)
  • Link State
    • OSPF (Open Shortest Path First)
    • IS-IS (Intermediate System to Indermediate System
  • Path Vector
    • BGP (Border Gateway Protocol)



1. Interior Gateway Protocol (IGP)

IGP is a type of routing protocol used by routers within an autonomous system, which is a collection of networks that are controlled by a single organization. The purpose of an IGP is to enable routers within an autonomous system to share information about network topology and to determine the best path for forwarding data packets between different networks within the AS.

2. Exterior Gateway Protocol (EGP)

EGP is a type of routing protocol used to exchange routing information between routers in different autonomous systems or networks. EGP is used to enable communication between routers that are not directly connected, allowing them to exchange information about the best paths for forwarding data packets to their respective networks.

EGP works by exchanging routing updates between routers in different autonomous systems, and uses a distance-vector algorithm to calculate the best path to each destination network. EGP routers exchange information about the cost and status of their connections to other networks, and use this information to construct a routing table that specifies the best path to each destination network.



Distance Vector (Routing - by - Rumor)

Distance vector protocols use a simple algorithm to determine the best path for forwarding data packets. The algorithm calculates the distance to each network in the network topology based on the information received from neighboring routers, and chooses the path with the lowest total distance.

The distance metric used by distance vector protocols is often the number of network hops, or the number of routers that a data packet must pass through to reach its destination. This metric is known as the hop count.

  • Routing Information Protocol:

    RIP works by using a hop count as the distance metric, and routers periodically send routing updates to their neighbors to inform them of changes in network topology.

    RIP has two versions: RIPv1 and RIPv2. The main differences between the two versions are:

    1. Classful vs. Classless: RIPv1 is a classful protocol, which means that it does not support variable-length subnet masks (VLSM). RIPv2 is a classless protocol, which means that it supports VLSM and can accommodate networks with different subnet mask lengths.

    2. Authentication: RIPv1 does not support authentication, which makes it vulnerable to attacks such as spoofing and routing table poisoning. RIPv2 supports authentication, which provides greater security for network routing.

    3. Multicast vs. Unicast: RIPv1 uses broadcast to send routing updates, which can create unnecessary traffic on the network. RIPv2 uses multicast to send routing updates, which reduces network traffic and conserves bandwidth.

    4. Metric: RIPv1 uses hop count as the only metric for determining the best path, which can result in suboptimal routing. RIPv2 supports multiple metrics, including hop count, bandwidth, delay, reliability, and load, which enables more efficient and effective routing.

    So, RIPv2 is an improved version of RIPv1 that provides better support for modern networking technologies and offers greater flexibility, security, and efficiency in network routing. However, both versions of RIP are considered to be legacy protocols, and are less commonly used today.

* RIP also has a version named as RIPng (RIP Next Generation) and it is used for IPv6 dynamic routing.

  • Enhanced Interior Gateway Routing Protocol (Only supported on Cisco Routers)

EIGRP is a hybrid routing protocol that is used by routers in a computer network to determine the best path for forwarding data packets. But you may always see EIGRP classified as distance-vector. EIGRP is designed to provide faster convergence and better scalability than traditional distance vector protocols.

EIGRP works by using a composite metric that takes into account several factors, including bandwidth, delay, reliability, and load, to determine the best path for data packets. EIGRP routers exchange routing updates only when there is a change in the network topology, which helps to reduce network traffic and conserve bandwidth.

One of the best sides of EIGRP is its fast convergence time, which means that it can quickly adapt to changes in network topology and route data packets along the most efficient path. EIGRP also supports load balancing, which enables routers to distribute traffic across multiple paths to improve network performance. Additionally, EIGRP supports authentication, which helps to improve network security.



Link State (Shortest Path First)

Link-state protocols are based on the concept of flooding, in which routers exchange information about the state of their links with their neighbors, and then use this information to build a complete map of the network topology.

In a link-state protocol, each router maintains a database of information about the state of its links and the state of its neighbors' links. This information includes the cost of each link, the status of each link (up or down), and any other relevant information about the link. When a change occurs in the network topology, such as a link going down or a new link being added, the affected routers flood this information to their neighbors.

Each router then uses this information to build a complete map of the network topology, and calculates the shortest path to each destination network using an algorithm such as Dijkstra's algorithm. The router then uses this information to construct a routing table, which specifies the best path to each destination network.

Link-state protocols are known for their ability to converge quickly and efficiently, and for their ability to support large and complex networks. However, they can be more complex and resource-intensive to implement and manage compared to distance-vector protocols.

Link state protocols are widely used in enterprise networks and service provider networks, where fast convergence and scalability are critical requirements.

  • Open Shortest Path First:

OSPF is widely used in large enterprise networks and service provider networks. OSPF uses a link-state database and Dijkstra's algorithm to determine the best path for forwarding data packets, and is designed to provide fast convergence and scalability.

Advantages:

  1. Fast convergence: OSPF is known for its fast convergence time, which enables it to quickly adapt to changes in network topology and route data packets along the most efficient path.

  2. Scalability: OSPF can support large and complex networks, including networks with multiple areas, and can efficiently route traffic across different network types and topologies.

  3. Flexibility: OSPF supports a variety of network topologies, including point-to-point, broadcast, and non-broadcast networks, and can support different types of traffic, including multicast traffic.

  4. Security: OSPF supports authentication, which helps to prevent unauthorized access to the network and protect against attacks such as spoofing and routing table poisoning.

Disadvantages:

  1. Complexity: OSPF can be more complex to configure and manage than other routing protocols, and may require more advanced networking skills and knowledge.

  2. Resource-intensive: OSPF can be more resource-intensive than other routing protocols, particularly in large networks, and may require more processing power and memory.

  3. Proprietary extensions: Although OSPF is an open standard, some vendors have added proprietary extensions to the protocol, which can limit interoperability with other networking devices and protocols.

  • Intermediate System to Intermediate System

IS-IS is similar in many ways to OSPF protocol, but is often used in service provider networks and telecommunications networks.

IS-IS uses a hierarchical design, in which routers are organized into areas, with each area having its own link-state database and set of routers. This design helps to reduce the amount of network traffic and conserve bandwidth, and allows for more efficient routing and faster convergence.

IS-IS uses Dijkstra's algorithm like OSPF to calculate the shortest path to each destination network, and uses a metric based on the cost of each link to determine the best path. IS-IS also supports features such as authentication, load balancing, and route summarization.

One key difference between IS-IS and OSPF is the way that they handle network addresses. OSPF uses IP addresses to identify network links, while IS-IS uses a hierarchical addressing scheme called Intermediate System to Intermediate System Addressing (IS-IS addressing)



Border Gateway Protocol (BGP)

BGP is a standardized routing protocol used to exchange routing information between routers in different autonomous systems (ASes) or networks. BGP is used in the Internet to enable communication between routers that are not directly connected, allowing them to exchange information about the best paths for forwarding data packets to their respective networks.

BGP is a path-vector protocol that uses a set of rules called policies to determine the best path for forwarding data packets to their destination. BGP routers exchange information about the cost and status of their connections to other networks, and use this information to construct a routing table that specifies the best path to each destination network.

Advantages:

  1. Scalability: BGP is designed to scale to support the large and complex networks of the Internet, and can efficiently route traffic across different network types and topologies.

  2. Flexibility: BGP is highly customizable and supports a wide range of routing policies, allowing network administrators to tailor routing decisions to their specific needs.

  3. Security: BGP supports authentication and encryption, which helps to prevent unauthorized access to the network and protect against attacks such as spoofing and routing table poisoning.

  4. Redundancy: BGP supports multiple paths to the same destination network, allowing for redundancy and improved network reliability.

Disadvantages:

  1. Complexity: BGP can be complex to configure and manage, particularly for large networks with complex routing policies.

  2. Slow convergence: BGP can be slower to converge than some other routing protocols, particularly in networks with large numbers of routers or complex routing policies.

  3. Vulnerability to attacks: BGP is vulnerable to attacks such as route hijacking and route leaking, which can result in traffic being redirected to unauthorized destinations.




Which one to choose?

Factors to consider:

  1. Network size: Different routing protocols are better suited for different network sizes. For small networks, simpler protocols such as RIP may be sufficient, while larger networks may require more complex protocols such as OSPF or BGP.

  2. Network topology: The network topology can also influence the choice of routing protocol. For example, protocols like OSPF or IS-IS are better suited for networks with complex topologies, while protocols like RIP may be more appropriate for simpler topologies.

  3. Performance requirements: Some routing protocols may provide better performance or faster convergence times than others, depending on the specific requirements of the network. For example, protocols like EIGRP are designed to provide fast convergence times, while BGP is optimized for scalability and large-scale routing.

  4. Security needs: Some routing protocols offer additional security features, such as authentication and encryption, to protect against unauthorized access and attacks. For example, BGP supports authentication and encryption, while RIP does not.

  5. Available resources: The choice of routing protocol may also depend on the available resources, such as router memory and processing power. Some protocols may require more resources than others, so it is important to choose a protocol that can be supported by the available hardware and software.



What if there are multiple routes?

Factors that routers consider when selecting a path:

Administrative Distance

  1. Administrative distance: As mentioned earlier, administrative distance is a measure of the trustworthiness or reliability of a routing protocol or source. When a router receives multiple routes to the same destination, it selects the route with the lowest administrative distance.

  2. Metric or cost: Each routing protocol uses a metric or cost to determine the optimal path to a destination network. The metric is typically based on factors such as bandwidth, delay, hop count, and reliability. When a router receives multiple routes to the same destination with different metrics, it selects the route with the lowest metric.

  3. Path characteristics: Routers may also consider other factors when selecting a path, such as QoS requirements, the type of traffic being transmitted, and the availability of resources along the path.

** In most cases, routers use a combination of these factors to select the best path to a destination network. Once a path is selected, the router installs the route in its routing table and uses it to forward packets to the destination network. If the selected path becomes unavailable or fails, the router will automatically select an alternative path from its available routing information.



BONUS - Static vs. Dynamic Routing

  1. Configuration: Static routes are manually configured on each router, while dynamic routes are learned automatically through a routing protocol. This means that static routes require more manual configuration and maintenance, while dynamic routes can be more easily adapted to changes in the network topology.

  2. Scalability: Dynamic routing protocols are more scalable than static routing because they can automatically adjust to changes in the network topology. With static routing, each router must be manually configured with the appropriate routes, which can become impractical in larger networks.

  3. Convergence time: Dynamic routing protocols typically have faster convergence times than static routing. This is because dynamic routing protocols can quickly adapt to changes in the network topology, while static routing requires manual intervention to update the routing tables.

  4. Flexibility: Dynamic routing is more flexible than static routing because it can adapt to changes in the network topology. With static routing, each router must be manually configured with the appropriate routes, which can limit flexibility.

  5. Control: Static routing gives network administrators more control over the routing process because routes are manually configured. With dynamic routing, routes are learned automatically through a routing protocol, which can be less predictable and require more monitoring.

Overall, dynamic routing is generally preferred in larger, more complex networks because it is more scalable, flexible, and adaptable to changes in the network topology. Static routing may be more appropriate in smaller networks where the topology is relatively stable and changes are infrequent.



Configuring Routers:

Configuring Dynamic Routing (cisco.com)

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow