Thursday, October 20, 2016
How-To flush the DHCP server lease cache
Check your /var/lib/dhcpd/dhcpd.leases file and check for the entry. It contains the list of all dhcp leases.
Step 1:- Stop dhcp server
service dhcpd stop
Step 2:- delete the temporary file dhcpd.leases~:
rm dhcpd.leases~
Step 3:- flush the lease cache dhcpd.leases:
echo "" > dhcpd.leases
Step4:- Start DHCP Server
service dhcpd start
the next time the clients will request a lease they will probably obtain a different IP respect the one they had before.
Step 1:- Stop dhcp server
service dhcpd stop
Step 2:- delete the temporary file dhcpd.leases~:
rm dhcpd.leases~
Step 3:- flush the lease cache dhcpd.leases:
echo "" > dhcpd.leases
Step4:- Start DHCP Server
service dhcpd start
the next time the clients will request a lease they will probably obtain a different IP respect the one they had before.