8

I create an OVS bridge with:

# ovs-vsctl add-br br-int

This create a netdevice that I can see in ifconfig. And then I create a NetworkManager connection and bring it up:

# nmcli connection add type generic con-name br-int autoconnect yes ifname br-int ip4 1.1.1.1/24
# nmcli con up br-int ifname br-int

However, each time after I reboot the host (Ubuntu 16.04) the connection has to be manually brought up again. Is there a way to tell NetworkManager to automatically bring up this interface once OVS has created it?

user389238
  • 612
  • 4
  • 8
  • 17
  • what is the distro you're using, and what is the version? Any message you can find? I remember there were some bugs around ovs on rhel(eg. https://bugzilla.redhat.com/show_bug.cgi?id=1242171 ), and the solution might differ depends on your environment. – shogo2022 Aug 16 '17 at 22:13
  • @shogo2022 It is Ubuntu 16.04 server. I installed NetworkManager with apt. – user389238 Aug 16 '17 at 22:48
  • Create a script and run it at boot, perhaps? – Davidw Aug 17 '17 at 00:18

2 Answers2

9

Set connection.autoconnect property true for the connection br-int.

To modify the connection settings like: nmcli connection modify br-int connection.autoconnect true

You can also use nmtui command instead fight with nmcli command.

minish
  • 626
  • 3
  • 10
  • Is the "connection.autoconnect=true" setting the same thing as the "autoconnect yes" that I am already passing via nmcli invocation? If so then it does not seem to work. – user389238 Aug 21 '17 at 02:49
  • You could use `nmtui` as indicated to check whether autoconnect was indeed set right. – Luke H Aug 21 '17 at 08:27
0

I've faced with the same issue when I need to create an Open vSwitch bridge which doesn't required IP addresses like br-int, br-tun etc and after the server reboot NetworkManager doesn't brought them up.

The root cause of the issue is "ovs-interface" connection got "ipv4.method" and "ipv6.method" are set to "auto".

The solution is to set "ipv4.method" and "ipv6.method" to "disabled" for "ovs-interface" connection only like

nmcli conn add type ovs-bridge conn.interface br-int con-name br-int
nmcli conn add type ovs-port conn.interface br-int master br-int con-name ovs-port-br-int
nmcli conn add type ovs-interface slave-type ovs-port conn.interface br-int 
      master ovs-port-br-int con-name ovs-if-br-int ipv4.method disabled ipv6.method disabled
Oleg Neumyvakin
  • 599
  • 4
  • 15