[ovs-discuss] Problems setting up VxLAN

Dominic Curran gigamuffin at gmail.com
Fri Feb 21 17:48:43 UTC 2014


My distro is Ubuntu 13.10:
$ uname -r
3.11.0-12-generic

But b/c I was concerned that it might not fully implement vxlan,  I
downloaded from openvswitch.org and built using the INSTALL.Debian
instructions.

so the version is:
$ sudo ovs-vswitchd -V
ovs-vswitchd (Open vSwitch) 2.1.90
Compiled Feb 19 2014 00:29:36
OpenFlow versions 0x1:0x1

..its basically the master tip from late last week.

I was concerned that my problem was that I didnt have the vxlan.ko module
loaded, and that when I _did_ load it openvswitch wasnt dependent on it.

But looking through the openvswitch code the file:
    datapath/linux/compat/vxlan.c
seems to have all the right kind of functions in the do the encapsulation.
I checked with 'objdump' that these functions (like vxlan_xmit_skb() ) are
really getting built into my oenvswitch.ko, and they are, so I guess I
really do have a VXLAN config issue.

Since I already have vxlan functions that do encapsulation in openvswitch
it would explain why the openvswitch module doesnt need to depend on the
kernels vxlan module.

Sorry, I'm thinking out loud.  I'll try the configuration that Gurucharan
suggested exactly and ask questions if need be.

Thanks
dom



On Thu, Feb 20, 2014 at 2:05 PM, Dominic Curran <gigamuffin at gmail.com>wrote:

> Scrum that.
>
> cd /lib/modules/3.11.0-12-generic/kernel/drivers/net
> modprobe vxlan
>
> $ lsmod | grep vx
> vxlan                  27837  0
> ip_tunnel              23600  1 vxlan
>
> Still no dependency on openvswitch though ??
>
>
> On Thu, Feb 20, 2014 at 1:48 PM, Dominic Curran <gigamuffin at gmail.com>wrote:
>
>>
>>
>>
>> On Thu, Feb 20, 2014 at 7:29 AM, Gurucharan Shetty <shettyg at nicira.com>wrote:
>>
>>> On Wed, Feb 19, 2014 at 2:19 PM, Dominic Curran <gigamuffin at gmail.com>
>>> wrote:
>>> > Hi
>>> >
>>> > I'm running OVS on top of Ubuntu 13.10.  I have installed OVS and
>>> built the
>>> > tip of the latest master (as of yesterday).
>>> >
>>> > I'm trying to setup VXLAN between two machines.
>>> >
>>> >
>>> > The two machines can ping each other on their DHCP assigned addresses.
>>> >
>>> > On M1 I setup:
>>> > $ sudo ovs-vsctl add-br br1
>>> > $ sudo ifconfig br1 192.168.0.101 netmask 255.255.255.0
>>> > $ sudo ovs-vsctl add-port br1 vx -- set interface vx type=vxlan
>>> > options:remote_ip=192.168.0.102 options:key=40
>>> This won't work.
>>> Assuming eth1 of M1 is connected to eth1 of M2:
>>> Keep the IP address on eth1 and not on br1.
>>>
>>> Or do something like this on M1
>>> ovs-vsctl add-br br1
>>> ovs-vsctl add-port br1 eth1
>>> ifconfig br1 192.168.0.101 netmask 255.255.255.0
>>>
>>> ovs-vsctl add-br br-int
>>> ovs-vsctl add-port br-int vx -- set interface vx type=vxlan
>>> options:remote_ip=192.168.0.102 options:key=40
>>>
>>> Similar on M2
>>>
>>> #on M1
>>> ifconfig br-int 1.2.3.4/24
>>>
>>> #on M2
>>> ifconfig br-int 1.2.3.5/24
>>>
>>> Now, you can ping 1.2.3.5 from M1 over a vxlan tunnel, provided that
>>> your kernel module supports vxlan tunnels.
>>>
>>>
>> So do I need a vxlan kernel module then ?
>>
>> B/c I found a blog which shows a vxlan module loaded:
>> e.g.
>> $ lsmod | grep openv
>> openvswitch            66772  0
>> vxlan                  37238  1 openvswitch
>> gre                    13888  1 openvswitch
>> libcrc32c              12603  1 openvswitch
>>
>> ...when showing how to setup OVS & Fedora.
>>
>> Link:
>> http://networkstatic.net/install-open-vswitch-networking-red-hat-fedora-20/
>>
>> I ask because I do not have such a module loaded:
>> $ lsmod | grep openv
>> openvswitch            79599  0
>> gre                    14174  1 openvswitch
>> libcrc32c              12615  1 openvswitch
>>
>> and when I try to load the module it fails with an error:
>>
>> dom at ubuntu:/lib/modules/3.11.0-12-generic/kernel/drivers/net$ sudo
>> insmod vxlan.ko
>> [sudo] password for dom:
>> Error: could not insert module vxlan.ko: Unknown symbol in module
>>
>> $ tail /var/log/kern.log -n5
>> Feb 20 20:09:01 ubuntu kernel: [   12.881112] device ovs-system entered
>> promiscuous mode
>> Feb 20 20:09:01 ubuntu kernel: [   12.881301] openvswitch: netlink: Key
>> attribute has unexpected length (type=62, length=4, expected=0).
>> Feb 20 20:09:01 ubuntu kernel: [   12.997359] device br1 entered
>> promiscuous mode
>> Feb 20 21:02:54 ubuntu kernel: [ 3245.701560] vxlan: Unknown symbol
>> ip_tunnel_get_stats64 (err 0)
>> Feb 20 21:35:44 ubuntu kernel: [ 5215.922225] vxlan: Unknown symbol
>> ip_tunnel_get_stats64 (err 0)
>>
>>
>> Its a 13.10 Ubuntu kernel:
>> $ uname -r
>> 3.11.0-12-generic
>>
>> Which I find a bit odd.  is this a known issue ?  Do I need to build a
>> later kernel as well.
>>
>> Any help appreciated.
>>
>> Thanks
>> dom
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20140221/3c69e1fe/attachment-0002.html>


More information about the discuss mailing list