Why is usb0 configured?

I have commented usb0 out of /etc/networks/interfaces but it configures anyway:

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

But it comes up anyway:

usb0 Link encap:Ethernet HWaddr 0e:38:c9:c0:25:e6
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

This unit is nowhere near a USB port. I really don’t what this interface up.

This is

3.8.13-bone28 #1 SMP Fri Sep 13 03:12:24

As stated here:
http://elinux.org/BeagleBoardUbuntu#Raring_13.04_armhf

"Disable by removing "run_boot-scripts" from small boot partition..."

Which will disable the script that automatically sets up usb0 on bootup..

Regards,

I am also trying to figure this one out, My run_boot-scripts is empty anyway, But usb0 still comes up.

"is empty" It's an empty file to begin with.. Just remove it
completely with "rm".

Regards,

May I ask where do you find run_boot-scripts? I’m working on a BeagleBone Black and I can’t find this file.

Thanks!

/boot/uboot/run_boot-scripts

btw, i've nuke that file interface on later images..

Regards,

I installed an image which is BBB-eMMC-flasher-ubuntu-13.10-2014-02-16-2gb. Probably that’s why I didn’t find the file. I want to change the default ip address for usb0. I found out that in the script /opt/scripts/boot/am335x_evm.sh there is one line to setup the port. Can I change it there? will it work?

Thanks!

Yeap, but also /etc/network/interfaces... (don't ask why i do it in
both places..)

Regards,

How do we disable the USB0 interface on the newer images? Do we wipe the references from /opt/scripts/boot/am335x_evm.sh, and /etc/network/interfaces, or is there something else?

How do we disable the USB0 interface on the newer images? Do we wipe the references from /opt/scripts/boot/am335x_evm.sh, and /etc/network/interfaces, or is there something else?

Correct…

Hi Robert,

old thread I know but I’ve been trying to disable ethernet on USB0 and this is the closest I’ve gotten to an answer.
Is this the correct way to go about it?

I’m asking because I tried commenting out everything regarding usb0 in /opt/scripts/boot/am335x_evm.sh and /etc/network/interfaces as well as in /etc/udhcpd.conf.
I rebooted and the usb0 ehthernet was disabled (no USB0 when I did ifconfig) but my colleagues were a bit upset as I apparently had started a dhcp server on my beaglebone at the same time, which messed with our real dhcp server so they got bad ip addresses.

So, what did I do wrong? Should I have left the /etc/udhcp.conf alone?

cheers,

Per

NNNN

I had to clean /etc/network/interfaces and /opt/scripts/boot/am335x_evm.sh of all references to the USB0 items.

The udhcpd.conf file tells your beagle bone how to behave as a DHCP server (which it had to do for USB since your PC would not be handing out DHCP licenses to a device connected by USB).

When you modified the conf file, it started handing out DHCP leases on the interface you put in (probably eth0, which is why your beagle bone was giving out ip address to devices on your network). If you put the interface back to usb0 in /etc/udhcpd.conf, it will stop doing that, and will have no adverse consequences.

At some point you might want to disable udhcpd altogether as you will not need it unless you intend the beagle bone be a DHCP server

-=Eric Schumann

my /etc/network/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 dhcp

Example to keep MAC address between reboots

#hwaddress ether 7c:66:9d:4e:5e:DD

The secondary network interface

#auto eth1
#iface eth1 inet dhcp

WiFi Example

#auto wlan0
#iface wlan0 inet dhcp

wpa-ssid “essid”

wpa-psk “password”

Ethernet/RNDIS gadget (g_ether)

… or on host side, usbnet and random hwaddr

Note on some boards, usb0 is automaticly setup with an init script

#iface usb0 inet static

address 192.168.7.2

netmask 255.255.255.0

network 192.168.7.0

gateway 192.168.7.1

and my /opt/scripts/boot/am335x_evm.sh:

#!/bin/sh -e