Sometimes when working on my laptop, which has Ubuntu Desktop installed on it, I have to move it around and therefore unplug the network cable and switch to wireless or vice versa. Unplugging and replugging your laptop into a network sometimes results in the laptop’s inability to renew its IP address or re-establish a connection with the internet. After a quick Google search, I found this post about the problem.
In order to issue a command similar to ‘ipconfig -renew’ in Windows, open your shell and type the following:
sudo ifdown eth0
sudo ifup eth0
These two commands will renew your IP address and should fix the connection problem. However, there’s a program called ‘ifplugd’ that monitors your network connection and automatically renews your address if this problem occurs. To install this program, open your shell and type:
sudo apt-get install ifplugd