Module 7
Module Overview
Module Title: DHCPv4
Course: Switching, Routing and Wireless Essentials v7.0 (SRWE)
Module Objectives
Implement DHCPv4 to operate across multiple LANs.
Topic Objectives:
Explain how DHCPv4 operates in a small- to medium-sized business network.
Configure a Cisco IOS DHCPv4 Server.
Configure a router as a DHCPv4 client.
DHCPv4 Concepts
Overview of DHCPv4
Dynamic Host Configuration Protocol v4 (DHCPv4): Assigns IPv4 addresses and other configuration information dynamically.
Useful for automatic management of IP addresses, particularly in networks with multiple desktop clients.
Can be managed through a dedicated server or less commonly, through a Cisco router in smaller locations.
DHCPv4 Server Operations
DHCPv4 server assigns or leases an IPv4 address from a pool for a limited time period.
Lease Duration: Can range from 24 hours to over a week.
Clients request a new address when their lease expires but often receive the same address if available.
DHCPv4 Communication
Client/Server Mode: Clients acquire IPv4 addresses and must periodically contact the DHCP server to extend their lease.
When a lease expires, the IP address is returned to the pool for reallocation.
Steps to Obtain a Lease
The client follows a four-step process:
**DHCP Discover (DHCPDISCOVER)
DHCP Offer (DHCPOFFER)
DHCP Request (DHCPREQUEST)
DHCP Acknowledgment (DHCPACK)**
Steps to Renew a Lease
A client begins a two-step process to renew:
DHCP Request (DHCPREQUEST)
Sent to original DHCP server; if no DHCPACK is received, a broadcast is sent.
DHCP Acknowledgment (DHCPACK)
Sent by the server in response to the DHCPREQUEST.
Configuring Cisco IOS DHCPv4 Server
Basic Configuration
A Cisco router can serve as a DHCPv4 server, managing IP address pools for clients.
Configuration Steps:
Exclude IP Address Ranges:
Command:
ip dhcp excluded-address low-address [high-address]
Define a DHCP Pool:
Command:
ip dhcp pool pool-name
Configure the DHPC Pool:
Use commands to define the network pool, default router, and other optional settings.
Verification Commands
Use the following commands to verify DHCP server operation:
show running-config | section dhcpshow ip dhcp bindingshow ip dhcp server statistics
Disabling the DHCPv4 Server
To disable DHCP service, use the command:
no service dhcp. To enable again, use:service dhcp.
DHCPv4 Relay Concepts
Importance of DHCPv4 Relay
In networks where clients and DHCP servers are not on the same subnet, routers must be configured to relay DHCP requests.
Configuring DHCPv4 Relay
Use the command:
ip helper-address addresson the interface facing clients.This command forwards various UDP services, including DHCP.
Configuring a DHCPv4 Client
Cisco Router as a DHCP Client
Configure a Cisco router as a DHCP client using the command:
ip address dhcpon the Ethernet interface.Home routers generally have DHCP clients enabled by default for automatic ISP assignments.
Practice and Quiz
In this Module Practice Packet Tracer, Objectives Includes:
Configure a router as a DHCP server.
Configure DHCP relay.
Configure a router as a DHCP client.
Key Terms and Commands
DHCP: Dynamic Host Configuration Protocol
Lease Process: DHCP Discover, DHCPOffer, DHCP Request, DHCP Acknowledgment
Commands include:
ip dhcp excluded-address,ip dhcp pool,network,default-router,dns-server,lease,show ip dhcp, andip helper-address.