4. DHCP With Relay Agent in GNS3 | Step by Step Guide to Configure Dynamic Routing

Опубликовано: 03 Май 2026
на канале: Abdul Rahman
423
9

🌐 Configure DHCP Relay Agent in GNS3 | Assign IPs Across Different Networks!

📌 Description:
Need to assign IP addresses across different subnets in GNS3? Learn how to configure a DHCP relay agent to forward DHCP requests from clients to a DHCP server on another network. Perfect for CCNA labs and real-world networking! 🔥

🔹 In This Video:
✔️ What is a DHCP Relay Agent?
✔️ Why Do We Need It?
✔️ Network Topology & Device Setup
✔️ Configuring a Router as a DHCP Server
✔️ Setting Up a Router as a DHCP Relay Agent
✔️ Testing IP Assignment Across Networks

📌 💻 Commands Used in This Tutorial:

1️⃣ Configure Router 1 (DHCP Server)
configure terminal
ip dhcp excluded-address 192.168.2.1 192.168.2.9
ip dhcp pool REMOTE-LAN
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 8.8.8.8
exit

interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit

2️⃣ Configure Router 2 (Relay Agent)
configure terminal
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
no shutdown
exit

interface FastEthernet2/0
ip address 192.168.1.2 255.255.255.0
no shutdown
exit

ip helper-address 192.168.1.1 # Forward DHCP requests to R1
exit

3️⃣ Enable Routing on Relay Agent (R2)
configure terminal
ip routing
exit

4️⃣ Configure Static Routes

On R1 (DHCP Server):
configure terminal
ip route 192.168.2.0 255.255.255.0 192.168.1.2
exit

On R2 (Relay Agent):
configure terminal
ip route 0.0.0.0 0.0.0.0 192.168.1.1
exit

5️⃣ Configure PC1 to Use DHCP
ip dhcp

6️⃣ Verify DHCP and Network Connectivity
show ip dhcp binding # On R1 (Check Assigned IPs)
show ip interface FastEthernet0/0 # On R2 (Check Relay Forwarding)
ipconfig # On PC1 (Check Received IP)
ping 192.168.1.1 # Test Connectivity

✔️ This method allows DHCP to work across multiple networks! 🎬

🔔 Subscribe for more GNS3 networking videos!

📌 Tags:
DHCP relay agent, GNS3 tutorial, Cisco DHCP configuration, dynamic IP assignment, DHCP troubleshooting, CCNA labs, network automation, DHCP relay agent setup, networking for beginners, configure DHCP in GNS3, Cisco router DHCP relay, IP helper-address, network troubleshooting, DHCP relay agent explained, CCNA networking basics