Module Title: DHCPv4
Course: Switching, Routing and Wireless Essentials v7.0 (SRWE)
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.
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 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.
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.
The client follows a four-step process:
**DHCP Discover (DHCPDISCOVER)
DHCP Offer (DHCPOFFER)
DHCP Request (DHCPREQUEST)
DHCP Acknowledgment (DHCPACK)**
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.
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.
Use the following commands to verify DHCP server operation:
show running-config | section dhcp
show ip dhcp binding
show ip dhcp server statistics
To disable DHCP service, use the command: no service dhcp
. To enable again, use: service dhcp
.
In networks where clients and DHCP servers are not on the same subnet, routers must be configured to relay DHCP requests.
Use the command: ip helper-address address
on the interface facing clients.
This command forwards various UDP services, including DHCP.
Configure a Cisco router as a DHCP client using the command: ip address dhcp
on the Ethernet interface.
Home routers generally have DHCP clients enabled by default for automatic ISP assignments.
Configure a router as a DHCP server.
Configure DHCP relay.
Configure a router as a DHCP client.
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
, and ip helper-address
.