Ubuntu – Failed to start Raise network interfaces on ubuntu 16.04.01

networkingUbuntu

I am running ubuntu 16.04 (fresh install) with the networking interface configured on dhcp inside virtualbox. This worked perfectly on that box until recently and works still perfect for another box.

Suddently I am having trouble raising the network interface enp0s17. I have another interface configured with static IP that works OK.

/etc/network/interfaces looks like this:

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s8 enp0s17

iface enp0s17 inet dhcp

iface enp0s8 inet static
        address 192.143.56.200
        netmask 255.255.255.0
        network 192.143.56.0
        broadcast 192.143.56.255
        dns-nameservers 192.143.56.1

Syslog shows this:

Jan 29 07:17:36 rex dhclient[1091]: DHCPDISCOVER on enp0s17 to 255.255.255.255 port 67 interval 14 (xid=0xaf741468)
Jan 29 07:17:36 rex sh[1079]: DHCPDISCOVER on enp0s17 to 255.255.255.255 port 67 interval 14 (xid=0xaf741468)
Jan 29 07:17:50 rex systemd[1]: networking.service: Start operation timed out. Terminating.
Jan 29 07:17:50 rex systemd[1]: Failed to start Raise network interfaces.
Jan 29 07:17:50 rex systemd[1]: networking.service: Unit entered failed state.
Jan 29 07:17:50 rex systemd[1]: networking.service: Failed with result 'timeout'.
Jan 29 07:17:50 rex systemd[1]: Reached target Network.

The config looks OK to me and not different to the point where it used to work.

What I did before is to configure iptables, but have deleted the rule and checked it if it is really deleted. The name of the interface seems to be OK:

 sudo ifconfig -a
 enp0s8    Link encap:Ethernet  HWaddr 08:00:27:4f:d8:fb  
           inet addr:192.143.56.200  Bcast:192.143.56.255  Mask:255.255.255.0
           inet6 addr: fe80::a00:27ff:fe4f:d8fb/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:4098 errors:0 dropped:0 overruns:0 frame:0
           TX packets:3693 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:303862 (303.8 KB)  TX bytes:373908 (373.9 KB)

 enp0s17   Link encap:Ethernet  HWaddr 08:00:27:1a:5e:6c  
           inet6 addr: fe80::a00:27ff:fe1a:5e6c/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:3 errors:0 dropped:0 overruns:0 frame:0
           TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:276 (276.0 B)  TX bytes:18090 (18.0 KB)

What could be the reason for this?

Best Answer

I've wasted like a whole day trying to figure why static network configuration won't work consistently. Then dumped it, went with nmcli and never looked back. It's so much better and reliable.

It's funny coz originally I was the kind of guy whose first step was erasing networkmanager right after install. Now I couldn't live without it.