I'm trying to configure a bridge between two TAP interfaces each created inside their own network namespace, on Linux. I'm using OpenVSwitch as software bridge.
These are the steps that I believe should work:
ip netns add test_ns1
ip netns exec test_ns1 ip tuntap add mode tap testif1
ip netns exec test_ns1 ip addr add 192.168.1.1/24 dev testif1
ip netns exec test_ns1 ip link set testif1 up
ip netns add test_ns2
ip netns exec test_ns2 ip tuntap add mode tap testif2
ip netns exec test_ns2 ip addr add 192.168.1.2/24 dev testif2
ip netns exec test_ns2 ip link set testif2 up
ovs-vsctl add-br test_br
ip netns exec test_ns1 ovs-vsctl add-port test_br testif1
ip netns exec test_ns2 ovs-vsctl add-port test_br testif2
ip netns exec test_ns1 ping -c 2 192.168.1.1
ip netns exec test_ns2 ping -c 2 192.168.1.2
ip netns exec test_ns1 ping -c 2 192.168.1.2
ip netns exec test_ns2 ping -c 2 192.168.1.1
All four ping commands will not work and report 100% packet loss.
I would expect to be able to ping the interface from inside its own namespace (testif1 from test_ns1, for example). I can do that with the Quantum interfaces, but not with mine, why?
Then, I am quite sure OpenVSwitch is installed correctly because I am running the stock Ubuntu version and I have OpenStack Quantum running on the same machine.