Two Ethernet connections to the same subnet

wmauss

New Member
Joined
Mar 24, 2022
Messages
1
Reaction score
0
Credits
22
Hello All,

I am using a Raspberry Pi 2B as a network bridge under Raspbian 11 (bullseye).
For this purpose I have connected a USB/Ethernet adapter as the second Ethernet interface. The bridge is configured between eth0 and eth1 and it works fine. If I connect a PC across that bridge to my router, the PC is assigned an IP adress and network access works.

In order to access the Raspberry via SSH console, I have plugged a second USB/Ethernet adapter (eth2). I want to connect to the Raspberry from another computer via the same router as above, in order to configure the bridge throughput and to read the volume transmitted across the bridge.

The problem is, that the SSH access works fine only if I just plug eth2 to my router. However, the SSH connection fails few seconds after I connect the bridge (eth0) to the router in addition. I do not understand the reason.

I found this page which suggests how to overcome what they call the "Linux ARP flux" problem.
https://load-balancer.inlab.net/knowledge-base/how-to-deal-with-arp-problems-on-linux/
While this seems to relate to my setup (machine connected to the same switch more than once), the suggested changes
Code:
Add to /etc/sysctl.conf:
net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.all.arp_announce=2
made no difference.

In addition, I was suggested to add to /etc/sysctl.conf the following lines
Code:
net.ipv4.conf.all.arp_filter = 1
net.ipv4.conf.all.rp_filter = 1
and to apply these configurations
Code:
sudo iptables -t nat -I POSTROUTING 1 -o eth0 -j MASQUERADE
sudo iptables -t nat -I POSTROUTING 2 -o eth1 -j MASQUERADE
sudo iptables -t nat -I POSTROUTING 3 -o eth2 -j MASQUERADE
but to no success, behavior remained unchanged.

So I am wondering if anybody here has some idea how to overcome the problem?

In advance thanks for your help!

Werner
 
Last edited:

Staff online

Members online


Top