Lookin for best method to create a network bridge CentOS 7
-
I usually just created the interface scripts by hand and disabled Network Manager, but a colleague just told I should just be using Network Manager to create the bridge. Is there a best practice on how to create network bridges in CentOS 7 or it really doesn't matter?
-
@Romo Network Manager used to be the bane of my life and would get disabled immediately up through 6. In 7 it seems to not be quite as misbehaved, but I still disable it more often than not. I think that's more a personal thing with my horrible prior experiences with it.
Either way will work, just be sure to have it documented!
nmcli is your friend when working on a server and Network Manager.
-
It depends, it's not really a best practice thing. If you are doing stuff manually server by server, Network Manager is pretty popular and it is an included tool so it is fine to use. It's a TUI, though, and a lot of people like to remove it.
If you are working via scripting or a DevOps toolset like Chef or Ansible then you likely don't want to use Network Manager as that would make things much harder. So it depends on the use case.
-
Ya as stated if it's done manually I'll use nmtui. If it's orchestrated I usually turn it off. There is an nmcli tool but Ive never done anything with it.
If I remember right, there is a bug with bonding also (bridging seems to work fine). I had to disable it for bonding to work correctly. That was on 7.2.
-
One other thing. You can still edit the ifcfg files even with Network Manager. At least I've never had an issue with doing that.
-
Guess I'll try setting the bridge with nmtui to check how it works.
-
@stacksofplates Another quick question, it is better to create the bridge from the os network utils instead of relying in virtmanager to create it right?
-
FWIW I still think the scripts are easier to use and understand. My opinion is the way that Network Manager does the assigning is goofy, specifically how you reference other interfaces.
-
@Romo said in Lookin for best method to create a network bridge CentOS 7:
@stacksofplates Another quick question, it is better to create the bridge from the os network utils instead of relying in virtmanager to create it right?
That all depends. Macvtap is quick and dirty. Also has the benefits of not allowing network access between the host and VMs (can be a benefit or a hindrance depending on your scenario). If you want Full access across the bridge, then you'll have to manually create it.