7

I've upgraded my server from 14.04 to 16.04. I can see following error on syslog:

ifup[478]: Internet Systems Consortium DHCP Client 4.2.4
ifup[478]: Copyright 2004-2012 Internet Systems Consortium.
ifup[478]: All rights reserved.
ifup[478]: For info, please visit https://www.isc.org/software/dhcp/
ifup[478]: Usage: dhclient [-4|-6] [-SNTP1dvrx] [-nw] [-p <port>] [-D LL|LLT]
ifup[478]:             [-s server-addr] [-cf config-file] [-lf lease-file]
ifup[478]:             [-pf pid-file] [--no-pid] [-e VAR=val]
ifup[478]:             [-sf script-file] [interface]
ifup[478]: Failed to bring up eth0.
systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Raise network interfaces.
systemd[1]: networking.service: Unit entered failed state.

systemd[1]: networking.service: Failed with result 'exit-code'.

I also get the same error if I try to do it manually

# ifup --verbose eth0
Configuring interface eth0=eth0 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant

/sbin/dhclient -1 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0
Usage: dhclient [-4|-6] [-SNTP1dvrx] [-nw] [-p <port>] [-D LL|LLT]
             [-s server-addr] [-cf config-file] [-lf lease-file]
             [-pf pid-file] [--no-pid] [-e VAR=val]
             [-sf script-file] [interface]
Failed to bring up eth0.

I can ping 8.8.8.8. But cannot resolve any domain names.

What can I do to restore network connection?

4

I ran into this on a fresh install of server 16.04 on a Raspberry Pi. For some reason, Network Manager wasn't installed by default, and after running dist-upgrade and then rebooting, I had no network.

I followed the steps at this blog to get it working again. Essentially, the mapping for eth0 had become corrupted. Normally, Network Manager can automatically fix this, but without it, you have to do it yourself. To do that, I first ran:

sudo networkctl

which showed me all my network interfaces like lo, wlan0 and something called enc238897s9879c3, which is actually supposed to be eth0.

To correct the mapping, I ran:

sudo ip link set enc238897s9879c3 name eth0
sudo systemctl restart networking

and that fixed it. Running ifconfig showed I had an IP, and running ping google.com showed I had Internet.

  • it works well, but it must be run again after each reboot... – vmalep Oct 8 '16 at 16:28
  • Should we not fill a bug report for this issue? – vmalep Oct 8 '16 at 16:28
  • sudo networkctl was the secret for me, thanks. It didn't work when I renamed the enc... adapter to eth1, but it did work when I replaced eth1 with the enc... name in /etc/network/interfaces. – Gord Thompson Jun 7 '17 at 17:43
1

I ran into the same issue. The answer given by @rosencreuz is correct, but I narrowed it down to just this one command.

# apt install isc-dhcp-client
  • 3
    So the solution to a non-working internet connection is to download packages from the internet? – Cerin Sep 26 '16 at 2:48
  • 1
    @Cerin I actually had the package cached already from the upgrade process. The apt process downloads pachages BEFORE instlaling them, so the local maching should already have it available. – rnavarro Sep 26 '16 at 18:38
  • Worked for me! The package was indeed cached. – Quentin S. Sep 17 '17 at 17:37
0

It looks like the upgrade was somehow messed up networking related packages. I did followings which lead to resolution of the problem. I'm not sure which ones were necessary though.

# apt install network-manager
# systemctl enable systemd-networkd
# systemctl enable systemd-resolved
# systemctl start systemd-networkd
# systemctl start systemd-resolved
# apt install isc-dhcp-client
# dpkg-reconfigure resolvconf
  • so how do you restart network service? network-manager? – grepmaster Jun 21 '16 at 8:16
  • you are the king – kamil Jul 20 '17 at 10:12
  • Didn't help on Debian 9. The system also hung somewhat at boot time. – Apteryx Aug 14 '17 at 12:09
0

If you want to keep using eth0 as interface name, you need to add in /etc/default/grub:

net.ifnames=0 biosdevname=0

inside GRUB_CMDLINE_LINUX="". Like this:

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 quiet"

Then run: update-grub and reboot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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