0

my internet was working just fine until one certain day. From this day until today every time I restart the pc I have to execute a dhclient to make internet connection work again. I searched old threads and found this: Have to dhclient each restart to access internet Unfortunatelly none of the proposed solutions worked for me. Here my /etc/network/interface it is:

auto lo

iface lo inet loopback

I changed the two lo to eth0 and didn't work. Then I looked at the /var/lib/dhcp3/dhclient.leases and there exists a line

interface "eth0"

so following the link tip, changing the internet interface of /etc/network/interface to the same value of /var/lib/dhcp3/dhclient.leases should work, but it didn't for me. Also putting dhclient at the /etc/rc.local didn't work.

So, any tips?


Sorry to open this question. The mistake was mine, the last line was

iface lo inet loopback

and I changed it to

iface eth0 inet loopback

instead of changing it to

iface eth0 inet dhcp

Anyway, how was possible that this file was changed (I am assuming that before it was

iface eth0 inet dhcp

to this loopback interface? What could possible happen to provoke that?

2

You should not change the entries in /etc/network/interfaces that refer to the lo interface.

Your entries for eth0 should look like this:

auto eth0
iface eth0 inet dhcp

For a detailed howto see: http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/

Also this question on superuser: https://superuser.com/questions/151936/how-to-automate-running-the-dhclient-in-ubuntu

  • There was nothing in the interfaces file besides "auto lo iface lo inet loopback" – user2752471 Jul 7 '15 at 3:00
  • Yep that's the default entry when you have no network at all. The eth0 lines needed to be added. – Sekenre Jul 7 '15 at 9:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.