🌐 What is Dynamic Routing ?

 

📖 Introduction

In networking, as the size of the network increases and multiple routers are connected together, it becomes difficult to manually configure and manage all routes, and in such situations, dynamic routing is used because it allows routers to automatically learn and update routes, which makes communication between networks easier and more efficient.

 

📖 Definition

Dynamic routing is a method of routing in which routers automatically learn, update, and maintain routing information by communicating with other routers using routing protocols so that data packets can be forwarded through the best possible path without manual configuration of each route.

 

🧠 Simple Meaning

👉 Dynamic routing means:
Routers automatically find and update the best path to send data between networks.

 

🔍 Concept Explanation

Dynamic routing works on the idea that routers should not depend on manual configuration for every route, and instead, they should be able to exchange information with other routers and make decisions on their own.

  • Routers communicate with each other 
  • They share network information 
  • They update routing tables automatically 

👉 This makes the network smart and self-managing.

 

📌 How Dynamic Routing Works

In dynamic routing, routers continuously exchange information with each other using routing protocols, and based on this information, they build and update their routing tables, and whenever a packet arrives, the router checks the destination IP address and selects the best path available, and if there is any change in the network such as a link failure or addition of a new network, the routers automatically update their routing tables and adjust the path accordingly.

 

🔄 Step-by-Step Working

 

1️⃣ Neighbor Discovery

Routers identify other routers in the network and form connections with them.

 

2️⃣ Exchange of Routing Information

Routers share details about networks they know using routing protocols.

 

3️⃣ Routing Table Creation

Each router builds its routing table automatically based on received information.

 

4️⃣ Best Path Selection

Router selects the best path using metrics like shortest path or least cost.

 

5️⃣ Packet Forwarding

Router forwards packets based on the best available route.

 

6️⃣ Automatic Updates

If any network change occurs, routers automatically update their routing tables.

 

📡 Routing Protocols

Dynamic routing uses protocols such as:

  • RIP (Routing Information Protocol) 
  • OSPF (Open Shortest Path First) 
  • EIGRP (Enhanced Interior Gateway Routing Protocol) 

👉 These protocols help routers communicate and share routing information.

 

✨ Key Features of Dynamic Routing

  • Routes are learned automatically 
  • Routers communicate with each other 
  • Routing tables are updated automatically 
  • Can find alternate paths if one fails 
  • Suitable for large and complex networks 

 

✅ Advantages of Dynamic Routing

  • It reduces manual work because routes are learned automatically 
  • It is suitable for large networks where manual configuration is difficult 
  • It automatically adapts to network changes 
  • It improves reliability by finding alternate paths 
  • It makes network management easier 

 

❌ Disadvantages of Dynamic Routing

  • It is more complex compared to static routing 
  • It uses more CPU, memory, and bandwidth 
  • It requires understanding of routing protocols 
  • It may take some time to update routes 
  • It is less secure due to route sharing

 

 

RIP (Routing Information Protocol)

 

🌐 Introduction

In dynamic routing, routers need a way to communicate with each other so that they can share information about different networks, and for this purpose, routing protocols are used, among which RIP is one of the most basic and widely used protocols because it is simple to understand and easy to configure.

 

📖 Definition

RIP (Routing Information Protocol) is a dynamic routing protocol that allows routers to automatically share routing information and determine the best path based on the number of hops required to reach a destination network.

 

🧠 Simple Meaning

👉 RIP means:
Routers share their routes with each other and choose the path with the least number of hops.

 

🔍 Concept Explanation

RIP works on a simple idea where routers exchange their routing tables with neighboring routers at regular intervals, and based on this shared information, each router updates its own routing table and selects the best path to reach different networks.

  • Routers send updates to neighbors 
  • Neighbors receive and update routes 
  • Best path is selected automatically 

👉 This process keeps repeating continuously.

 

📌 What is Hop Count?

👉 Hop count means the number of routers a packet passes through to reach the destination network.

 

📊 Example

  • Direct network → Hop count = 0 
  • Through 1 router → Hop count = 1 
  • Through 2 routers → Hop count = 2 

👉 RIP always selects the path with minimum hop count.

 

⚠️ Maximum Hop Count Limit

  • Maximum hop count in RIP = 15 
  • If hop count becomes 16 → Network is considered unreachable 

👉 This is why RIP is used only in small networks.

 

🔄 How RIP Works

When RIP is enabled, routers continuously share routing information with each other every 30 seconds, and based on the received updates, routers modify their routing tables, and if a route becomes unavailable, it is removed after some time, which helps in maintaining updated and accurate routing information.

 

📡 Versions of RIP

 

1️⃣ RIP Version 1 (RIPv1)

  • Classful routing protocol 
  • Does not send subnet mask 
  • Less efficient 

 

2️⃣ RIP Version 2 (RIPv2)

  • Classless routing protocol 
  • Sends subnet mask 
  • Supports VLSM (Variable Length Subnet Masking) 
  • More efficient and commonly used 

 

✨ Key Features of RIP

  • Uses hop count as metric 
  • Simple and easy to configure 
  • Sends updates every 30 seconds 
  • Maximum 15 hops allowed 
  • Works best in small networks 

 

✅ Advantages of RIP

  • Easy to understand and configure 
  • Suitable for beginners 
  • Low complexity 
  • Automatically updates routes 
  • Works well in small networks 

 

❌ Disadvantages of RIP

  • Not suitable for large networks due to hop limit 
  • Slow convergence (takes time to update routes) 
  • Less efficient compared to advanced protocols 
  • Can create unnecessary network traffic due to frequent updates 

 

⚠️ Important Understanding

RIP is a very basic routing protocol that is mainly used for learning and small network setups, but it is not preferred in large modern networks because of its limitations like hop count restriction and slow performance.


 

 

🖧 Dynamic Routing – RIP Configuration (Syntax & Steps)

 

📖 Introduction

After understanding RIP as a dynamic routing protocol, the next important step is to configure RIP on routers so that they can automatically share routing information and learn routes from each other, and this configuration is done using Cisco IOS commands where we enable RIP and specify the networks that need to participate in routing.

 

📌 RIP Configuration Syntax

The basic syntax to configure RIP is:

router rip
network <network-address>

 

🔍 Explanation of Syntax

  • router rip → Enables RIP routing protocol on the router 
  • network <network-address> → Specifies the networks that will participate in RIP 

👉 These networks will:

  • Be advertised to other routers 
  • Receive updates from other routers 

 

⚠️ Important Point

In RIP, we always use the network address, not the IP address of the interface.

 

📊 Example

router rip
network 192.168.1.0
network 192.168.2.0

👉 Meaning:

  • Router will advertise both networks 
  • Router will learn routes for these networks 

 

🔄 Enabling RIP Version 2 (Recommended)

router rip
version 2
network 192.168.1.0
network 192.168.2.0

👉 Version 2 is preferred because it supports subnet mask and is more efficient.

 

📌 Steps to Configure RIP

 

🧠 Concept

Before configuring RIP, make sure:

  • All router interfaces have IP addresses 
  • Interfaces are up (no shutdown) 
  • Network addresses are known 

 

🔧 Step-by-Step Configuration

 

1️⃣ Enter Privileged Mode

Router> enable

 

2️⃣ Enter Global Configuration Mode

Router# configure terminal

 

3️⃣ Enable RIP Protocol

Router(config)# router rip

 

4️⃣ Select RIP Version 2

Router(config-router)# version 2

 

5️⃣ Add Networks

Router(config-router)# network 192.168.1.0
Router(config-router)# network 192.168.2.0

👉 Add all directly connected networks

 

6️⃣ Exit Configuration Mode

Router(config-router)# exit
Router(config)# end

 

7️⃣ Verify Configuration

Router# show ip route

👉 Check routing table

Router# show running-config

👉 Check RIP configuration

 

📊 Complete Example

Router> enable
Router# configure terminal
Router(config)# router rip
Router(config-router)# version 2
Router(config-router)# network 192.168.1.0
Router(config-router)# network 192.168.2.0
Router(config-router)# end
Router# show ip route

 

✨ Key Features of RIP Configuration

  • Simple and easy to configure 
  • Automatically shares routes 
  • No need to configure each route manually 
  • Works on network-based configuration 

 

⚠️ Important Points

  • Always use correct network address 
  • Interfaces must be active 
  • Use version 2 for better performance 
  • Configure RIP on all routers


 

 

🖧 RIP Configuration in a Four-LAN Network

 

🌐 Introduction

In this practical, we have implemented dynamic routing using RIP (Routing Information Protocol) in a four-LAN topology, where routers automatically learn and share routing information with each other instead of manually configuring routes, which makes the network more flexible and easier to manage as compared to static routing.

 

🖼️ Network Topology

👉 This topology includes:

  • LAN 1 → 192.168.100.0/24 
  • LAN 2 → 192.168.101.0/24 
  • LAN 3 → 192.168.102.0/24 
  • LAN 4 → 192.168.103.0/24 

👉 Routers used:

  • GATEWAY1 
  • ROUTER1 
  • GATEWAY2 

 

📡 Working Concept

In RIP, routers automatically exchange routing information with each other, and based on this information, they build their routing tables, and whenever a packet needs to be sent, the router selects the best path based on hop count, and this process keeps updating continuously.

 

⚙️ Router Configurations

 

🔹 GATEWAY1 Configuration :

 

Router>ENABLE
Router#CONFIG T
Router(config)#HOSTNAME GATEWAY1

GATEWAY1(config)#INTERFACE FA0/0
GATEWAY1(config-if)#IP ADDRESS 192.168.100.4 255.255.255.0
GATEWAY1(config-if)#NO SHUTDOWN
GATEWAY1(config-if)#EXIT

GATEWAY1(config)#INTERFACE FA0/1
GATEWAY1(config-if)#IP ADDRESS 192.168.101.1 255.255.255.0
GATEWAY1(config-if)#NO SHUTDOWN
GATEWAY1(config-if)#EXIT

GATEWAY1(config)#ROUTER RIP
GATEWAY1(config-router)#VERSION 2
GATEWAY1(config-router)#NETWORK 192.168.100.0 
GATEWAY1(config-router)#NETWORK 192.168.101.0 
GATEWAY1(config-router)#NO AUTO-SUMMARY
GATEWAY1(config-router)#EXIT

GATEWAY1(config)#EXIT

 

🔹 ROUTER1 Configuration :-

 

Router>ENABLE
Router#CONFIG T
Router(config)#HOSTNAME ROUTER1

ROUTER1(config)#INTERFACE FA0/0
ROUTER1(config-if)#IP ADDRESS 192.168.101.2 255.255.255.0
ROUTER1(config-if)#NO SHUTDOWN
ROUTER1(config-if)#EXIT

ROUTER1(config)#INTERFACE FA0/1
ROUTER1(config-if)#IP ADDRESS 192.168.102.1 255.255.255.0
ROUTER1(config-if)#NO SHUTDOWN
ROUTER1(config-if)#EXIT

ROUTER1(config)#ROUTER RIP
ROUTER1(config-router)#VERSION 2
ROUTER1(config-router)#NETWORK 192.168.101.0
ROUTER1(config-router)#NETWORK 192.168.102.0
ROUTER1(config-router)#NO AUTO-SUMMARY
ROUTER1(config-router)#EXIT

ROUTER1(config)#EXIT

 

🔹 GATEWAY2 Configuration :-

 

Router>ENABLE
Router#CONFIG T
Router(config)#HOSTNAME GATEWAY2

GATEWAY2(config)#INTERFACE FA0/0
GATEWAY2(config-if)#IP ADDRESS 192.168.103.1 255.255.255.0
GATEWAY2(config-if)#NO SHUTDOWN
GATEWAY2(config-if)#EXIT

GATEWAY2(config)#INTERFACE FA0/1
GATEWAY2(config-if)#IP ADDRESS 192.168.102.2 255.255.255.0
GATEWAY2(config-if)#NO SHUTDOWN
GATEWAY2(config-if)#EXIT

GATEWAY2(config)#ROUTER RIP
GATEWAY2(config-router)#VERSION 2
GATEWAY2(config-router)#NETWORK 192.168.102.0
GATEWAY2(config-router)#NETWORK 192.168.103.0
GATEWAY2(config-router)#NO AUTO-SUMMARY
GATEWAY2(config-router)#EXIT

GATEWAY2(config)#EXIT

 

🖼️ Connectivity Test

 

👉 From the image, we can see that:

  • Laptop is successfully pinging 192.168.103.2
  • Replies are received without any packet loss 

👉 This confirms that RIP is working correctly and all networks are reachable.

 

📊 Routing Table Verification

👉 Use command : show ip route

👉 You will observe:

  • R → Routes learned via RIP 
  • Directly connected networks 
  • Automatically updated routes 

 

 

🎯 Explanation of Output

👉 In the image:

  • Routes marked with R show RIP learned routes 
  • Routes marked with C show directly connected networks 
  • This confirms that routers are successfully exchanging routing information

 

🎯 Key Understanding

  • No need to configure routes manually  
  • Routers automatically learn all networks 
  • RIP uses hop count to select best path 
  • All routers must have RIP enabled 
  • Networks must be correctly added 

 

⚠️ Important Points

  • Always use version 2 
  • Use no auto-summary 
  • Add only directly connected networks 
  • Interfaces must be active 

 

🎯 Key Idea

👉 RIP configuration =
Enable RIP + Add networks → Routers automatically share and learn routes

 

🎯 Summary

In this four-LAN topology, dynamic routing is implemented using RIP, where routers automatically exchange routing information and build routing tables, and as a result, all networks can communicate with each other without manually configuring routes, which makes the network efficient and easier to manage.