Skip to content

DHCP

What DHCP Does

DHCP automatically provides a client with network parameters:

  • IP address
  • mask or prefix
  • default gateway
  • DNS servers
  • additional options such as NTP, PXE, and domain search list

Basic DORA Flow

  1. Discover
  2. Offer
  3. Request
  4. Acknowledge

This exchange is usually what you look for in tcpdump when a client “does not get an IP”.

What a Lease Is

DHCP assigns an address for a limited period of time. The client tries to renew the lease before it expires. If renewal fails, the address can be lost and reassigned.

Where DHCP Commonly Breaks

  • the DHCP server is unreachable
  • relay or helper is not configured between VLANs
  • the address pool is exhausted
  • MAC reservations conflict
  • firewall blocks UDP 67/68
  • options such as gateway, DNS, or search domain are wrong

Useful Commands and Diagnostics

Linux Client

ip a
ip r
journalctl -u NetworkManager -xe
journalctl -u systemd-networkd -xe
dhclient -v eth0
nmcli device show
tcpdump -nn -i eth0 port 67 or port 68

Server Side and Network Path

tcpdump -nn -i any port 67 or port 68
ss -lunp | grep :67
firewall-cmd --list-all

Important L3 Relationship

DHCP broadcast traffic does not normally cross a router on its own. If the server lives in a different subnet, a DHCP relay or IP helper is required.

Practice

  • If a client does not get an address in another VLAN, check relay or helper first.
  • If an address is assigned but “the network still does not work”, verify the DHCP options: gateway and DNS.
  • For critical infrastructure addresses, reservation or static assignment is often better than a random lease.