
Understanding DHCP: How I Configured and Captured It in a GNS3 Lab
One of the best ways to truly understand a protocol is to build it yourself, watch the packets, and ask "why does each field exist?" This post walks through a DHCP lab I set up in GNS3 — configuring a Cisco router as the DHCP server, a switch in the middle, and two PCs as clients — then captures and explains every packet in the DORA handshake using Wireshark. Lab topology The setup is intentionally simple: one router acting as DHCP server, one switch forwarding traffic, and two VPCS clients requesting addresses. R1 Router / DHCP server → SW1 Switch → PC1 Client·PC2 Client Router configuration On R1, I assigned a static IP to the interface facing the LAN, created a DHCP pool for the 192.168.1.0/24 subnet, and excluded a range so the router's own address and a few reserved IPs wouldn't be handed out. interface GigabitEthernet1/0 ip address 192.168.1.254 255.255.255.0 ip dhcp pool LAN network 192.168.1.0 255.255.255.0 ip dhcp excluded-address 192.168.1.2 192.168.1.10 The DORA handshake —
Continue reading on Dev.to
Opens in a new tab



