beaglebone networking thru usb cable

I’m trying to get the networking for the beaglebone over the usb0 cable to reach the internet. I’m using ubuntu 11.10 as the host pc. I eject the sd card and the wired connection connects.

on the host I have:

eth1 Link encap:Ethernet HWaddr d4:94:a1:2b:93:99
inet addr:192.168.7.1 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::d694:a1ff:fe2b:9399/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5416 (5.4 KB) TX bytes:9473 (9.4 KB)

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:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:26:4d:5a:d1:ec
inet addr:192.168.1.67 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::226:4dff:fe5a:d1ec/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:130696 errors:0 dropped:0 overruns:0 frame:0
TX packets:74912 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:170070136 (170.0 MB) TX bytes:7659533 (7.6 MB)

and on the beaglebone I have:

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:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb0 Link encap:Ethernet HWaddr BA:E6:F0:54:B0:49
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::b8e6:f0ff:fe54:b049/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9291 (9.0 KiB) TX bytes:5850 (5.7 KiB)

I’ve tried to enable NAT on the host using the following:

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

echo “1” >/proc/sys/net/ipv4/ip_forward

This still doesn’t work for me. I’ve tried on ubuntu 10.04 LTS and ubuntu 11.10. I’m at a lost of what to try next.

Travis

Create a bridge interface useing brctl on the host and connect eth1 and wlan0 to it also using brctl.

Then adjust the routing on the host to use br0 for default gateway useing route command.