How to setup ethernet over USB with Debian

I’m using this image:
https://rcn-ee.net/deb/flasher/wheezy/BBB-eMMC-flasher-debian-7.3-2014-01-24-2gb.img.xz

I was able to get this working with Angstrom following these instructions:
http://lanceme.blogspot.ca/2013/06/windows-7-internet-sharing-for.html

specifically:
route add default gw 192.168.7.1
echo “nameserver 8.8.8.8” >> /etc/resolv.conf

But it’s not working for me with Debian.

ping 192.168.7.1 works
ping 8.8.8.8 does not
ping google.com does not

Other details, not sure if useful:

root@arm:/var/log# ifconfig
eth0 Link encap:Ethernet HWaddr 90:59:af:61:6d:6a
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)
Interrupt:56

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: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 d6:4d:8d:1f:46:e4
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::d44d:8dff:fe1f:46e4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14476 errors:0 dropped:0 overruns:0 frame:0
TX packets:7382 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2317191 (2.2 MiB) TX bytes:2633478 (2.5 MiB)


root@arm:/var/log# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.7.1     0.0.0.0         UG    0      0        0 usb0
192.168.7.0     *               255.255.255.252 U     0      0        0 usb0

Thanks for your help group

so maybe your Windows system is blocking ip forwarding.
pinging 8.8.8.8 and google.com say the same thing because 8.8.8.8 is a name server out in the wild wild Internet and google.com is a server out in the same space.
Your route table looks like mine so what’s left is your host computer so I think you’ll find the answer searching for how or why Windows does ip forwarding.

Doug

But It was working before I flashed over the Angstrom image with Debian.
I’ll try undoing and redoing the commands on my PC when I get home.

I guess I just wanted to make sure that what I was trying to do should work…

Thanks group.

But It was working before I flashed over the Angstrom image with Debian.
I’ll try undoing and redoing the commands on my PC when I get home.

if you changed the OS on the BBB then wouldn’t it look like a different device to your host and possible use different firewall rules? I’ve heard that sometimes Windows tries too hard to help.

I guess I just wanted to make sure that what I was trying to do should work…

it would seem you already did that by getting the Angstrom OS to work. Once you changed out that OS it’s just a matter of persuading the other OS(s) to do the same. Not really BBB related it would seem.

Doug

Its not, or shouldnt be a firewall issue. This would be related to ICS ( internet connection sharing ) if anything, on the windows PC side.

So the important thing to test at this moment would be to make sure the BBB and the PC can communicate between themselves.

there has to be communication or else how could the route and nameserver be set on the BBB? Surely if this was the case it wouldn’t be an internet over USB issue because well, without the USB ethernet there can not be any Internet access.

I’ve pretty much given up on Windows years ago so what ever it’s called, something is probably not working on the Windows side because what was setup for Angstroms USB ethernet widget is probably not going to be also setup for the widget Debian would setup. I learned the pain of Windows long ago and know you can not assume anything with that platform involved.

Doug

Unsharing the internet connection and resharing it did the trick, thanks guys!

Glad you got it working Chris.