bb-usb-gadgets and default gateway on BBB

On the Beaglebone Black, after installing the latest bb-usb-gadgets, it seems that the dhcp default gateway has changed, and the new default isn’t allowing network access over ethernet. I’ve poked around looking for relevant config files but haven’t found the right ones yet.

Running “ip route show” now gives:

default via 192.168.7.1 dev usb0 onlink
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.97
192.168.2.1 dev eth0 scope link
192.168.6.0/24 dev usb1 proto kernel scope link src 192.168.6.2
192.168.7.0/30 dev usb0 proto kernel scope link src 192.168.7.2

When the 192.168.7.1 gateway is deleted (sudo route del default gw 192.168.7.1), the 192.168.2.1 dev eth0 route becomes default and I have internet connection. After reboot, 192.168.7.1 is default again.

Thanks for any suggestions.

Hi Jake,

There really shouldn't be a major change with that package, it was
mostly a copy and paste from the boot script to something more
maintainable..

https://github.com/beagleboard/customizations/tree/master/usr/bin

Regards,

Thanks for the reply Robert.

I have tested removing/re-installing bb-usb-gadgets, and that does result in different default gateways. When removed, the eth0 route is default.

Maybe the root cause is elsewhere, and this package is simply revealing an underlying config issue?

I’ve found that, with bb-usb-gadgets installed, I can make eth0 the default route by adding the below lines to /etc/network/interfaces.

auto eth0
iface eth0 inet dhcp

However, when bb-usb-gadgets is NOT installed, those lines are not needed, the default route is eth0 whether or not they are present.

Anyone have a hypothesis of what might be causing that change in behaviour? I’m far from an expert with Linux or networks, but it seems like having bb-usb-gadgets installed is either changing the order in which network config files are read/applied (causing /etc/network/interfaces to be read later and overwrite settings from elsewhere), or else /etc/network/interfaces is only being read with bb-usb-gadgets installed.