π DHCP (Dynamic Host Configuration Protocol)
π DHCP (Dynamic Host Configuration Protocol)
π§ Top 5 Key Points
-
Automatic IP Assignment:
DHCP automatically assigns IP addresses, subnet masks, gateways, and DNS servers to clients, reducing manual configuration. -
Centralized Management:
All IP configuration settings are managed by a DHCP server, simplifying administration in large networks. -
Leased IP Addresses:
Clients receive IPs for a limited lease period — after which they can renew or release them. -
Uses UDP Ports:
-
UDP Port 67: Server side
-
UDP Port 68: Client side
-
-
Message Types:
Key DHCP message types: Discover → Offer → Request → Acknowledge (DORA).
Client sends broadcast 255.255.255.255 to discover Server
Server offers 192.168.1.2 to Client
Client sends request broadcast 255.255.255.255 to Server
Server acknowledges 192.168.1.2 to Client..
⚙️ Technical Summary
| Feature | Description |
|---|---|
| OSI Layer | Application Layer |
| Protocol Type | UDP |
| Default Port | 67 (Server), 68 (Client) |
| Purpose | IP address auto-assignment |
| Process | DORA (Discover, Offer, Request, Acknowledge) |
π§° Packet Tracer Lab — DHCP Configuration
π― Goal:
Set up a Router as DHCP Server to automatically assign IPs to clients in a LAN.
π₯️ Network Topology
IP Plan
| Device | Interface | IP Address | Purpose |
|---|---|---|---|
| Router (R1) | G0/0 | 192.168.10.1 | Default Gateway & DHCP Server |
| PC1 | DHCP | Assigned automatically | |
| PC2 | DHCP | Assigned automatically |
πͺ Step-by-Step Configuration
πΉ 1. Configure Router Interface
πΉ 2. Configure DHCP Pool
πΉ 3. Exclude Router IP Address
(Prevents the DHCP server from assigning the router’s own IP.)
πΉ 4. Verify DHCP Configuration
πΉ 5. Configure PCs
In Packet Tracer:
-
Click PC → Desktop → IP Configuration
-
Select DHCP
-
PC automatically gets an IP address (e.g.,
192.168.10.6,192.168.10.7).
πΉ 6. Test Connectivity
-
On PC1, open Command Prompt → ping 192.168.10.1
✅ Should succeed (gateway reachable). -
On PC1, ping PC2’s IP (both dynamically assigned).
✅ Should also succeed.
π‘ Troubleshooting Tips
Renew DHCP Address
Release:
ipconfig /release
Renew:
ipconfig /renew
Useful when:
- Wrong IP assigned
- DHCP issues
ipconfig /releaseipconfig /renew| Issue | Fix |
|---|---|
| PCs not receiving IP | Check if DHCP service is enabled on router |
| Same IP for all PCs | Ensure enough IPs in the pool |
| No ping | Check cabling and interfaces (use no shutdown) |
π§ Learning Summary
| Concept | Description |
|---|---|
| DHCP Role | Assign IP addresses automatically |
| DHCP Messages | DORA (Discover, Offer, Request, Acknowledge) |
| Default Gateway | Assigned via DHCP |
| Exclusion | Prevents assigning reserved IPs |
| Verification | show ip dhcp binding |
Comments
Post a Comment