[PLUG] How best to connect a subnet of Pi Zeros? (Eric House)

Ken Stephens kennethgstephens at gmail.com
Thu Jan 28 20:37:07 UTC 2021


Eric,

How about reading in the lines from a file stored nearby?  Just wondering.

Ken

On Thu, Jan 28, 2021 at 10:53 AM Eric House <eehouse at eehouse.org> wrote:

> >> What are you planning to do with these Zeros? Are they going to be part
> >>  of a cluster or just doing randomly things independently of each other?
>
> > For now I'll be happy to have them online and reachable by name from the
> > rest of my network.
>
> I've got this working, so thought I'd report on what was involved, if only
> so I can find it when I accidentally wipe a micro-sd card. :-)
>
> First, I was actually mixing two problems: add a handful of usb gadgets and
> running a DMZ over an existing ethernet cable.
>
> The second problem I solved with 802.1Q by buying a smart switch for my
> office and, on it and on the existing gateway router's switch, tagging the
> existing VLAN and a new DMZ VLAN. One port of the new switch is tagged for
> the DMZ and so the Pi4 that hosts the Zeros when it plugs into that port is
> isolated in the DMZ.
>
> The first problem I solved by bridging all usb<N> interfaces with the eth0
> interface on the Pi4. /etc/network/interfaces is this simple (for two
> Zeros):
>
> allow-hotplug usb0
> iface usb0 inet manual
>     up brctl addif br0 $IFACE
>
> allow-hotplug usb1
> iface usb1 inet manual
>     up brctl addif br0 $IFACE
>
> auto br0
> iface br0 inet dhcp
>     # Use eth0's mac for consistent IP DHCP addr assignment
>     bridge_hw aa:bb:cc:dd:ee:ff
>     bridge_ports eth0 regex usb.*
>
> Unfortunately as my Zero collection grows I'll need to repeat the three
> per-iface lines over and over, but I can't find any regex-based way around
> it.
>
> Oh, and I had to disable avahi. It's possible that having done so will
> prevent other uses of usb in the future.
>
> # sudo systemctl disable avahi-daemon.service
>
> Anyway, thanks for the pointers getting me started!
>
> --Eric
> --
> My g-bike can trounce your e-bike!
> _______________________________________________
> PLUG: https://pdxlinux.org
> PLUG mailing list
> PLUG at pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



More information about the PLUG mailing list