I want to connect VMs located on two different machines with ovs bridge and VxLAN tunnel, suppose the topology as the picture topology shows, my configuration on host A like this(configuration on host B is almost the same except changing remote_ip to address of host A'eth0):
ovs-vsctl add-br ovs-br0
ovs-vsctl add-port ovs-br0 vtep -- set interface vtep type=vxlan options:remote_ip=172.168.1.200 options:key=5000
tap0 is created and automatically added to bridge ovs-br0 while starting VMs with qemu, but I cannot ping from VM1 to VM2.
I also googled some links like this: http://networkstatic.net/configuring-vxlan-and-gre-tunnels-on-openvswitch/ , which says I have to create two ovs-bridge, unfortunately, it doesn't tell whether(and how to) it is necessary to link these two bridges together.
I am confused that how does the ovs-br0 and eth0 communicate, does that the kernel TCP/IP stack help doing this job, or I have to create another ovs-bridge and connect these two bridges with patch ports ?
So please correct me if my topology or configurations aren't right, and many thanks in advance.
Best Answer
I have solved this problem.
My configurations on vxlan tunnel with ovs bridge is correct, the reason that I can't ping from VM1 to VM2 is wrong steps in installing ovs. I forgot make modules_install to install the built .ko files to kernel lib path.
One ovs bridge is enough to build ovs vxlan tunnel, packets coming from VMs will be enpsulated with outter header at vtep port, then routed according to routing table and forwarded to physical port eth0. We don't need to connect and physical port explicitly, OS kernel will help do that for us.