OpenWrt Forum Archive

Topic: Tunnels dont work in openvswitch: Address family not supported by prot

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi Everyone

I am trying to create tunnels in ovs, however, for some reason I havenĀ“t been able to understand, I am getting an "Address family not supported by protocol" error.

# ovs-vsctl --may-exist add-br mybridge
# ovs-vsctl add-port mybridge vxlan0  -- set interface vxlan0 type=vxlan options:remote_ip=192.168.123.123

ovs-vsctl: Error detected while setting up 'vxlan0'.  See ovs-vswitchd log for details.

in the log I see

2017-11-14T18:20:28+01:00 info kernel[]: [   12.886836] openvswitch: Open vSwitch switching datapath 2.5.0
2017-11-14T18:20:28+01:00 info kernel[]: [   12.892752] openvswitch: LISP tunneling driver
2017-11-14T18:20:28+01:00 info kernel[]: [   12.897206] openvswitch: STT tunneling driver
. . .
2017-11-15T16:02:16+01:00 debug ovs-vswitchd[]: ovs|00280|netlink_socket|DBG|nl_sock_transact_multiple__ (No error information): nl(len:52, type=22(ovs_vport), flags=9[REQUEST][ECHO], seq=e2, pid=3690441953,genl(cmd=3,version=1)
2017-11-15T16:02:16+01:00 debug ovs-vswitchd[]: ovs|00281|netlink_socket|DBG|nl_sock_recv__ (No error information): nl(len:72, type=2(error), flags=0, seq=e2, pid=3690441953 error(-19(No such device), in-reply-to(nl(len:52, type=22(ovs_vport), flags=9[REQUEST][ECHO], seq=e2, pid=3690441953))
2017-11-15T16:02:16+01:00 debug ovs-vswitchd[]: ovs|00282|netlink_socket|DBG|received NAK error=0 (No such device)
2017-11-15T16:02:16+01:00 debug ovs-vswitchd[]: ovs|00283|netlink_socket|DBG|nl_sock_transact_multiple__ (No error information): nl(len:72, type=22(ovs_vport), flags=9[REQUEST][ECHO], seq=e3, pid=3690441953,genl(cmd=1,version=1)
2017-11-15T16:02:16+01:00 debug ovs-vswitchd[]: ovs|00284|netlink_socket|DBG|nl_sock_recv__ (No error information): nl(len:92, type=2(error), flags=0, seq=e3, pid=3690441953 error(-97(Address family not supported by protocol), in-reply-to(nl(len:72, type=22(ovs_vport), flags=9[REQUEST][ECHO], seq=e3, pid=3690441953))
2017-11-15T16:02:16+01:00 debug ovs-vswitchd[]: ovs|00285|netlink_socket|DBG|received NAK error=0 (Address family not supported by protocol)
2017-11-15T16:02:16+01:00 warning ovs-vswitchd[]: ovs|00286|dpif|WARN|system@ovs-system: failed to add vxlan0 as port: Address family not supported by protocol

Same thing with any other tunnelling protocol (gre, lisp, ...)

Analyzing modules for vxlan, for instance, I see that openvswitch uses udp_tunnel, but vxlan uses ip6_udp_tunnel

root@turris:~# lsmod |grep openvs
libcrc32c                779  1 openvswitch
openvswitch           105401  2
udp_tunnel              1987  2 openvswitch
root@turris:~# lsmod |grep vxlan
ip6_udp_tunnel          1559  1 vxlan
vxlan                  29470  0

Do any of you guys understand what is going on?
This works pefectly when openvswitch runs in Ubuntu, for instance

I compiled openvswitch 2.5.0 with Chaos Calmer

Any help would appreciated!

I realized there are two datapath files in the source tree

  3550442     60 -rw-r--r--   1 jmguzman jmguzman    59321 Nov 19 22:13 ./build_dir/target-i386_i486_uClibc-0.9.33.2/linux-x86_kvm_guest/openvswitch-2.5.0/datapath/datapath.c
  3679253     56 -rw-r--r--   1 jmguzman jmguzman    53859 Nov  8 09:03 ./build_dir/target-i386_i486_uClibc-0.9.33.2/linux-x86_kvm_guest/linux-3.18.80/net/openvswitch/datapath.c

It seems that it is compiling the datapath that comes with kernel, instead of the dapapath that comes with the openvswitch package

Do you know how to switch to the package dataplane?

The discussion might have continued from here.