Failure to set static ip on beaglebone

4,012 views
Skip to first unread message

Romilly Cocking

unread,
Dec 8, 2011, 4:43:41 AM12/8/11
to Beagle Board
I've modified /etc/network/interfaces on my beaglebone to set a static
ip address on eth0 (file contents below).

When I reboot the bone, it still uses dhcp so set the address for
eth0. If I then ssh in and run /etc/init.d/networking restart, eth0
comes up at the correct (static) address.

What should I do to ensure a static ip address on rebooting?

Romilly

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# Wireless interfaces
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf

iface atml0 inet dhcp

# Wired or wireless interfaces
auto eth0
iface eth0 inet static
address 192.168.250.5
network 192.168.0.0
netmask 255.255.0.0
gateway 192.168.1.254
iface eth1 inet dhcp

# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1

# Bluetooth networking
iface bnep0 inet dhcp

James

unread,
Dec 25, 2011, 12:47:51 PM12/25/11
to Beagle Board
Having the exact same issue with an A3 Beaglebone. It just seems to
ignore /etc/network/interfaces. What's worse is when it gets an
address via DHCP it can't route for some reason (routing tables seems
OK).

After a manual reconfig to a static IP I'm able to run opkg update/
upgrade. If that helps I'll let you know.

- James

jbuehl

unread,
Dec 26, 2011, 11:25:14 AM12/26/11
to Beagle Board
I had the same problem with the 11-16-11 image that came with it.
There was another file /etc/network/interfaces-opkg that it was using
and when I changed that one it worked. I don't understand why.

James

unread,
Dec 26, 2011, 4:57:25 PM12/26/11
to Beagle Board
So I gave up and added a startup script that reconfigs the network and
fixes resolv.conf

in /etc/init.d create a script called fixnetwork

Contents of fixnetwork script:

#!/bin/sh
/etc/init.d/networking restart
cp /etc/resolv.ok /etc/resolv.conf


then make it executable:
chmod +x fixnetwork

add it to the startup:
update-rc.d fixnetwork defaults

Then create a /etc/resolv.conf that contains your nameserver settings

This is ugly but it should work until whatever is causing this problem
gets fixed.

- James

Ewan

unread,
Dec 27, 2011, 5:57:07 AM12/27/11
to beagl...@googlegroups.com
It's the connman daemon overriding things

http://connman.net/

its a very clever piece of software but maybe too clever :-)

you can disable it from /etc/init.d or try to configure it based on the url above.

Ewan

Reply all
Reply to author
Forward
0 new messages