liveBook · Manning

DHCP lease

As explained in Acing the CCNA Exam: Volume 2 Advanced Networking and Security

A DHCP lease is a time-limited assignment of an IP address and related configuration parameters to a DHCP client.

A DHCP lease temporarily assigns a host an IP address and related settings such as a netmask, default gateway, and DNS server. DHCP replaces per-host manual configuration with a stateful client–server process in which the server tracks leased addresses. section 4.4

Follow the four-message DORA exchange when a client first connects or needs network configuration:

  • DISCOVER: the client broadcasts to locate DHCP servers and announces that it needs an address. section 4.1.1
  • OFFER: a server offers an IP address and other configuration parameters. section 4.1.1
  • REQUEST: the client accepts an offer, normally choosing the first offer received when multiple servers respond. section 4.4
  • ACK: the server confirms and finalizes the lease; the client can then use the assigned parameters. section 4.4

Configure and verify a Cisco IOS lease

Reserve addresses for statically configured hosts, then create a pool for clients: R1(config)# ip dhcp excluded-address 10.0.0.2 10.0.0.5 R1(config)# ip dhcp pool POOL1 R1(dhcp-config)# network 10.0.0.0 /24 R1(dhcp-config)# default-router 10.0.0.1 R1(dhcp-config)# dns-server 10.0.0.1 8.8.8.8 R1(dhcp-config)# domain-name jeremysitlab.com R1(dhcp-config)# lease 0 5 30 The pool leases addresses from 10.0.0.0/24, supplies gateway, DNS, and domain parameters, and sets a lease time of five hours and thirty minutes. Verify active assignments with show ip dhcp binding; for example, 10.0.0.6 and 10.0.0.7 appear as Automatic bindings for two clients.

DHCP uses UDP 67 for server messages and UDP 68 for client messages. When Cisco IOS detects that a candidate address is already in use, it can ping the address, mark it conflicted, and report it with show ip dhcp conflict. section 4.1.1

How Acing the CCNA Exam: Volume 2 Advanced Networking and Security covers it

How deep it goes
Explains DORA, UDP ports, Cisco IOS pool configuration, lease verification, and address-conflict detection.
Examples
Uses DORA exchanges, Cisco IOS pool commands, binding output, and ping-detected address conflicts.
What it assumes
Assumes basic host networking needs while defining IP addresses, netmasks, gateways, DNS servers, and DHCP message roles.
What you can do after
Operate/configure a Cisco IOS DHCP pool, reserve addresses, verify bindings, and diagnose detected conflicts.
How it connects
Connects DHCP leases with DHCP pools, default gateways, DNS servers, UDP, BOOTP, and static IP addresses.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 2 Advanced Networking and Security. The section links point to the parts of the book it draws on.