debian and networking

Networking is not my strong suit, so I will ask the group.

I cannot get Networking to work on debian.
Once connected to the BBB, I cannot get networking to work via my usb.

Can anyone tell me what I need to do? or stuff to try?

Details:

You have no default route. Try running:

ip route add default via 192.168.7.1 dev usb0

This would be setup by the usb0 entry in /etc/network/interfaces, but I
think Robert changed the underlying network configuration in order to
improve the boot speed. You probably have to edit a wicd config file or
something...I don't use the USB port so I'm not sure.

$ route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0 usb0

You have no default route. Try running:

ip route add default via 192.168.7.1 dev usb0

This would be setup by the usb0 entry in /etc/network/interfaces, but I
think Robert changed the underlying network configuration in order to
improve the boot speed. You probably have to edit a wicd config file or
something…I don’t use the USB port so I’m not sure.

The usb0 didn’t change, it was statically defined so it didn’t mess with Boot times. eth0 on the other hand, with dhcp enabled it delayed everything. Although I just switched eth0 to allow-hotplug vs auto. Which fixed the main delay, but wicd was still a few seconds faster.

Then wicd must be doing something to the default gateway. It ought to
be defined by the gateway line in the usb0 stanza of the interfaces
file, but it looks like in this case it didn't "stick".

I'm pretty good with networking, but don't generally use wicd or the usb
interface, so I'm not familiar with this issue first-hand. I guess I've
got some learning to do...since I'm tracking your images for Machinekit,
I've now got wicd in control of my Ethernet port. :slight_smile:

Doesn’t changing eth0 from auto to allow-hotplug, mean that rebooting with the cable plugged in will not automatically connect on eth0?

$ route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0 usb0

You have no default route. Try running:

ip route add default via 192.168.7.1 dev usb0

This would be setup by the usb0 entry in /etc/network/interfaces, but I
think Robert changed the underlying network configuration in order to
improve the boot speed. You probably have to edit a wicd config file or
something…I don’t use the USB port so I’m not sure.

The usb0 didn’t change, it was statically defined so it didn’t mess with Boot times. eth0 on the other hand, with dhcp enabled it delayed everything. Although I just switched eth0 to allow-hotplug vs auto. Which fixed the main delay, but wicd was still a few seconds faster.

Doesn’t changing eth0 from auto to allow-hotplug, mean that rebooting with the cable plugged in will not automatically connect on eth0?

I haven’t seen that happen yet. The biggest thing, serial console doesn’t wait for an ip from dhcp. (This was only for Debian)

I just tried it (on Debian). For me if I don't have "auto eth0" in my /etc/network/interfaces, then eth0 does not activate until I manually do ifup eth0 explicitly. Also plugging/unplugging eth0 cable is ignored until I manually activate the interface. I am using your netinstall with kernel 3.13.10-bone9. Puzzled?

Cheers,

Dave.

Oh by the way, the startup script under:

/opt/scripts/boot/am335x_evm.sh loades the gadget module and sets up
the network udhcp for usb0. But i think you disabled those scripts in
your image build. so you might have usb0 disabled..

Regards,

My new images attempt to stay as close to your BeagleBone Debian images
as possible, to the point of including the node.js and chromium
"bloatware" I'd rather see removed. :slight_smile:

Hopefully this will make support on our side easier:
  "I don't know, go ask Robert!" :wink:

My previous images were based on the minimal Debian builds from your
script, and I didn't jump through any hoops to try and port the Angstrom
BeagleBone specific features like usb networking.

...I did change the desktop background image, but yours is still on the
/opt partition if folks want to change back.

Oh by the way, the startup script under:

/opt/scripts/boot/am335x_evm.sh loades the gadget module and sets up
the network udhcp for usb0. But i think you disabled those scripts in
your image build. so you might have usb0 disabled…

So is this why nothing I have been able to do works?
How do I enable this script when booting? And is this the whole problem.

I would think that this should be fixed before BBB goes with Debian in the the next go around.

Jerry

Look closely at the lines below. Hint it has to do with first and last lines :wink:

Subnet Mask = 255.255.255.252

connect to BBB using:

screen /dev/tty.usbmodem2413 115200

on BBB:

$ ping 74.125.224.137
connect: Network is unreachable

At this point it doesn’t matter what resolv.conf has in it, as it can’t get out to DNS anyway.

$ cat /etc/network/interfaces | grep -v ‘^#’

auto lo
iface lo inet loopback

iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1

well, that was odd . .

Subnet Mask = 255.255.255.252 and netmask 255.255.255.0

Mismatch.

hmm. I don’t have anything to do with what the osx gives me.
should I change the BBB interfaces to match the 255.255.255.252 that I see in osx?

I am no expert with networking either, for a more complete description use wikipedia or just google and read.

Here is what I think i understand is happening here. OSX is setting up the network so only 3 IP addresses on this network can be used, *.1, *.2, and broadcast *.255. broadcast is never assigned to any one machine. Now, the BBB is set to have the whole range open. That is .1-.254 plus *.255 for broadcast. I believe this can cause network issues, so best to have both set to the same value. the OSX value of 255.255.255.252 is possibly slightly more secure. BUt if the OSX machine and the BBB are connected directly together . . . personally I think it is a moot point.

SO, change either the BBB to 255.255.255.252, or the OSX machine to 255.255.255.0.

ok will try setting the BBB side and I will let you know.

nope. set to .252 on both sides. no network at all.

anyone who KNOWS got an answer?