Mike Wise
Mike Wise

Reputation: 22847

How to force ALL of the DHCP Clients to renew?

Is there any network broadcast call or something that can force all the connected DHCP clients to renew their addresses immediately?

And if not, why not? Surely this functionality has been desired by DHCP administrators from the date it was born. It makes changing a router address on a big network very hard without pervasive client automation.

Upvotes: 55

Views: 178210

Answers (5)

Tzunghsing David Wong
Tzunghsing David Wong

Reputation: 1424

Note: this only partially address the OP's question.

To force only all Wi-Fi DHCP clients to renew their DHCP lease, this is what you can do. Assuming Wi-Fi DHCP clients connect to your router's SSID and your router management interface supports these functionality.

  • disable DHCP server
  • turn off both 2.4G and 5G Wifi
  • re-enable Wifi network
  • re-enable DHCP server

I used WebUI via a client connected to the router via ethernet.

Upvotes: 8

Amade Seiler
Amade Seiler

Reputation: 35

psexec \\\computername ipconfig /renew

Upvotes: 0

Ben
Ben

Reputation: 19

I managed to remove all the leases by shutting down the dhcpd service, deleting the /var/lib/dhcpd/dhcpd.leases file, and restarting the daemon. Then you have to get each device to obtain an IP address from the DHCP server. For some devices a simple power cycle will work.

Upvotes: 1

koppor
koppor

Reputation: 20551

It is not possible without letting the network down and up at the client network interface.

Theoretically, the DHCP server can send a FORCERENEW message to all connected clients. FORCERENEW is described at RFC3203. (See also https://serverfault.com/a/569869/107832)

Unfortunately, the famous ISC DHCP Server does not support it:

RFC 3315 states in section 19.4.1 reconfigure messages. This is, however, for IPv6 only. A message states that DOCSIS 3.0 "requires Reconfigure support (for DHCPv6) as specified in RFC3315"

Upvotes: 41

Sobrique
Sobrique

Reputation: 53508

It's not directly possible - DHCP issues an IP address with a lease. That lease tells the client how long it's 'valid' for, after which it must renew. Usually - it'll renew the same IP, but this is the point at which the DCHP negotiation occurs.

Forcing every machine on a network segment to renew is a really good way of creating a denial of service attack.

But instead you can turn down the lease time to a few minutes whilst you're transitioning to the new network topology. Practically speaking, this will mean a small outage, but you'd get that anyway with re-acquisition of multiple IPs.

Upvotes: 13

Related Questions