Wednesday, October 7, 2009

Linux renew ip address - Force DHCP

We were struggling to bring the network up on Ubuntu machine (using DHCP).
We tried using the commands ifdown and ifup but they were unable to bring network up.

The whole problem was with the IP. The client was not releasing the current IP.
The solution is to release the current IP and renew a new one.

Steps:
1. Release the current IP.
2. Obtain a new IP.
3. Restart the network.

Open the terminal and type the following commands

1. Release the current IP
[praneeth@inferno]$ sudo dhclient -r

2. Obtain a new IP
[praneeth@inferno]$ sudo dhclient

3. Restart the network
[praneeth@inferno]$ sudo ifdown eth0
[praneeth@inferno]$ sudo ifdown eth0

OR

[praneeth@inferno]$ sudo ifdown eth0

OR

[praneeth@inferno]$ /etc/init.d/networking restart



That's it , the network should be up and running :)

No comments:

Post a Comment