0

OS: Ubuntu 16.04 LTS (GNU/Linux 4.4.0-1009-raspi2 armv7l)

So when i connect to my machine through ssh from windows with putty, i am able to do it with the IP 192.168.0.60.

Now when im listing my devices from the router admin web, it shows that its using the IP 192.168.0.109.

This is the output for the ifconfig cmd.

eth0      Link encap:Ethernet  HWaddr b8:27:eb:86:e1:e0
      inet addr:192.168.0.109  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::ba27:ebff:fe86:e1e0/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:2233 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1067 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:163132 (163.1 KB)  TX bytes:167801 (167.8 KB)

And this is what i have in etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.0.60
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 8.8.8.8
dns-nameserver 8.8.4.4

Another fact to think about is that when i restart the networking service, it throws the following error:

    Job for networking.service failed because the control process exited with
 error code. See "systemctl status networking.service" and "journalctl -xe" for details.

This is the systemctl status networking.service output:

networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
   Active: failed (Result: exit-code) since Thu 2017-03-23 15:31:59 UTC; 2min 1s ago
     Docs: man:interfaces(5)
  Process: 2046 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 2038 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list
 Main PID: 2046 (code=exited, status=1/FAILURE)

Mar 23 15:31:58 ubuntu dhclient[2065]: DHCPREQUEST of 192.168.0.109 on eth0 to 255.255.255.255 port 67 (xid=0x6fc3c068)
Mar 23 15:31:58 ubuntu dhclient[2065]: DHCPACK of 192.168.0.109 from 192.168.0.1
Mar 23 15:31:58 ubuntu ifup[2046]: RTNETLINK answers: File exists
Mar 23 15:31:59 ubuntu ifup[2046]: bound to 192.168.0.109 -- renewal in 657200529 seconds.
Mar 23 15:31:59 ubuntu ifup[2046]: RTNETLINK answers: File exists
Mar 23 15:31:59 ubuntu ifup[2046]: Failed to bring up eth0.
Mar 23 15:31:59 ubuntu systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Mar 23 15:31:59 ubuntu systemd[1]: Failed to start Raise network interfaces.
Mar 23 15:31:59 ubuntu systemd[1]: networking.service: Unit entered failed state.
Mar 23 15:31:59 ubuntu systemd[1]: networking.service: Failed with result 'exit-code'.

Notice the following line:

Mar 23 15:31:59 ubuntu systemd[1]: Failed to start Raise network interfaces.

Can somebody tell me what is going on and how i could fix that?

Edit: Results of route -n:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
  • check if you have configured it with DHCP and also specified an static address in the cfg. – Puffy Feb 3 at 0:39
0

I have found that if you're making use of the /etc/network/interfaces file within Ubuntu that it's best to disable Ubuntu's NetworkManager. My colleagues and I have experience weird issues when you've set static IPs and such in the config file but then NetworkManager likes to do its own thing.

Check out the Stopping and Disabling NetworkManager on the Ubuntu help site.

Though since you can access the Static IP even though your interface is receiving a dynamic one, it would be interesting to see what your routing table is like: route -n

  • I edited the ask and added the output of route -n – JD0001 Mar 23 '17 at 19:15
  • So i disabled the network manager as the post says and im still getting the same error when restarting the networking service – JD0001 Mar 23 '17 at 19:19

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.