how to force an unresponsive host to renew its dhcp lease

scenario:

dhcp server has stopped for some reason. during the outage, the lease expired for one of the clients. i noticed the host (client) is unreachable, and need to do some work on it- right now.

more info:

found the client was unreachable via ssh or ping, and tcpdump on the gateway showed no traffic to its ip address except failed pings. looked up its mac in /etc/dhcpd.conf and started tcpdump on the gateway to listen for packets with that mac address as its source (perhaps it picked up a rogue ip address, etc.?). this eventually showed the host periodically tried to renew its dhcp lease:

tcpdump -i em0 -nt ether src 40:16:7e:28:b6:15
0.0.0.0.68 > 255.255.255.255.67: xid:0xdc16986e [|bootp] [tos 0x10]
0.0.0.0.68 > 255.255.255.255.67: xid:0xdc16986e [|bootp] [tos 0x10]

that discovery was followed by (on the gateway/dhcp server):

pgrep -lf dhcpd

oops, no output, so:

/usr/sbin/dhcpd
Listening on athn0 (192.168.4.1).
Listening on em3 (192.168.3.1).
Listening on em2 (192.168.2.1).
Listening on em1 (192.168.1.1).
Listening on em0 (192.168.0.1).

but I wanna talk to the host, NOW. so, pulled the ethernet cable, waited 5 seconds, and plugged it back in. by the time I got back from behind the rack, tcpdump was already showing normal traffic from the host.

that’s all folks!
…dave
Wed Aug 8 23:42:07 PDT 2018