1

I am trying to get Linux to function as a switch by bridging two network interfaces together, but do not appear to get to ARP replies to flow back. My topology is as follows:

[Client 1] -- [Linux Switch] -- [Client 2]

The "switch" is basically two interfaces bridged together. The Clients share connections to the two ports on the Switch.

I ran them as follows:

brctl addbr bridger brctl addif enp0s3 brctl addif enp0s8 ifconfig bridger up

When client 1 sends a ping, it initiates by sending a "who-has" request to the Linux "Switch". The Linux "Switch" sends that request to Client 2. A tcpdump(8) on Client 2 reveals that there is a "Reply to 10.1.0.1 is-at 08:00:27:69:da:47 (oui Unknown), length 28".

However, the Linux "switch" does not appear to receive that responses at all. Either the client is failing to send them (which does not appear to be the case due to the tcpdump line) or the switch is failing to receive them. What is causing this?

I have eliminated all iptables(8) rules as follows:

iptables -t nat -F iptables -F

The hypervisor is virtualbox on Windows, all VMs are Ubuntu and I have disabled network-management everywhere.

  • Good question, it should "just work". Check that there are also no rules in the other tables -t filter, -t mangle, -t raw. Check that ebtables is not loaded, or no rules are active if it is loaded. Do tcpdump both on enp0s3 and enp0s8 (two windows), and see if the arp reply at least arrives. You can use bridge instead of brctl to inspect the forwarding database (sudo bridge fdb show), check if the MAC addresses of Client 1 and Client 2 are correct. – dirkt Nov 2 '17 at 10:16
  • I have done all of the above, no dice. Odd. – Farhan Yusufzai Nov 2 '17 at 18:03
  • Wild shot: Any network interfaces with an IP range overlapping that of Client 1 or Client 2? – dirkt Nov 2 '17 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.