problems with static ip address on eth0

309 views
Skip to first unread message

bart.van...@gmail.com

unread,
Jul 18, 2016, 9:52:08 AM7/18/16
to BeagleBoard
I downloaded the newest image (bone-debian-8.4-lxqt-4gb-armhf-2016-05-13-4gb) and I am now trying to configure the eth0 to be able to use the BBB on our network.
I can connect to it over USB link.
I changed the /etc/network/interfaces file to the content shown below, but after reboot the BBB gets address 169.254.129.50 (an address assigned after failed DHCP assignment attempt?)
After some searching, I have the impression that this is because the usb0 link uses dhcp, and the BBB is also using this on eth0, although I tell it to use 'static' in the interfaces file.
If I restart the eth0 link using 'ifdown eth0' and 'ifup eth0' then it does get the right ip address, and I can ssh to it over the eth0 interface. But this is not really a good solution, and I have the impression that some other network settings, (dns, ...) are still misconfigured.

I tried deleting the usb0 link from /etc/interfaces, and disabling the /opt/scripts/boot/autoconfigure_usb0.sh script, but that didn't help either.
Is there any way I can force it to use a static IP address on eth0?

Thanks for any help

Bart


root@beaglebone:/etc/network# cat interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    dns-nameservers 8.8.8.8 8.8.4.4
    address 30.0.0.39
    netmask 255.0.0.0
    network 30.0.0.0
    gateway 30.0.0.1
# Example to keep MAC address between reboots
#hwaddress ether DE:AD:BE:EF:CA:FE

# The secondary network interface
#auto eth1
#iface eth1 inet dhcp

# WiFi use: -> connmanctl

# Ethernet/RNDIS gadget (g_ether)
# Used by: /opt/scripts/boot/autoconfigure_usb0.sh
iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.252
    network 192.168.7.0
    gateway 192.168.7.1

Wally Bkg

unread,
Jul 20, 2016, 3:41:00 PM7/20/16
to BeagleBoard, bart.van...@gmail.com
Have you tried booting with the USB cable not plugged into your computer?

I've never tried using both the USB gadget and wired Ethernet at the same time.

When I want a static IP on the local network I usually find it easier to go to the router's admin page and set a static IP based on the board's MAC address.  Then I don't have to keep editing the config files on the Bone, or Pi etc.

Robert Nelson

unread,
Jul 20, 2016, 3:57:15 PM7/20/16
to Beagle Board, bart.van...@gmail.com
The magic for static eth is:

sudo connmanctl config <service> --ipv4 manual <ip_addr> <netmask> <gateway> --nameservers <dns_server>

run:

debian@beaglebone:~$ connmanctl services
*AO Wired                ethernet_74daea0a4b52_cable

sudo connmanctl config ethernet_74daea0a4b52_cable --ipv4 manual 30.0.0.39 255.0.0.0 30.0.0.1 --nameservers 8.8.8.8

Regards,

--
Robert Nelson
https://rcn-ee.com/

yang...@gmail.com

unread,
Oct 7, 2016, 9:02:14 AM10/7/16
to BeagleBoard, bart.van...@gmail.com
Hi, Have you solve the problem? I have the same problem as you, could you please advise?

Charles Steinkuehler

unread,
Oct 8, 2016, 7:28:55 AM10/8/16
to beagl...@googlegroups.com
You need to configure connman, not /etc/network/interfaces:

https://groups.google.com/forum/#!topic/beagleboard/yfNwIk_dWlg
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to beagleboard...@googlegroups.com
> <mailto:beagleboard...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/601f2ca4-d3f3-4700-9ac7-d7c591cf5a8a%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/601f2ca4-d3f3-4700-9ac7-d7c591cf5a8a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>

--
Charles Steinkuehler
cha...@steinkuehler.net
Reply all
Reply to author
Forward
0 new messages