Zend certified PHP/Magento developer

Connect 3 subnets together

I’m trying to connect 3 subnets on 3 different NIC’s together.

In the schematic below I tried to show the connection diagram.
I’m going to connect an android phone via USB to a RPi4 and tether it’s 4G/5G connection over this connection.

On the RPi4 is running a DHCP server for the network connected to the Ethernet port (Range 192.168.5.0/24).

I’ll also connect another android phone by USB tethering, but without data connection.

As Android USB tethering runs it’s own DHCP service etc., it’s not possible to directly bridge all connections. (I think)

I’m able to direct traffic from the 192.168.5.0/24 network to the internet over the tethered connection.

So my question now is, is it possible to setup the Pi in such a way, that both android phones can connect straight to devices on the 192.168.5.0/24 subnet? Without the different DHCP servers interfering?

I’d like to not use Wlan as I’ll be using this setup in a public space, where I’m not sure about the wireless interference and I don’t want to broadcast this network, if not necessary.

┌───────────────────┐
│  Android Phone 1  │
│  USB Tether       │        USB
│  4G/5G            │◄───────────────────────┐
│                   │                        │
│  192.168.216.1    │                        │
└───────────────────┘                        │
                                             ▼
┌───────────────────┐                       ┌───────────────────────┐
│ Android Phone 2   │                       │  RPi 4                │
│ USB Tether        │        USB            │                       │
│ No Connection     │◄─────────────────────►│  Usb0: 192.168.216.21 │
│                   │                       │  Usb1: 192.168.42.15  │
│ 192.168.42.1      │                       │  Eth0: 192.168.5.1    │
└───────────────────┘                       │    DHCP: 192.168.5.1  │
                                            │                       │
┌───────────────────┐                       └───────────────────────┘
│ Ethernet Switch   │        Ethernet        ▲
│                   │◄───────────────────────┘
│ 192.168.5.0/24    │
└───────────────────┘
  ▲  ▲  ▲     ▲
  │  │  │     │
  │  │  │     │Ethernet
  │  │  │     │
  ▼  ▼  ▼     ▼
           ┌─────────────────┐
           │  PC 1           │
           │                 │
           │  192.168.5.100  │
           │                 │
           └─────────────────┘

If you need any more information, feel free to ask!

Thanks in advance!

Laurens