/var/lib/misc/dnsmasq.leases에서 임대 강제 임대 갱신


these 지침을 사용하여 직접 이더넷을 통해 랩톱에 Raspberry Pi가 연결되어 있습니다 (Gnome과 함께 13.04 실행).일반적으로 RPi는 연결되어 정상적으로 작동합니다.그러나 DHCP 임대가 만료되기 전에 RPi의 연결을 끊고 다시 연결하려고하면 새 임대를 얻지 못하므로 제대로 연결되지 않습니다 (ssh 액세스 없음).here에 따라 sudo dhclient -r을 사용해 보았지만 파일에는 영향을 미치지 않으므로 외부 인터넷으로의 DHCP 임대가 취소됩니다.


I know this is a very old post, but I could not easily find a simple answer online for how to release/renew DHCP leases using dnsmasq so I figured I would share for anyone else who needed help on this. I am running on a Raspberry Pi debian_version 10, using it as a remote VPN tunnel, so using DHCP to manage a subnet.

There multiple services that can manage assigning IP addresses through DHCP. The link you references is for dhclient, which is a different DHCP service.

To force DHCP renewed leases, you have to remove old lease and have dnsmasq issue a new one.

To view current leases:

cat /var/lib/misc/dnsmasq.leases

To remove the old lease(s), manually delete the lines for each entry here:

sudo nano /var/lib/misc/dnsmasq.leases

Restarting dnsmasq did not issue new leases on my subnet, perhaps because the devices on the network still saw their lease had not expired. Restarting the Pi after editing the leases file worked for me - new leases were generated after reboot.