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?

3
  • 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. bugzilla.redhat.com/show_bug.cgi?id=1242171 ), and the solution might differ depends on your environment.
    – shogo2022
    Aug 16, 2017 at 22:13
  • @shogo2022 It is Ubuntu 16.04 server. I installed NetworkManager with apt.
    – user389238
    Aug 16, 2017 at 22:48
  • Create a script and run it at boot, perhaps?
    – Davidw
    Aug 17, 2017 at 0:18

2 Answers 2

9
+50

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.

2
  • 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, 2017 at 2:49
  • You could use nmtui as indicated to check whether autoconnect was indeed set right.
    – Luke H
    Aug 21, 2017 at 8: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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.