How to release and renew a DHCP IP address in Ubuntu 10.04 (Lucid)/9.10 (Karmic)/9.04(Jaunty)
We have already discussed how to setup DHCP server in Ubuntu .This tutorial will explain how to release and renew a DHCP IP address in Ubuntu 10.04 (Lucid)/9.10 (Karmic)/9.04(Jaunty)
Release a DHCP ip address in Ubuntu 10.04 (Lucid)/9.10 (Karmic)/9.04(Jaunty)
Open the terminal and run the following command
sudo dhclient -r
Renew a DHCP ip address in Ubuntu 10.04 (Lucid)/9.10 (Karmic)/9.04(Jaunty)
Open the terminal and run the following command
sudo dhclient
or
sudo dhclient eth0
Note:- eth0 is your Ethernet interface
Hmm, I always just issue “service networking restart” (or /etc/init.d/networking restart).
Guess that isn’t the right way to do it, but works for me.
@Jerad: I guess it depends on why you need a new lease. If you change networks you will get a new address by restarting networking, but that also brings me to the next question.
@UbuntuGeek: Does dhclient -r release the lease and ask for a new address and get a fresh one, or will one get the same address you had earlier (if any)?