static IP but sometimes the BBB use DHCP

Hello,

I set in the /etc/network/interfaces:
auto lo
iface lo inet loopback

auto eth0

iface eth0 inet static
address 192.168.254.1
netmask 255.255.255.0
gateway 192.168.254.254

But with ifconfig I get:
eth0 Link encap:Ethernet HWaddr d0:39:72:2b:c7:5e
inet addr:192.168.254.101 Bcast:192.168.254.255 Mask:255.255.255.0
inet6 addr: fe80::d239:72ff:fe2b:c75e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:50257 errors:0 dropped:0 overruns:0 frame:0
TX packets:4695 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3279596 (3.1 MiB) TX bytes:374778 (365.9 KiB)
Interrupt:40

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:628 errors:0 dropped:0 overruns:0 frame:0
TX packets:628 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:37651 (36.7 KiB) TX bytes:37651 (36.7 KiB)

The 101 is from the DHCP.

Has anyone an idea why the BBB use the DHCP somtimes?
Guess when I boot 100times, it happens once

Thank you!

I’ve seen the same thing and could never figure it out… so I finally gave up and put a static IP assignment in the router that is handing out the addresses, which works in my application but is a bit of a hassle since I have to program the router with the MAC address of the Beaglebone.

Erik

I’ve only seen this happen when using an nfsroot rootfs, and the uboot environment variables for networking are not set properly.

Hi William,

maybe you have an example or can tell me what I have to post, to double check my settings?

Thank you!

btw: I´m using Debian

Hello William,

may you can tell me where I have to check for correct settings?

Thank you!