Bridging of eth0 and USB adapter based eth1 works and not

Hello all,

I wanted to create a kind of passthrough connection between the onboard ethernet port and a second ethernet port by plugging a USB to ethernet adapter. The reason was that I wanted to plug an RPi running Zabbix in between ISP handoff and the network to test data consumed over certain time in GB (not speed graph in K/Mbps).

So I did the following and that gives me something like a NIC teaming ( active / passive), but I was expecting bridging that allows full L2 passthru including dhcp and that does not happen.

I followed this document and then did the config as shown below.

I used HDMI Monitor to do this (left most HDMI port on RPI 4B) to ensure I don’t get locked out.

apt install bridge-utils


brctl addbr br0
brctl setfd br0 0
brctl addif br0 eth0 eth1

eth1 above is USB ethernet adapter.

nano /etc/network/interfaces

#add at the bottom the following

and under existing #Ethernet stanza, comment out all the lines

#Disable DHCP client on bridge interfaces
iface eth0 inet manual
iface eth1 inet manual

Bridge setup

auto br0
iface br0 inet static
bridge_ports eth0 eth1

Also under /etc/resolv.conf, I had to specify name servers.

With this diet-pi will show eth0 ON but disconnected and will ask to set up this interface via dietpi-config. Hit enter to login.

The ifconfig (I installed net-tools and traceroute as well as mc :slight_smile: ) shows br0 has IP address and is up and so are the eth0 and eth1 up, but no IP on these of course).

And I can then plug either of the ethernet port to the network and I can SSH into it as well as RPi is online. But if I use the second port to connect to a test laptop, I don’t get dhcp IP. I also tried by assigning static IP address on laptop NIC, in same subnet but still nothing.

Anyone having done any bridging setup something similar to my needs, please share your configuration. There is standard setup of Wireless AP bridged to ethernet for upstream access to Internet.

Thanks and stay healthy everyone.

I added following to make the passthru traffic work.

ifconfig eth0 -arp promisc up
ifconfig eth1 -arp promisc up

Did a reboot and now with laptop attached to either of eth0 or eth1 with other port connected to the network, I have laptop as well as RPi online and working.

Though it does not work to meet my needs of Zabbix application to see the traffic. Probably Zabbix is only able to see the traffic that leaves the bridge / interface and goes up the IP stack. So I will try some other way.


thanks for sharing your solution to setup a bridged network.
BTW: ifconfig deprecated and was replaced by ip command :wink:

Regarding your network analyze, I found following interesting guide on the web. Not sure if this what you are looking for