How do I renew my DHCP lease?

To renew your dhcp lease at the terminal:

sudo dhclient -r; sudo dhclient

In my case I had to specify which card to renew:

Note: you might want to join the two on one line, as otherwise you might lose the remote connection you're on after the first!

First release the current IP address:

sudo dhclient -r eth0

then renew the IP address

sudo dhclient eth0

.. or do them together to avoid losing connection:

sudo dhclient -r eth0 && sudo dhclient eth0

In the network drop-down selector from the system tray you can press the network you are already connected to, this will make network-manager ask for a new lease from a DHCP server.

alt text

(This also works for wired networks, but i don't think it works for PPP connections (mobile broadband))

Tags:

Networking