Linux – How to force Linux to reacquire a new IP address from the DHCP server

debiandhcplinuxnetworking

The environment is Debian, although the answer will apply to all distributions.

Best Answer

You can also use this command:

dhclient -r interface

Where interface is the device you want to get a new address for.

dhclient -r eth0

The -r flag forces dhclient to first release any leases you have, you can then use this command to request a new lease:

dhclient eth0

From man dhclient:

   -r     Tell  dhclient  to  release the current lease it has from the 
          server.  This is not required by the DHCP protocol, but some 
          ISPs require their clients to notify the server if they wish 
          to release an assigned IP address.