2

I'm working on BeagleBone Green and have the latest Linux image on my BBG. For networking part, it worked fine until I tried to setup a static IP on /etc/network/interfaces file. Here is what I have in my interfaces file.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.51
netmask 255.255.255.0
gateway 192.168.1.1

My question is: I'm still able to connect to the network as my BBG got IP address from DHCP regardless of the settings on interfaces file. When I tried to restart networking service, here is what I got.

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

The following is the message from systemctl status networking.service.

networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Wed 2019-07-17 18:51:28 CST; 1min 1s ago
 Docs: man:interfaces(5)
Process: 2836 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 2831 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && ud
 Main PID: 2836 (code=exited, status=1/FAILURE)

Jul 17 18:51:28 BBG systemd[1]: Starting Raise network interfaces...
Jul 17 18:51:28 BBG ifup[2836]: RTNETLINK answers: File exists
Jul 17 18:51:28 BBG ifup[2836]: ifup: failed to bring up eth0
Jul 17 18:51:28 BBG systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jul 17 18:51:28 BBG systemd[1]: Failed to start Raise network interfaces.
Jul 17 18:51:28 BBG systemd[1]: networking.service: Unit entered failed state.
Jul 17 18:51:28 BBG systemd[1]: networking.service: Failed with result 'exit-code'.

If I manually brought down eth0 by sudo ifdown eth0, here is what I got.

ifdown: interface eth0 not configured

A reboot doesn't help. It still gets IP from DHCP. Any idea what's going on here? Thanks for your time.

In response to Panki's comment, here is the result of ip a. In item 4, 192.160.1.106 is the IP address from DHCP, and 192.168.1.51 is the static IP I put in the interfaces file.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
   valid_lft forever preferred_lft forever
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
link/can
3: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
link/can
4: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 98:5d:ad:37:8e:aa brd ff:ff:ff:ff:ff:ff
inet 192.168.1.106/24 brd 192.168.1.255 scope global eth0
   valid_lft forever preferred_lft forever
inet 192.168.1.51/24 brd 192.168.1.255 scope global secondary eth0
   valid_lft forever preferred_lft forever
inet6 fe80::9a5d:adff:fe37:8eaa/64 scope link
   valid_lft forever preferred_lft forever
5: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 98:5d:ad:37:8e:ac brd ff:ff:ff:ff:ff:ff
6: usb1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 98:5d:ad:37:8e:af brd ff:ff:ff:ff:ff:ff
inet 192.168.6.2/30 brd 192.168.6.3 scope global usb1
   valid_lft forever preferred_lft forever
  • Can you include the output of ip a in your question? – Panki Jul 17 at 11:24
  • The Debian Wiki (wiki.debian.org/NetworkConfiguration) states: Make sure to disable all DHCP services, e.g. dhcpcd.. Did you do that? – mnille Jul 17 at 13:11
  • @Panki I have included the result of ip a to the original message. @mnille there is no dhcpcd.service in my system. – Oliver Jul 18 at 1:23
  • This isn't exactly an answer, but can you just define the static IP using the router? (That's what I do with my RPi servers.) – Sparhawk Jul 18 at 2:30
1

I think I somehow fixed the issue, but I don't think I "solved" the problem as I didn't change anything on my BBG. We encountered some issues with our old router (WHR-1166D) and got a replacement (DIR-612). At the beginning, the connection was unstable (from users point of view) because we're able to visit some websites but not the others. It took us a while to figured that the DIR-612 only issued IPv6 IPs to devices that accept IPv6 (pretty much all devices nowadays). After updating the firmware, the IPv6 feature was removed from the DIR-612 and all devices get IPv4 IPs from this router. My BeagleBone then got the IP I assigned in the interfaces file.

I really have no idea why the unstable router (WHR-1166D) and the router that issues IPv6 IPs caused the problem I asked here.

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.