Implement DHCP Server in GNS 3: Experiment with DHCP Protocol with DHCP server and Clients

Experiment with the DHCP Protocol with a DHCP server and Clients

Tools Required:

  • GNS 3
  • VMWare Workstation Pro or Oracle VirtualBox
  • GNS VM
  • Wireshark

Steps in GNS 3:

  1. Create the LAN segment
  2. Configure a DHCP Server
  3. From PCs (clients) : request IP address from the DHCP server
  4. Check the DHCP requests/steps in the background
  5. Utilize Wireshark to check the packet/data/frame

LAN Segment to Implement

Steps to Create the LAN Segment

In GNS 3, create a projectBring the Devices 2 VPCs (PC1, PC2)One Switch One Router (c3725)It is not there by default in the device list
Use the connections option to connect them like the diagram above  

Turn on all routers and PCs

Commands in the Router:

First of all, go to command prompt or the console/web-console of the Router.

Or telnet such as

telnet 192.168.64.5 5000

Then issue these commands:

R1# enable                                            (Privileged EXEC mode)

R1# configure terminal

R1(Config)# interface fastethernet 0/0

R1(config-if)# ip add 192.168.1.1 255.255.255.0

R1(config-if)# no shutdown   (Activate)

R1(config-if)# exit

R1(config )#interface fastethernet 0/0

R1(config-if)# ip dhcp pool cyber   (create DHCP Pool)

R1(dhcp-config)# network 192.168.1.0 255.255.255.0

R1(dhcp-config)#default-router 192.168.1.1

R1(dhcp-config)# dns-server 8.8.8.8

R1(dhcp-config)# do wr   

R1(dhcp-config)# exit

Now, go to the console/web-console/telnet-from-cmd of the PCs such as PC1, or PC2.

telnet 192.168.64.5 5000

PC1>ip dhcp

DDORA: Discover Message (two times), Offer, Request, Acknowledge

Do the same for other PCs such as PC2

Then try the PING command from one PC to another