No network after ubuntu upgrade to 16.04

August 11, 2018 3.2k views
Networking Linux Commands Ubuntu 16.04

Upgraded ubuntu in droplet (do-release-upgrade). Currently it is 16.04
Logged in.

#ping -c3 
ping: unknown host
sudo service networking status
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)

Do not know why it was masked but I did unmask. And then again

sudo service networking status
networking.service - LSB: Raise network interfaces.
Loaded: loaded (/etc/init.d/networking: bad; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
Active: active (exited) since Sat 2018-08-11 15:04:02 MSK; 16 min ago
Docs: man:systemd-sysv-generator(8)
Process: 943 ExecStop=/etc/init.d/networking stop (code=exited, status=0/SUCCESS
Process: 946 ExecStart=/etc/init.d/networking start (code=exited, status=0/SUCCESS

cat /etc/network/interfaces

auto lo
iface lo inet loopback

auto ens3
iface ens3 inet static
    address 162.243.XX.XX
    gateway 162.243.XX.1

ifconfig - a

ens3  Link encap:Ethernet  HWaddr 00:1b:fc:2d:21:3b  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:38337 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38337 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:3591223 (3.5 MB)  TX bytes:3591223 (3.5 MB)

As I understand, networking service is not working properly. There is nothing in /var/log/syslogor in journalctl -u NetworkManager

I did

sudo ip addr flush dev ens3

sudo service networking restart

But no ip address appear in ens3 interface

Any help appreciated

1 Answer

Were you able to resolve this? I'm getting the same error after upgrading to 18.04

Have another answer? Share your knowledge.