[ovs-discuss] Problem with mutiple vxlan tunnels only one works

slim tabka tabkaslim at gmail.com
Thu Jul 23 14:18:17 UTC 2015


Hello everyone,

I recently started working on ovs and while implementing vxlan when I
create 2 vxlan tunnels between two Hosts (KVM, I'm using libvirt to manage
KVM) everything works fine and I had no problems.

Then I needed to connect multiple hosts between them and due to the fact
that ovs does'n't support multi-casting, the topology that I'm using ,where
I encountered some problems that I'll explain, is connecting multiple hosts
to a vrouter (ubuntu VM with ovs) so I can do a simple configuration on
each host and like that I have only to manage the vrouter to assure the
tunneling between the hosts (star topology).

 I created 2 vxlan in two hosts, the vms in the first vxlan can ping each
other  but those in the second one can't ping each other (I used flow
control in the vrouter to connect the two hosts), my problem is that I a
correct configuration for the two vxlan and can't seem to find the problem
even when I create more bridges with a vxlan interface they don't seem to
work only he first bridge that I created works.

To make some tests I captured udp packets with tcpdump in the first host
but I can see the encapsulated packets from the first vxlan and none from
the other vxlan.

These are the configuration of the two hosts and the vrouter:
_________                                                        ________
|                 |                 _______                       |
       |
|                 |                |              |                      |
               |
|  HOST1   |________| vrouter  |___________| HOST2   |
|                 |                |_______|                      |
       |
|________ |                                                      |________|



*********************HOST1(10.0.60.120)**********************
ovs-vsctl add-br br1
ovs-vsctl add-br br2
ovs-vsctl add-port br1 vx1 -- set interface vx1 type=vxlan
options:remote_ip=10.0.60.140 options:keys=10
ovs-vsctl add-port br2 vx2 -- set interface vx2 type=vxlan
options:remote_ip=10.0.60.140 options:keys=20

root at host1:/home/slim# ovs-vsctl show    (exactely the same on the second
host)
14afba6d-4075-47e0-85a4-355aae20b642
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "eth0"
            Interface "eth0"
    Bridge "br2"
        Port "vnet1"
            Interface "vnet1"
        Port "br2"
            Interface "br2"
                type: internal
        Port "vx2"
            Interface "vx2"
                type: vxlan
                options: {keys="20", remote_ip="10.0.60.140"}
    Bridge "br1"
        Port "vnet0"
            Interface "vnet0"
        Port "vx1"
            Interface "vx1"
                type: vxlan
                options: {keys="10", remote_ip="10.0.60.140"}
        Port "br1"
            Interface "br1"
                type: internal
    ovs_version: "2.3.2"
root at host1:/home/slim# ovs-dpctl show
system at ovs-system:
lookups: hit:481 missed:153 lost:0
flows: 0
masks: hit:881 total:0 hit/pkt:1.39
port 0: ovs-system (internal)
port 1: br1 (internal)
port 2: br2 (internal)
port 3: vxlan_sys_4789 (vxlan: df_default=false, ttl=0)
port 4: vnet0
port 5: vnet1



*********************HOST2(10.0.60.130)**********************
ovs-vsctl add-br br1
ovs-vsctl add-br br2
ovs-vsctl add-port br1 vx1 -- set interface vx1 type=vxlan
options:remote_ip=10.0.60.140 options:keys=10
ovs-vsctl add-port br2 vx2 -- set interface vx2 type=vxlan
options:remote_ip=10.0.60.140 options:keys=20



*********************vrouter(10.0.60.140)**********************
ovs-vsctl add-br br1
ovs-vsctl add-br br2
ovs-vsctl add-port br1 vx1.1 -- set interface vx1.1 type=vxlan
options:remote_ip=10.0.60.120 options:keys=10
ovs-vsctl add-port br1 vx1.2 -- set interface vx1.2 type=vxlan
options:remote_ip=10.0.60.130 options:keys=10
ovs-vsctl add-port br2 vx2.1 -- set interface vx2.1 type=vxlan
options:remote_ip=10.0.60.120 options:keys=20
ovs-vsctl add-port br2 vx2.2 -- set interface vx2.2 type=vxlan
options:remote_ip=10.0.60.130 options:keys=20
ovs-ofctl show br1
ovs-ofctl add-flow br1 in_port=1,actions=output:2
ovs-ofctl add-flow br1 in_port=2,actions=output:1
ovs-ofctl add-flow br2 in_port=1,actions=output:2
ovs-ofctl add-flow br2 in_port=2,actions=output:1

root at vrouter:/home/slim# ovs-ofctl dump-flows br1
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=12808.910s, table=0, n_packets=0, n_bytes=0,
idle_age=12808, priority=0 actions=NORMAL
 cookie=0x0, duration=12614.007s, table=0, n_packets=247, n_bytes=23667,
idle_age=2695, in_port=1 actions=output:2
 cookie=0x0, duration=12607.024s, table=0, n_packets=263, n_bytes=23947,
idle_age=2695, in_port=2 actions=output:1
root at vrouter:/home/slim# ovs-ofctl dump-flows br1 && ovs-ofctl dump-flows
br2
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=12821.126s, table=0, n_packets=0, n_bytes=0,
idle_age=12821, priority=0 actions=NORMAL
 cookie=0x0, duration=12626.223s, table=0, n_packets=247, n_bytes=23667,
idle_age=2707, in_port=1 actions=output:2
 cookie=0x0, duration=12619.240s, table=0, n_packets=263, n_bytes=23947,
idle_age=2707, in_port=2 actions=output:1
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=12814.208s, table=0, n_packets=0, n_bytes=0,
idle_age=12814, priority=0 actions=NORMAL
 cookie=0x0, duration=12610.048s, table=0, n_packets=0, n_bytes=0,
idle_age=12610, in_port=1 actions=output:2
 cookie=0x0, duration=12597.760s, table=0, n_packets=0, n_bytes=0,
idle_age=12597, in_port=2 actions=output:1


root at vrouter:/home/slim# ovs-vsctl show && ovs-dpctl show
1de210f0-26cd-4e1e-8386-d724095f166b
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "eth0"
            Interface "eth0"
    Bridge "br1"
        Port "vx1.2"
            Interface "vx1.2"
                type: vxlan
                options: {keys="10", remote_ip="10.0.60.130"}
        Port "vx1.1"
            Interface "vx1.1"
                type: vxlan
                options: {keys="10", remote_ip="10.0.60.120"}
        Port "br1"
            Interface "br1"
                type: internal
    Bridge "br2"
        Port "vx2.1"
            Interface "vx2.1"
                type: vxlan
                options: {keys="20", remote_ip="10.0.60.120"}
        Port "br2"
            Interface "br2"
                type: internal
        Port "vx2.2"
            Interface "vx2.2"
                type: vxlan
                options: {keys="20", remote_ip="10.0.60.130"}
    ovs_version: "2.3.2"
system at ovs-system:
lookups: hit:43402 missed:59874 lost:0
flows: 26
masks: hit:222548 total:3 hit/pkt:2.15
port 0: ovs-system (internal)
port 1: br0 (internal)
port 2: eth0
port 3: br1 (internal)
port 4: br2 (internal)
port 5: vxlan_sys_4789 (vxlan: df_default=false, ttl=0)

I chose this way because multicasting is not supported in ovs so if any one
know about a better solution for connecting multiple hosts between them let
me know.
Can anyone help me understand why the first vxlan tunnel works and the
other don't? I'm quite sure that my configuration is correct and don't
think that this behavior is logical, and Id'ont know if it's a bug in ovs
or if it's not even related to ovs.
Thank you for your time and patience .

Best regards,
Slim TABKA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20150723/abbf94de/attachment-0002.html>


More information about the discuss mailing list