Dynamic Host Configuration Protocol
Nerd Cafe | نرد کافه
Dynamic Host Configuration Protocol (DHCP) is an application-layer protocol that automates the assignment of IP addresses and other essential network configurations to devices on a network. This automation simplifies network management by eliminating the need for manual IP address configuration.
Objective:
This tutorial aims to guide you through configuring a Cisco router to function as a DHCP server and to analyze the DHCP traffic using Wireshark.
1. Network Topology:
The setup consists of a Cisco router (R1) connected to a PC. The router will be configured to assign IP addresses dynamically to devices within the network.

2. Configuring Basic Settings on the Router (R1):
3. Define the DHCP Pool:
Create a DHCP pool named 'LAN' and define its parameters.
In this configuration:
The network 172.16.1.0/24 is specified for DHCP allocation.
The lease duration is set to 2 days.
The default gateway provided to clients is 172.16.1.1.
The DNS server address is set to 172.16.1.1.
Addresses from 172.16.1.1 to 172.16.1.100 are reserved and not assigned dynamically.
4. Renewing IP Address on the PC from DHCP Server:
After configuring the router, the connected PC should obtain an IP address from the DHCP server. To initiate this process:
5. Capturing and Analyzing DHCP Traffic with Wireshark:
To observe the DHCP communication between the PC and the router:
a. Install and Launch Wireshark:
Ensure Wireshark is installed on the PC and open the application.
b. Start Packet Capture:
Select the network interface connected to the router and begin capturing packets.
c. Apply DHCP Display Filter:
To focus on DHCP packets, apply the following display filter:
This filter will display only DHCP-related packets, allowing you to analyze the DHCP handshake process, including:
DHCPDISCOVER: Broadcasted by the client to locate available DHCP servers.
DHCPOFFER: Sent by the server in response to the discover message, offering an IP address.
DHCPREQUEST: Broadcasted by the client to request the offered IP address.
DHCPACK: Sent by the server to acknowledge the client's request and finalize the IP address assignment.

💖 Support Our Work
If you find this post helpful and would like to support my work, you can send a donation via TRC-20 (USDT). Your contributions help us keep creating and sharing more valuable content.
TRC-20 Address: TAAVVf9ZxUpbyvTa6Gd5SGPmctBdy4PQwf
Thank you for your generosity! 🙏
Keywords
DHCP, Cisco router, IP address, network configuration, DHCP server, DHCP client, lease time, subnet mask, default gateway, DNS server, Wireshark, packet capture, DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, DHCPACK, IP allocation, network topology, command-line interface, dynamic addressing, وایرشارک, nerd cafe , نرد کافه
Channel Overview
🌐 Website: www.nerd-cafe.ir
📺 YouTube: @nerd-cafe
🎥 Aparat: nerd_cafe
📌 Pinterest: nerd_cafe
📱 Telegram: @nerd_cafe
📝 Blog: Nerd Café on Virgool
💻 GitHub: nerd-cafe
Last updated