Ubuntu – Unable to get ifup & ifdown to bring up eth0 | Ubuntu 14.04

14.04ethernetnetwork-managernetworkingserver

I'm trying to set up a static IP on a dual boot laptop ( Win10 and Ubuntu Studio 14.04). These are the settings:

sudo nano /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address         192.168.1.101
    netmask         255.255.255.0
    network         192.168.1.0
    broadcast       192.168.1.255
    gateway         192.168.1.1
    dns-nameservers 192.168.1.1 8.8.8.8
    dns-domain example.com
    dns-search example.com

sudo nano /etc/NetworkManager/NetworkManager.conf:

/etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
no-auto-default=54:04:A6:25:64:2E,
[ifupdown]
managed=true

(there is a line space above and below "no-auto–")

The ifconfig returns the below:

eth0      Link encap:Ethernet  HWaddr 54:04:a6:25:64:2e  
      inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
      UP 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:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:312 errors:0 dropped:0 overruns:0 frame:0
      TX packets:312 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1 
      RX bytes:29521 (29.5 KB)  TX bytes:29521 (29.5 KB)

      wlan0     Link encap:Ethernet  HWaddr 78:92:9c:45:05:ae  
      inet addr:192.168.43.110  Bcast:192.168.43.255  Mask:255.255.255.0
      inet6 addr: fe80::7a92:9cff:fe45:5ae/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:2631 errors:0 dropped:0 overruns:0 frame:0
      TX packets:2507 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:1816247 (1.8 MB)  TX bytes:375757 (375.7 KB)

sudo ifdown eth0 returns

 `RTNETLINK answers: No such process

Any advice from pros what I should try to get it right? The targetted configuration is : eth0 up / internet connectivity while eth0 is up. I can post router and gui network manager settings.

sudo ifup eth0 elicits this response:

 `RTNETLINK answers: File exists
  Failed to bring up eth0.`

Best Answer

Please try '=false' and restart Network Manager:

sudo service network-manager restart

Your interfaces file looks a bit busy; I'd amend it to:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1 8.8.8.8
dns-domain example.com
dns-search example.com

Then try again:

sudo ifdown eth0 && sudo ifup -v eth0

Did you connect?

ping -c3 www.ubuntu.com
Related Question