I have setup a Raspberry Pi 3 (master) connected via USB to two Raspberry Pi Zero's (slaves). I have enabled dwc2 and g_ether on all devices. When I attach the USB's I automatically get IP addresses generated for each USB connection on each device.
For instance the master gets:
usb1: inet 169.254.77.143 netmask 255.255.0.0 broadcast 169.254.255.255`
usb2: inet 169.254.206.101 netmask 255.255.0.0 broadcast 169.254.255.255`
And the slaves get:
usb0: inet 169.254.89.28 netmask 255.255.0.0 broadcast 169.254.255.255
usb0: inet 169.254.147.186 netmask 255.255.0.0 broadcast 169.254.255.255
With this setup, from each slave I should be able to ping the relative master USB IP address, however from one slave I can ping both master IP addresses, but from the other slave I cannot ping either USB address.
Slave 1 should be able to ping
169.254.77.143, and slave 2
169.254.206.101, however we instead see slave 1 can ping both IP's, but slave 2 cannot ping either.
I've also attempted to set static IP addresses in the
/etc/network/interfaces file to resolve this issue, but I was seeing the same problem.
I am trying to make it so the master Pi can send UDP broadcast messages to the slave Pi's, and the slave Pi's can send TCP messages back to master. I have the code capable for this to work, however I need to give the master a broadcast IP address for over USB, and the slaves need the master's USB IP address.
Does anyone have any ideas as what could be causing this issue?