[Solved] Openvswitch on LEDE router not connecting to SDN controller

Hi,
I'm trying to connect my ovs (ran on my LEDE flashed router) to a SDN controller which I have running on my laptop (IP 192.168.2.173) but it can't seem to connect
The errors I am getting in the logs are
2018-03-11T00:22:09.543Z|00068|fail_open|INFO|Still in fail-open mode after 1418 seconds disconnected from controller
2018-03-10T23:30:19.488Z|00039|in_band|WARN|br-lanOVS: cannot find route for controller (192.168.2.173): No such device or address.

Here's my current set up for the OVS:

Bridge br-lanOVS
    Controller "tcp:192.168.2.173:6633"
    Port "eth0.3"
        Interface "eth0.3"
    Port "eth0.6"
        Interface "eth0.6"
    Port br-lanOVS
        Interface br-lanOVS
            type: internal
    Port "eth0.5"
        Interface "eth0.5"
    Port "eth0.4"
        Interface "eth0.4"
ovs_version: "2.8.1"

I am able to ping 192.168.2.173:6633 from the router and so I am unsure what I'm doing wrong.
I am writing on this forum as I feel I might have something set in my network configuration that is preventing this connection.

config interface 'loopback'                                                                                                                                                                                 
        option ifname 'lo'                                                                                                                                                                                  
        option proto 'static'                                                                                                                                                                               
        option ipaddr '127.0.0.1'                                                                                                                                                                           
        option netmask '255.0.0.0'                                                                                                                                                                          
                                                                                                                                                                                                            
config globals 'globals'                                                                                                                                                                                    
        option ula_prefix 'fd15:d9b1:1a87::/48'                                                                                                                                                             
                                                                                                                                                                                                            
config interface 'lan'                                                                                                                                                                                      
        option type 'bridge'                                                                                                                                                                                
        option ifname 'eth0.1'                                                                                                                                                                              
        option proto 'static'                                                                                                                                                                               
        option netmask '255.255.255.0'                                                                                                                                                                      
        option ip6assign '60'                                                                                                                                                                               
        option ipaddr '192.168.2.1'                                                                                                                                                                         
                                                                                                                                                                                                            
config device 'lan_dev'                                                                                                                                                                                     
        option name 'eth0.1'                                                                                                                                                                                
        option macaddr '70:4f:57:45:61:fa'                                                                                                                                                                  
                                                                                                                                                                                                            
config interface 'wan'                                                                                                                                                                                      
        option proto 'dhcp'                                                                                                                                                                                 
        option ifname 'eth0'                                                                                                                                                                                
                                                                                                                                                                                                            
config device 'wan_dev'                                                                                                                                                                                     
        option name 'eth0'                                                                                                                                                                                  
        option macaddr '70:4f:57:45:61:fb'                                                                                                                                                                  
                                                                                                                                                                                                            
config interface 'wan6'                                                                                                                                                                                     
        option ifname 'eth0'                                                                                                                                                                                
        option proto 'dhcpv6'                                                                                                                                                                               
                                                                                                                                                                                                            
config switch                                                                                                                                                                                               
        option name 'switch0'                                                                                                                                                                               
        option reset '1'                                                                                                                                                                                    
        option enable_vlan '1'                                                                                                                                                                              
        option enable_learning '0'                                                                                                                                                                          
                                                                                                                                                                                                            
config switch_vlan                                                                                                                                                                                          
        option device 'switch0'                                                                                                                                                                             
        option vlan '2'                                                                                                                                                                                     
        option ports '5 6'                                                                                                                                                                                  
                                                                                                                                                                                                            
config switch_vlan                                                                                                                                                                                          
        option device 'switch0'                                                                                                                                                                             
        option vlan '3'                                                                                                                                                                                     
        option ports '1'                                                                                                                                                                                    
                                                                                                                                                                                                            
config switch_vlan                                                                                                                                                                                          
        option device 'switch0'                                                                                                                                                                             
        option vlan '4'                                                                                                                                                                                     
        option ports '2'                                                                                                                                                                                    
                                                                                                                                                                                                            
config switch_vlan                                                                                                                                                                                          
        option device 'switch0'                                                                                                                                                                             
        option vlan '5'                                                                                                                                                                                     
        option ports '3'                                                                                                                                                                                    
                                            
config switch_vlan                                                                                                                                                                                          
        option device 'switch0'                                                                                                                                                                             
        option vlan '6'                                                                                                                                                                                     
        option ports '4'                                                                                                                                                                                    
                                                                                                                                                                                                            
config interface 'lan1'                                                                                                                                                                                     
        option ifname 'eth0.3'                                                                                                                                                                              
        option _orig_ifname 'eth0.3'                                                                                                                                                                        
        option _orig_bridge 'false'                                                                                                                                                                         
        option proto 'static'                                                                                                                                                                               
                                                                                                                                                                                                            
config interface 'lan2'                                                                                                                                                                                     
        option ifname 'eth0.4'                                                                                                                                                                              
        option proto 'static'                                                                                                                                                                               
        option _orig_bridge 'false'                                                                                                                                                                         
                                                                                                                                                                              
                                                                                                                                                                                                            
config interface 'lan3'                                                                                                                                                                                     
        option ifname 'eth0.5'                                                                                                                                                                              
        option proto 'static'                                                                                                                                                                               
        option _orig_bridge 'false'                                                                                                                                                                         
                                                                                                                                                                                
                                                                                                                                                                                                            
config interface 'lan4'                                                                                                                                                                                     
        option ifname 'eth0.6'                                                                                                                                                                              
        option proto 'static'                                                                                                                                                                               
        option _orig_bridge 'false'                                                                                                                                                                         
                                                                                                                                                                              
                                                                                                                                                                                                            
config interface 'wwan'                                                                                                                                                                                     
        option proto 'dhcp'             

I am still quite new to LEDE and networking in general so I feel I might have made a simple mistake. Any help would be greatly appreciated thank you

There used to be a time where using OVS and Linux bridges was not permitted.
Not sure about the state of things now.

In any case this mix is a bit tricky to get right between OVS and Linux bridges.

You'd have 2 options:

  1. Just use the br-lan interface as a single port to the OVS bridge ; and use the Linux bridge to handle VLANs assignment ;
  2. Don't use Linux bridges at all [remove any br-lan / lan bridge interfaces] and just bind all eth0.X interfaces as ports to the OVS bridge. You'd probably need to tell OVS about each VLAN tags in all eth0 interfaces. Not sure if you need to create pseudo-bridges for each interfaces [example: ovs4 bound to VLAN 4 [ so just port eth0.4 ] ]

I'm still a bit vague on how to do OVS & OpenWrt.
It's not quite straightforward.
This is mostly stuff from memory.

With the newly added openvswitch packages this issue is not a problem any more

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