USB Networking on Ubuntu

To get USB networking running from an Ubuntu PC, the instructions in USBNetworking will work, but there are two wrinkles.

Firstly, make sure that the Ubuntu network manager is set to configure usb0 correctly.

  1. Open System -> Preferences -> Network Connections

  2. Make sure there's a network interface in there which refers to usb0. It might be 'Auto usb0' or just 'usb0'. Select it and press 'Edit'.
  3. Ensure that 'Connect automatically' and 'Available to all users' are checked.
  4. Click the 'IPv4 Settings' tab.
  5. Select method 'Manual'.
  6. Set the address to, Netmask to and Gateway to
  7. Click 'Routes...'
  8. Check 'Use this connection only for resources on its network'
  9. Press OK, then Apply, then Close.

Secondly, a udev rule has to be added so that ifup and ifdown get run at the right times. Normally Ubuntu relies on its network manager to do this, but it doesn't support what we want to do.

Courtesy of, a suitable udev rule to put in /etc/udev/rules.d/85-ifupdown is:

SUBSYSTEM=="net", GOTO="net_start"


ACTION=="add",          RUN+="/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifup -- --allow hotplug $env{INTERFACE}"
ACTION=="remove",       RUN+="/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifdown -- --allow hotplug $env{INTERFACE}"


Balloonboard: USBNetworkingUbuntu (last edited 2009-09-30 19:07:35 by ChrisJones)