Octet

What happens as a DHCP lease runs out? Explain T1, T2 and DHCPNAK.

Show the answer

Say this first

At T1, half the lease by default, the client unicasts a REQUEST to the server that gave it the lease. If that fails, at T2 (87.5 percent of the lease) it broadcasts a REQUEST to any server: that is rebinding. If the lease expires with no answer, the client must stop using the address and start again with DISCOVER. A server sends DHCPNAK when the client asks for an address that is wrong for its subnet, for example a laptop that moved to another VLAN.

Go deeper

Client states

StateWhenWhat it sends
BOUNDafter the ACKnothing
RENEWINGat T1 (option 58)unicast REQUEST to the option 54 server, ciaddr filled in
REBINDINGat T2 (option 59)broadcast REQUEST to any server
INITlease expired or NAKDISCOVER, from scratch
INIT-REBOOTafter a reboot with a remembered addressbroadcast REQUEST with option 50

NAK and silence

After a reboot the client asks for its old address. A server that knows the subnet is wrong answers with a NAK, and the client restarts at DISCOVER. A server with no record of the client should stay silent. ISC dhcpd only sends NAKs for a network when it is marked authoritative.

Release

ipconfig /release or dhclient -r sends DHCPRELEASE, which returns the address early.

Choosing lease times

  • Guest Wi-Fi and busy shared spaces: short leases (1 to 8 hours) so the pool recycles.
  • Wired desktops: long leases. The Windows Server default is 8 days, the IOS default is 1 day.
  • A long lease also lets existing clients ride out a DHCP server outage longer.

Traps

  • Saying the renewal is a broadcast. Only rebinding at T2 is.
How did you do?Book 3.3 Internet (IP)