Results 1 to 2 of 2

Thread: Removing bridge in Network Manager

  1. #1

    Default Removing bridge in Network Manager

    I created a network bridge for use with qemu/kvm, with Network Manager nmcli command line. I followed these steps:
    Code:
    # Create bridge and add eth0 to it
    nmcli con add type bridge ifname br0 stp no
    nmcli con add type bridge-slave ifname eth0 master br0
    
    # Disable current connection
    nmcli con down "Wired connection 1"
    
    # Enable the bridge
    nmcli con up bridge-br0
    nmcli con up bridge-slave-eth0
    Fortunately it seemingly works.

    But now I need to go back to original status without bridge. So I followed the process backwards: set the bridges down and deleted them.

    Problem is, I was left with no eth0 "wired" connection. I had to either restart NetworkManager service or reboot.

    But this feels like an ugly unorthodox way to restore original wired connection.
    Is there a more "correct" way to do this by using nmcli?

    Thanks beforehand for your attention.

  2. #2
    Join Date
    Sep 2012
    Posts
    8,042

    Default Re: Removing bridge in Network Manager

    Quote Originally Posted by F_style View Post
    I was left with no eth0 "wired" connection. I had to either restart NetworkManager service or reboot.

    But this feels like an ugly unorthodox way to restore original wired connection.
    "Wired connect N" is automatically created by NetworkManager on startup for each wired interface if there is no other "better" persistent connection definition applicable to this interface. This connection is not stored persistently unless you modified it. So restarting NetworkManager is exactly the correct (actually, the only) way to get it back.
    Is there a more "correct" way to do this by using nmcli?
    You can use nmcli to define connection profile for this wired interface with any name you want including "Wired interface 1". You can tell nmcli to not store this connection definition persistently, in which case on reboot you get back usual automatic connection.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •