[Solved] What is the correct way to add gre or vxlan tunnel to openvswitch on LEDE?

The environment: I try to add router (TP-LINK 1043nd) with Lede-17.01 .4 and openvswitch installed on it to an SDN controlled by Opendaylight. I used this tutorial http://blog.ljdelight.com/turning-tp-link-wr1043ndv2-1-router-into-openflow-enabled-switch/ in order to install and configure OVS on LEDE and everything seems working fine: the switch is successfully connected to the controller, laptops connected to the switch can communicate between each other and I can see both hosts and the switch from the Opendaylight api.

The problem: how to connect the resulting switch to the rest of the SDN switches using gre or vxlan tunnels so that hosts connected to different switches could communicate between each other? In Ubuntu for example I would use something like

ovs-vsctl add-port br-int gre0 -- set interface gre0 type=gre options:remote_ip=

but it does not seem working in LEDE. After running the command above, there is an error that indicates that interface gre0 does not exist. Even though after the command the port gre0 can be seen from

ovs-vsctl show

it is not listed in

ovs-ofctl -OOpenflow13 dump-ports br-int

and therefore traffic from a host connected to one switch is not sent to the host connected to another switch. Worth mentioning that I have all necessary packages gre, grev4 and gre-kmod installed on the router.

Does anybody have experience in such kind of configurations? Any help would be appreciated.

@mizolotu were you able to find the root cause of this issue ?.

I am also facing a similar issue when I create a vxlan type port. Then I found below error in the log.

Tue May 22 10:09:46 2018 daemon.warn ovs-vswitchd: ovs|00440|dpif|WARN|system@ovs-system: failed to add tun-vxlan as port: Address family not supported by protocol

my openvswitch version is 2.5.0-22d4614ddf83988..55a and kmod-openvswitch version is 4.4.92+2.5.0-22d4614d..55a.

Hi @exterminator, unfortunately no, I got an answer in another topic that "ovs-vsctl add-port br-int gre0 – set interface gre0 type=gre options:remote_ip=" works fine for creating a GRE tunnel between two OVSs of version 2.8.1. So probably using newer version of OVS should solve the problem...

Hi @exterminator, in case you are still interested, everything works fine if openvswitch is installed while building lede from source. I followed section "Installation by selecting Open vSwitch while building Image from source" from here https://www.zymr.com/building-and-configuring-open-vswitch-on-openwrt-for-cloud-networking/ (basically just selecting all packages related to ovs). As a result I got ovs version 2.8.2 and both gre and vxlan tunnels seem working properly now.

Hi @mizolotu, Thanks!. I was able to migrate to 2.8.2 and it all works now :).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.