HOWTO send a refresh to a DHCP server

At some point you will need to refresh the lease on a network card, NIC, by sending a refresh command to your DHCP server.

To send the release to the DHCP client use the following. remember this will remember this will effectively turn off your network connection. If you are connected remotely you may loose your connection.

sudo dhclient -r

And to refresh the lease same command but no command line options 🙂

sudo dhclient

Note:After releasing the lease any renew can take 15-30 seconds to take affect.

Use the ifconfig command to see when you get a new lease. You may not get a new IP address

ifconfig

Using the above there is no need to restart networking. You can also use the following:

sudo ifdown eth0
sudo ifup eth0
service networking restart 

or even simply restart networking

service networking restart 

Note: If you are having networking problems after changing network cards or you updated the motherboard, i.e. a new MAC address for the NIC then delete the contents of /etc/udev/rules.d/70-persistent-net.rules and reboot.

Leave a Reply

Your email address will not be published. Required fields are marked *