User avatar
thagrol
Posts: 4021
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Howto: ethernet gadget on Pi4B USB C

Mon Jul 15, 2019 3:04 pm

In case anyone wants to try it, here's how I got a 4B running as a USB ethenet gadget.

Firstly, this only works on the USB C port not on the USB 2 or USB 3 ports. Because of this you may have to find another way to get power into the 4B.
  1. Requirements:
    • Raspberry Pi 4B (any RAM size) and asociated cables, SD card etc.
    • USB A male to USB C male cable.
    • Another computer to act as the USB host. I've not tried it but I guess you could loop back to the USB 2/3 ports on the 4B
  2. Procedure:
    1. On the 4B, edit /boot/config.txt and add

      Code: Select all

      dtoverlay=dwc2
    2. On the 4B, edit /boot/cmdline.txt adding

      Code: Select all

       modules-load=dwc2,g_ether
    3. Reboot
    4. Log in to the 4B and run

      Code: Select all

      ifconfig -a
      You should see a new usb0 network interface.
    5. If you haven't already, connect to your USB host with the USB A to USB C cable. The USB host will show a new USB network adapter.
    6. Configure both enternet interfaces as required. DHCP, static IP addresses, bridging, routing, etc
  3. Gotchas:
    • MAC addresses used for each end of the USB link are randomly generated each time the g_ether module is started. This will not cause problems if using static IP addresses but will when using DCHP assigned one (especially if your DHCP server sets address based on the MAC address).

      Fixed MAC addresses can be set by appending this to /boot/cmdline.txt:

      Code: Select all

       g_ether.host_addr=<MAC addres> g_ether.dev_addr=<MAC addres>
      MAC addresses are expected to be unique to an interface.

      I have a script here: https://github.com/thagrol/usb-gadget that can generate suitable MAC addresses based on the serial number of the Pi it's running on. RUn as

      Code: Select all

      sudo ./set_id.py --test
      and copy the generated MAC addresses into /boot/cmdline.txt
    • The content of /boot/cmdline.txt must be on a single line with a linux line ending. It's best to edit it on a Pi with nano/vi/leafpad/etc rather than on windows.
    • From a network/ethernet point of view it doesn't matter which end of the link is running as a USB master or slave. You can have DHCP servers etc running on the 4B and have them available to the USB host.
    • The normal (USB A) ports on the 4B are unaffected by this.
    • If the 4B does not switch to device mode, this can be forced by changing your config.txt entry to

      Code: Select all

      dtoverlay=dwc2,dr_mode=peripheral
      and rebooting.
[Editied to fix a coupls of spelling errors and typos]
Arguing with strangers on the internet since 1993.

ejolson
Posts: 6326
Joined: Tue Mar 18, 2014 11:47 am

Re: Howto: ethernet gadget on Pi4B USB C

Mon Jul 15, 2019 10:47 pm

thagrol wrote:
Mon Jul 15, 2019 3:04 pm
In case anyone wants to try it, here's how I got a 4B running as a USB ethenet gadget.

Firstly, this only works on the USB C port not on the USB 2 or USB 3 ports. Because of this you may have to find another way to get power into the 4B.
  1. Requirements:
    • Raspberry Pi 4B (any RAM size) and asociated cables, SD card etc.
    • USB A male to USB C male cable.
    • Another computer to act as the USB host. I've not tried it but I guess you could loop back to the USB 2/3 ports on the 4B
  2. Procedure:
    1. On the 4B, edit /boot/config.txt and add

      Code: Select all

      dtoverlay=dwc2
    2. On the 4B, edit /boot/cmdline.txt adding

      Code: Select all

       modules-load=dwc2,g_ether
    3. Reboot
    4. Log in to the 4B and run

      Code: Select all

      ifconfig -a
      You should see a new usb0 network interface.
    5. If you haven't already, connect to your USB host with the USB A to USB C cable. The USB host will show a new USB network adapter.
    6. Configure both enternet interfaces as required. DHCP, static IP addresses, bridging, routing, etc
  3. Gotchas:
    • MAC addresses used for each end of the USB link are randomly generated each time the g_ether module is started. This will not cause problems if using static IP addresses but will when using DCHP assigned one (especially if your DHCP server sets address based on the MAC address).

      Fixed MAC addresses can be set by appending this to /boot/cmdline.txt:

      Code: Select all

       g_ether.host_addr=<MAC addres> g_ether.dev_addr=<MAC addres>
      MAC addresses are expected to be unique to an interface.

      I have a script here: https://github.com/thagrol/usb-gadget that can generate suitable MAC addresses based on the serial number of the Pi it's running on. RUn as

      Code: Select all

      sudo ./set_id.py --test
      and copy the generated MAC addresses into /boot/cmdline.txt
    • The content of /boot/cmdline.txt must be on a single line with a linux line ending. It's best to edit it on a Pi with nano/vi/leafpad/etc rather than on windows.
    • From a network/ethernet point of view it doesn't matter which end of the link is running as a USB master or slave. You can have DHCP servers etc running on the 4B and have them available to the USB host.
    • The normal (USB A) ports on the 4B are unaffected by this.
    • If the 4B does not switch to device mode, this can be forced by changing your config.txt entry to

      Code: Select all

      dtoverlay=dwc2,dr_mode=peripheral
      and rebooting.
[Editied to fix a coupls of spelling errors and typos]
Did you need to cut any power wires in the USB C cable to prevent backpowering from the Pi up to the host port?

User avatar
thagrol
Posts: 4021
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Howto: ethernet gadget on Pi4B USB C

Mon Jul 15, 2019 11:02 pm

ejolson wrote:
Mon Jul 15, 2019 10:47 pm
Did you need to cut any power wires in the USB C cable to prevent backpowering from the Pi up to the host port?
I haven't done so but see my post here: https://www.raspberrypi.org/forums/view ... 8#p1500930
Arguing with strangers on the internet since 1993.

Notupus
Posts: 52
Joined: Tue Jun 19, 2018 9:57 am

Re: Howto: ethernet gadget on Pi4B USB C

Tue Jul 16, 2019 7:26 am

Can I do other USB gadgets such as a hid keyboard or a flash drive?

User avatar
thagrol
Posts: 4021
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Howto: ethernet gadget on Pi4B USB C

Tue Jul 16, 2019 11:49 am

Notupus wrote:
Tue Jul 16, 2019 7:26 am
Can I do other USB gadgets such as a hid keyboard or a flash drive?
I've not done so but I would expect them to work.
Arguing with strangers on the internet since 1993.

dominikp
Posts: 12
Joined: Mon Dec 17, 2018 9:54 am

Re: Howto: ethernet gadget on Pi4B USB C

Tue Mar 24, 2020 11:51 am

Oh man, this topic is HUUUGE news to me because so far AFAIK it was possible only on RpiZ!
But two questions first ...
1. After enabling this, USB on RPI cant be used for things like storage right? Or can it?
2. Does bandwidth on USB3.0<->USB3.0 connectionon go full speed (or close to it) or the driver itself caps this somehow? Had anybody measured this ?

Im using RPi3 for turning on and off my small NAS computer (with GPIO pins, didnt like WoL solution). I would love to replace it with RPI4 and have backup drive 2.5" attached to it and do backups throught 5 times faster USB3.0 instead of ethernet. Also, bridging Ethernet with USB@eth on RPI would allow me to get rid of ethernet attached directly to my NAS.

But this would be possible as long as answers for my 2 questions are positive.

ejolson
Posts: 6326
Joined: Tue Mar 18, 2014 11:47 am

Re: Howto: ethernet gadget on Pi4B USB C

Tue Mar 24, 2020 2:25 pm

dominikp wrote:
Tue Mar 24, 2020 11:51 am
Oh man, this topic is HUUUGE news to me because so far AFAIK it was possible only on RpiZ!
But two questions first ...
1. After enabling this, USB on RPI cant be used for things like storage right? Or can it?
2. Does bandwidth on USB3.0<->USB3.0 connectionon go full speed (or close to it) or the driver itself caps this somehow? Had anybody measured this ?

Im using RPi3 for turning on and off my small NAS computer (with GPIO pins, didnt like WoL solution). I would love to replace it with RPI4 and have backup drive 2.5" attached to it and do backups throught 5 times faster USB3.0 instead of ethernet. Also, bridging Ethernet with USB@eth on RPI would allow me to get rid of ethernet attached directly to my NAS.

But this would be possible as long as answers for my 2 questions are positive.
The data lines on the USB-C port in the Pi 4B run at USB2 speeds. In practice this turns out to be more than 5 times slower than gigabit Ethernet.

User avatar
thagrol
Posts: 4021
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Howto: ethernet gadget on Pi4B USB C

Tue Mar 24, 2020 3:09 pm

dominikp wrote:
Tue Mar 24, 2020 11:51 am
Oh man, this topic is HUUUGE news to me because so far AFAIK it was possible only on RpiZ!
Nope. any model of Pi without a USB hub between the port and the SoC's built in controller can do it. That's zero, zeroW(H), A, A+, 3A+, 4B (via the USB C port only), and the CM series (though that depnds on the carrier board). Setup is slightly different on A series boards as they have to be forced into peripheral mode when the dwc2 module is loaded.
But two questions first ...
1. After enabling this, USB on RPI cant be used for things like storage right? Or can it?
Correct. The SoC can do either host or device but not both simultaneously. It's possible to hot swap between modes but that brings its own set of problems. The exception is the 4B but only because it has two USB controllers.
2. Does bandwidth on USB3.0<->USB3.0 connectionon go full speed (or close to it) or the driver itself caps this somehow? Had anybody measured this ?
It's only USB 2 so capped at around 480Mbps.

Im using RPi3 for turning on and off my small NAS computer (with GPIO pins, didnt like WoL solution). I would love to replace it with RPI4 and have backup drive 2.5" attached to it and do backups throught 5 times faster USB3.0 instead of ethernet. Also, bridging Ethernet with USB@eth on RPI would allow me to get rid of ethernet attached directly to my NAS.

But this would be possible as long as answers for my 2 questions are positive.
Not gonna work. Transfer speed is determined by the speed of the slowest link in the chain. A device with 10Mb ethernet will never see faster transfers than that regardless of the interface between the server and it's drives. Plus the device mode capable USB ports on all Pi are only USB 2.

If you want to try it, bridging the g_ether provided interface with eth0 works exactly same way as bridging any other ethernet interfaces. It's a networking issue not a USB one.

As for replacing your current setup with a 4B, just follow one of the many tutorials on building a Pi based NAS. You can do remote shutdown (via ssh for example) but remote start won't be possible without additional hardware.
Arguing with strangers on the internet since 1993.

dominikp
Posts: 12
Joined: Mon Dec 17, 2018 9:54 am

Re: Howto: ethernet gadget on Pi4B USB C

Tue Mar 24, 2020 5:00 pm

Oh this is so sad. Well, then maybe i will find another solution then.
thagrol wrote: You can do remote shutdown (via ssh for example) but remote start won't be possible without additional hardware.
From my RPI3 there are 4 wires going out from GPIO pins to PWR_SW and PWR_LED pins of my NAS motherboard (asus p8h61-i). Offcourse they are not connected directly but with transoptors and resistors.
I wrote simple bash scripts which are placed on RPI to set the GPIO pin connected to PWR_SW to HIGH for 1second. Second script is for checking (from GPIO connected to PWR_LED) whether machine is running or not. This is mainly for cron entry, to keep the machine up and not turn it on and off all the time.

So RPI3 is working 24/7 and turns my NAS on with crontab scripts at 7AM. Shutdown (11PM) as you said is done on NAS itself (to shutdown services gracefully). Shutdown scripts also checks first if there is any traffic on SAMBA port (i sometimes watch movies at night :P ) or there are backups going on. If there are, then it repeats checks every 10min until i finish watching movie and/or backup will finish.

If something hangs or i need to turn it on remotely i can log in to my RPI with SSH and use those scripts manually/

Previously i had WoL solution but it was not very reliable.

User avatar
thagrol
Posts: 4021
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Howto: ethernet gadget on Pi4B USB C

Tue Mar 24, 2020 6:06 pm

What I meant was that while you can shutdown a Pi remotely you'll need additional hardware to start one. My comment was in the context of switching to a 4B based NAS.

Sorry if it wasn't clear.

incidentally, last time I need to find an alternative to a PC's unreliable WoL support I did it with a Pi zero: https://github.com/thagrol/fakewake
Arguing with strangers on the internet since 1993.

steveclarke0703
Posts: 7
Joined: Fri Jan 01, 2021 3:53 pm

Re: Howto: ethernet gadget on Pi4B USB C

Fri Jan 01, 2021 4:00 pm

Hi

I'm new to the Raspberry pi but slowly getting there on setup.

I have a Mac computer I'm trying to connect to my pi4 using this guide.

I managed to get it working such that the pi4 configures the USB-C port as an ethernet device and I can ping the device from my Mac using the self-assigned IP (which also works if, on the Mac side I give it a fixed IP).

But when I try to SSH to the pi, it prompts for a password and won't' accept any of the known passwords for the accounts setup on the pi. There seems to be no connection request logged in /var/log/auth.log

I'd already setup ssh to accept a private key from the same mac and this works when connecting using ssh -i (keyname) pi@hostWLANIP

But the same approach still prompts for a password when using the self assigned IP.

When I use ssh -v, it is reporting that SSH is connecting successfully.

So there seems to be some disjoin somewhere for this USB interface in allowing the SSH protocol or authenticating the user in the standard manner. I'm sure its a config issue somewhere on the pi side, especially given that I can already SSH into the pi via the eth0 and wlan0 interfaces with and without a password.

Wondering what I might be missing and would appreciate any suggestions to troubleshoot.

Thanks all.

[moderator, was asked to split off this question as a hijack, but there are too many replies, so Ill leave it here, but please don't hijack threads, its bad netiquette!]

User avatar
thagrol
Posts: 4021
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Howto: ethernet gadget on Pi4B USB C

Fri Jan 01, 2021 8:18 pm

steveclarke0703 wrote:
Fri Jan 01, 2021 4:00 pm
Wondering what I might be missing and would appreciate any suggestions to troubleshoot.
That isn't likely to be g_ether related if you've forced g_ether to load with a fixed dev_addr and host_addr. If you haven't, those two MAC address will be randomly generated each time the modules is loaded which can cause problems when using DHCP to assign IP addresses and, maybe, if you're doing MAC address filtering in your sshd config.

You can largely ignore that the interfaces are provided by g_ether and troubleshoot as you would sshd over any other netowk interface (WiFi, ethernet, etc)

One possibility if you're very new to this is a misunderstanding of how g_ether works.

g_ether provides two network interfaces. One to the device running g_ether and one to the USB host. Like any other pair of interfaces these must have unique IP addresses and MAC addresses. For routing to work correctly, if your Mac is connected to another network, the g_ether interfaces must be in a different subnet. E.g. if your Mac connects to your LAN with an IP of 192.168.1.27, you want to use something in the 10.0.0.X range for the g_ether link.

Lastly, when you say "using the self-assigned IP" is that the one from the 4B's end of the link or the one from the Mac's end? If you're using the one from the Mac's end, you'll be trying to login to your Mac not to the Pi.
Arguing with strangers on the internet since 1993.

steveclarke0703
Posts: 7
Joined: Fri Jan 01, 2021 3:53 pm

Re: Howto: ethernet gadget on Pi4B USB C

Sun Jan 03, 2021 10:32 am

@thagrol

Thanks for your feedback. Has proven helpful.

I think you're right, I was trying to connect to the Mac IP self assigned IP address.

So I assigned the pi with a Static IP of 10.55.0.1 and it has a subnet of 255.255.255.248

I then manually configured on the MacOS side a Static IP of 10.0.55.6 and the same subnet of 255.255.255.248.

I then tried to SSH to the 10.55.0.1 address or even PING it but no go.

I'm not sure how I'm supposed to configure the desktop side.

Note, I don't have any VLAN's configured with that subnet of 10.0.55.x on my network either. But there are no firewall rules blocking traffic as i can see it.

steveclarke0703
Posts: 7
Joined: Fri Jan 01, 2021 3:53 pm

Re: Howto: ethernet gadget on Pi4B USB C

Sun Jan 03, 2021 10:38 am

I think Step 6 in your guide is where things become unclear -

Configure both enternet interfaces as required. DHCP, static IP addresses, bridging, routing, etc

Its not clear how the DHCP/Static IP's, bridging, routing etc should be configured.

drgeoff
Posts: 11373
Joined: Wed Jan 25, 2012 6:39 pm

Re: Howto: ethernet gadget on Pi4B USB C

Sun Jan 03, 2021 10:42 am

You have written each of 10.0.55 and 10.55.0 twice so maybe not a typo. If those are what you really mean then is a subnet mask of 255.255.255.248 correct?
Quis custodiet ipsos custodes?

steveclarke0703
Posts: 7
Joined: Fri Jan 01, 2021 3:53 pm

Re: Howto: ethernet gadget on Pi4B USB C

Sun Jan 03, 2021 10:47 am

Tried removing the static IP addresses

So here is my MacOS side -

en11: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=6467<RXCSUM,TXCSUM,VLAN_MTU,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
ether 02:00:f7:cc:4d:a7
inet6 fe80::14f2:57b7:ecfb:3fbc%en11 prefixlen 64 secured scopeid 0x12
inet 169.254.147.215 netmask 0xffff0000 broadcast 169.254.255.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (100baseTX <full-duplex>)
status: active


and the pi4 side

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.75.133 netmask 255.255.0.0 broadcast 169.254.255.255
ether 06:00:f7:cc:4d:a7 txqueuelen 1000 (Ethernet)
RX packets 72 bytes 37116 (36.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 40 bytes 4664 (4.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


I ping 169.254.75.133 from 169.254.147.215 and i get a timeout.

When I ping from the other side, i get -

pi@PMDMZGATEWAY:~ $ ping 169.254.147.215
PING 169.254.147.215 (169.254.147.215) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted

But there are no firewall rules in place blocking those routes.

User avatar
thagrol
Posts: 4021
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Howto: ethernet gadget on Pi4B USB C

Sun Jan 03, 2021 11:51 am

steveclarke0703 wrote:
Sun Jan 03, 2021 10:38 am
I think Step 6 in your guide is where things become unclear -

Configure both enternet interfaces as required. DHCP, static IP addresses, bridging, routing, etc

Its not clear how the DHCP/Static IP's, bridging, routing etc should be configured.
It was writtent hat way because 1. there is no single, right way to do it, and 2. it's not a USB gdaget issue, it's a networking issue.
Arguing with strangers on the internet since 1993.

User avatar
thagrol
Posts: 4021
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Howto: ethernet gadget on Pi4B USB C

Sun Jan 03, 2021 12:33 pm

steveclarke0703 wrote:
Sun Jan 03, 2021 10:47 am
Tried removing the static IP addresses
Snip...

So if I read that correctly, the Mac times out and the 4B won't allow you to send pings.

Now, bear in mind that I don't have a Mac*and know next to nothing about MacOS.

Have you tried running ping on the 4B with sudo?

Does the Mac have any other network interfaces and if so do they have IP addresses in the same subnet?

Are either of the 4B's network interfaces up and if so do they have IP addresses in the same subnet?

Have you tired acccessing the 4B via hostname.local from the Mac, e.g. raspberrypi.local?

FYI, I'm going to ask the mods to split this topic as this is clearly a networking issue not a g_ether one.

*: If anyone has one to donate...
Arguing with strangers on the internet since 1993.

steveclarke0703
Posts: 7
Joined: Fri Jan 01, 2021 3:53 pm

Re: Howto: ethernet gadget on Pi4B USB C

Sun Jan 03, 2021 1:58 pm

So if I read that correctly, the Mac times out and the 4B won't allow you to send pings.

>>> correct it doesn't see the ip address the pi is assigned..

Now, bear in mind that I don't have a Mac*and know next to nothing about MacOS.

>>> it's just Linux


Have you tried running ping on the 4B with sudo?

>>> no

Does the Mac have any other network interfaces and if so do they have IP addresses in the same subnet?

>>>. Yes I can ping the Mac on another NIC with a different subnet (10.0.1.x) which the pi is mapped to for the wifi network (they share the same subnet)

Are either of the 4B's network interfaces up and if so do they have IP addresses in the same subnet?
>>> yes. The eth0 is up and being used by nordvpn (10.014.x) and wlan0 is up and using (10.0.1.x). The wlan subnet is whitelisted on the VPN as is the 10.55.0.x (when that was assigned to usb0).

Have you tired acccessing the 4B via hostname.local from the Mac, e.g. raspberrypi.local?
>>> yes, doesn't resolve as it has no way to do so..

FYI, I'm going to ask the mods to split this topic as this is clearly a networking issue not a g_ether one.

>>> think it's a g_ether issue as I think the instructions assume It will work for any desktop but it doesn't make Clea the post install steps and assumes no other network infrastructure.

User avatar
thagrol
Posts: 4021
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Howto: ethernet gadget on Pi4B USB C

Sun Jan 03, 2021 2:36 pm

steveclarke0703 wrote:
Sun Jan 03, 2021 1:58 pm
>>> think it's a g_ether issue
Nope. g_ether is working. You have usb0 interfaces on the 4B and the Mac. Everything else is OS level networking. Nothing to do with g_ether.

g_ether just provides the usb? network interfaces and encapsulates ethernet frames over USB. The OS does everything else. Network configuration is the same whether over USB with g_ether or over cat5 with two ethernet adapters.

The only thing g_ether does that may impact IP is that, unless configured otherwise, it generates new random MAC addresses each time it is loaded. Though I've only found that to be a problem when using DHCP to assign addresses.

You can override this behaviour by supplying the dev_addr and host_addr paramaters when the module is loaded.
as I think the instructions assume It will work for any desktop but it doesn't make Clea the post install steps and assumes no other network infrastructure.
It's a guide to how I got g_ether working. It is not a guide to complex networking setup. Sorry.
steveclarke0703 wrote:
Sun Jan 03, 2021 1:58 pm
So if I read that correctly, the Mac times out and the 4B won't allow you to send pings.

>>> correct it doesn't see the ip address the pi is assigned..
The error suggests something is blocking that user from sending ping packets, not that there is a name resolution or routing problem
Now, bear in mind that I don't have a Mac*and know next to nothing about MacOS.

>>> it's just Linux


Have you tried running ping on the 4B with sudo?

>>> no
In which case can you please do so. The error reported suggests you may need it for ping to function.

Does the Mac have any other network interfaces and if so do they have IP addresses in the same subnet?

>>>. Yes I can ping the Mac on another NIC with a different subnet (10.0.1.x) which the pi is mapped to for the wifi network (they share the same subnet)

Are either of the 4B's network interfaces up and if so do they have IP addresses in the same subnet?
>>> yes. The eth0 is up and being used by nordvpn (10.014.x) and wlan0 is up and using (10.0.1.x). The wlan subnet is whitelisted on the VPN as is the 10.55.0.x (when that was assigned to usb0).

Have you tired acccessing the 4B via hostname.local from the Mac, e.g. raspberrypi.local?
>>> yes, doesn't resolve as it has no way to do so..
Surprising. bonjour/avahi/mdns should be installed by default. Which OS are you using on the 4B?

Your network setup is complex. Multiple interfaces on the 4B, presumably with iptables and NAT setup too.

Sounds like a routing problem. Check your routing tables and manually add routes if needed.

Beyond that, you need a bigger network expert than me.
Arguing with strangers on the internet since 1993.

Return to “Networking and servers”