Dynamic Host Configuration Protocol
Sniffing and Evasion
Last updated
Sniffing and Evasion
Last updated
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.
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.
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.
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.
After configuring the router, the connected PC should obtain an IP address from the DHCP server. To initiate this process:
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.
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
, وایرشارک