Article 5N6TD Minutes after Bridge set up, can't connect to host anymore

Minutes after Bridge set up, can't connect to host anymore

by
somanyquestions
from LinuxQuestions.org on (#5N6TD)
I have 2 little single board computers running Linux.
Let's call them the "gadget", and the "host". One is configured as a USB ethernet gadget, connected to the host's USB-host port.
That USB connection works with network interfaces called "usb0" on each computer.
The host also has a eth0 interface, connected to an external switch, to a network with a bunch of other devices.

The subnet used by devices on the switch is 10.0.*.*.

Host:
eth0 is in that net: 10.0.20.7/16 (it has an additional IP in another subnet (10.111.*.*), not related to this task)
usb0 has one IP: 69.254.200.188

Gadget:
usb0 has 2 addresses:
- 169.254.200.199/16 - connection between gadget and host
- 10.0.22.7/16 - to be on the switch's subnet, too

That's the setup currently after boot, through /etc/network/interfaces,
extept the host's usb0 IP is configured with a script that waits for the usb0 showing up, and then assigns the IP/netmask with ifconfig.

As that is, I can, from my PC (10.0.12.1) - also connected to the switch, connect to the host e.g. with SSH / SCP.

Then I start a script that sets up a bridge:

Code:ip link add name br0 type bridge
ip link set dev br0 up
ip link set dev eth0 master br0
ip link set dev usb0 master br0After that, I can log, from the PC, into host/eth0 by the 10.0.21.7 - just as before.
I now also can, from the PC, log into the gadget by 10.0.22.7 - so the bridging works.
Well, kinda.

Because this works for a while. Timing not exactly reproducible. Sometimes tens of seconds, sometimes 10 minutes, with me randomly opening and closing additional connections with PuTTY and WinSCP.
Then, at some point, I can still connect to the gadget, bridged by the host - but not to the host itself anymore.
I also can't, from the host, connect to the gadget, or the other way around, in the 169.254.x.x net. (it does initially work after the bridge was set up, and also fails when the other stuff fails, whether it takes 10s of seconds or minutes)

I don't exactly understand the implications of this output yet, but FWIW, here is the "ip neigh show" output (it could be less detailed than usual - it's the BusyBox implementation. I'll mention that just in case, ...)

Before running the script that sets up the bridge:
Code:10.0.12.1 dev eth0 lladdr 68:05:ca:47:9f:32 ref 1 used 14/14/9 probes 0 REACHABLEAfter bridge setup and a few connections made (host):
Code:10.0.22.7 dev eth0 used 266/1275/264 probes 6 FAILED
10.111.0.1 dev eth0 used 28/1187/25 probes 6 FAILED
169.254.200.199 dev usb0 used 247/1200/243 probes 6 FAILED
10.0.12.1 dev br0 lladdr 68:05:ca:47:9f:32 used 1120/1180/1120 probes 0 STALE
10.111.0.1 dev br0 lladdr 00:11:32:ab:a4:e9 ref 1 used 1119/26/43 probes 0 REACHABLE
10.0.12.1 dev eth0 lladdr 68:05:ca:47:9f:32 used 232/168/134 probes 1 STALEOr just now with some fewer connections made until it keeled over (host side):
Code:10.0.12.1 dev eth0 ref 1 used 0/149/0 probes 4 INCOMPLETE
10.0.12.1 dev br0 lladdr 68:05:ca:47:9f:32 ref 1 used 212/0/149 probes 0 REACHABLE
169.254.200.199 dev usb0 used 153/242/152 probes 6 FAILEDCorresponding gadget side "ip neigh":
Code:169.254.200.188 dev usb0 lladdr 16:22:33:44:55:66 STALE
10.0.12.1 dev usb0 lladdr 68:05:ca:47:9f:32 STALE(I have serial connections to both board computers, too, in case you're wondering)

I have now disconnected all else from the switch but the PC and the host, to make sure nothing relating to other network participants is going on.

Does anyone have an idea what the source of problems may be here?
Especially, why it takes from seconds to minutes for it to fail.latest?d=yIl2AUoC8zA latest?i=2lesXM6x0p8:lsJzWeYpv84:F7zBnMy latest?i=2lesXM6x0p8:lsJzWeYpv84:V_sGLiP latest?d=qj6IDK7rITs latest?i=2lesXM6x0p8:lsJzWeYpv84:gIN9vFw2lesXM6x0p8
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments