Hi all,
Some of us choose to build Fedora servers (instead of using Centos, for vary reasons) with many virtuals, each with different IP. Everytime I have to follow these guidelines https://fedoramagazine.org/build-network-bridge-fedora/ So the question: Is there a tool to simply setup a bridge interface?
Thanks Cristian Sava
On 21 September 2017 at 09:08, Cristian Sava csava@central.ucv.ro wrote:
Hi all,
Some of us choose to build Fedora servers (instead of using Centos, for vary reasons) with many virtuals, each with different IP. Everytime I have to follow these guidelines https://fedoramagazine.org/build-network-bridge-fedora/ So the question: Is there a tool to simply setup a bridge interface?
You can do it in the NetworkManager interface ... but I'm not really sure what exactly you are asking.
Can you not just script nmcli and call that script to automatically do it for you each time?
There's an nmcli ansible module you might be able to construct a playbook with?
http://docs.ansible.com/ansible/latest/nmcli_module.html
Can you be a little more specific with your requirements? If so I'm sure a more specific and detailed answer can be supplied.
On 21 September 2017 at 14:57, James Hogarth james.hogarth@gmail.com wrote:
On 21 September 2017 at 09:08, Cristian Sava csava@central.ucv.ro wrote:
Hi all,
Some of us choose to build Fedora servers (instead of using Centos, for vary reasons) with many virtuals, each with different IP. Everytime I have to follow these guidelines https://fedoramagazine.org/build-network-bridge-fedora/ So the question: Is there a tool to simply setup a bridge interface?
You can do it in the NetworkManager interface ... but I'm not really sure what exactly you are asking.
Can you not just script nmcli and call that script to automatically do it for you each time?
There's an nmcli ansible module you might be able to construct a playbook with?
http://docs.ansible.com/ansible/latest/nmcli_module.html
Can you be a little more specific with your requirements? If so I'm sure a more specific and detailed answer can be supplied.
Oh and just a small follow-up from that old article ... the present version of NetworkManager in EL7 and Fedora do no use special *-slave types and instead the raw device is just associated with the master... whatever that is.
See this article for more details:
https://www.hogarthuk.com/?q=node/18
If you have an existing connection of "System em1" for instance the quickest way to turn that into a bridge with a device name of br0 is now:
nmcli connection add type bridge ifname br0 con-name "System bridge" nmcli connection add type ethernet ifname em1 con-name "System em1" master br0 connection.autoconnect yes
That's off the top of my head, and a quick check of my blog, but should be accurate enough to get you going.
On Thu, 2017-09-21 at 15:31 +0100, James Hogarth wrote:
If you have an existing connection of "System em1" for instance the quickest way to turn that into a bridge with a device name of br0 is now:
nmcli connection add type bridge ifname br0 con-name "System bridge" nmcli connection add type ethernet ifname em1 con-name "System em1" master br0 connection.autoconnect yes
That's off the top of my head, and a quick check of my blog, but should be accurate enough to get you going.
Thanks for your reply.
Why do I need to specify this long list of parameters for basic things?
To be more precise, I expect something really simple like: nmcli tobridge ifcfg-eth0 nothing more, instead of the two complicated lines, because all configuration is already in ifcfg-eth0 and the bridge will be build from that. Same for reverse: nmcli tonormal br-eth0
It should also be an option at install time to choose bridge instead normal ethernet. As of now we have no option to do that in the graphical network configuration tool!
So, I know how to do that but it's not easy for average user and that's a problem to be solved.
Cristian Sava
On 09/21/2017 11:30 PM, Cristian Sava wrote:
To be more precise, I expect something really simple like: nmcli tobridge ifcfg-eth0 nothing more, instead of the two complicated lines, because all configuration is already in ifcfg-eth0 and the bridge will be build from that.
How is there enough information in there to create a bridge since the only information in that file is to configure an ethernet interface.
It should also be an option at install time to choose bridge instead normal ethernet.
What use would a bridge be for installing? I can understand maybe a vlan config but not a bridge.
As of now we have no option to do that in the graphical network configuration tool!
Install nm-connection-editor.
So, I know how to do that but it's not easy for average user and that's a problem to be solved.
Why would an average user have any use at all for this?
I don't even understand from your original question what it is you're trying to do.
On Thu, 2017-09-21 at 23:54 -0700, Samuel Sieb wrote:
On 09/21/2017 11:30 PM, Cristian Sava wrote:
To be more precise, I expect something really simple like: nmcli tobridge ifcfg-eth0 nothing more, instead of the two complicated lines, because all configuration is already in ifcfg-eth0 and the bridge will be build from that.
How is there enough information in there to create a bridge since the only information in that file is to configure an ethernet interface.
Directly from my F27 (thanks Fedora team!) workstation that hosts virtual boxes:
[cristi@s222 network-scripts]$ cat ifcfg-enp0s25 TYPE=Ethernet #PROXY_METHOD=none #BROWSER_ONLY=no BOOTPROTO=none DEFROUTE=yes #IPV4_FAILURE_FATAL=yes #IPV6INIT=yes #IPV6_AUTOCONF=yes #IPV6_DEFROUTE=yes #IPV6_FAILURE_FATAL=no #IPV6_ADDR_GEN_MODE=stable-privacy NAME=enp0s25 UUID=a78eed75-14d9-3cec-8ae0-0b914751495a ONBOOT=yes #AUTOCONNECT_PRIORITY=-999 DEVICE=enp0s25 #IPADDR=193.a.b.222 #PREFIX=27 #GATEWAY=193.a.b.193 #DNS1=193.a.b.52 #DNS2=193.a.b.254 #DOMAIN="domain1.ro" #IPV6_PRIVACY=no BRIDGE=bridge0
[cristi@s222 network-scripts]$ cat ifcfg-bridge0 DEVICE=bridge0 TYPE=Bridge IPADDR=193.a.b.222 NETMASK=255.255.255.224 GATEWAY=193.a.b.193 DNS1=193.a.b.52 DNS2=193.a.b.254 ONBOOT=yes BOOTPROTO=none
I think it's clear enough that you have all you need to go from ifcfg- enp0s25 to ifcfg-enp0s25 & ifcfg-bridge0 and also do a reverse thing.
It should also be an option at install time to choose bridge instead normal ethernet.
What use would a bridge be for installing? I can understand maybe a vlan config but not a bridge.
NO. You have a server or workstation with virtual boxes with IPs to connect to. So you have to switch to a bridge your normal interface of the host.
As of now we have no option to do that in the graphical network configuration tool!
Install nm-connection-editor.
Yes, you have to know and install it.
So, I know how to do that but it's not easy for average user and that's a problem to be solved.
Why would an average user have any use at all for this?
Because you want to integrate (and connect to) his virtual box.
I don't even understand from your original question what it is you're trying to do.
You have a physical box and you want a web server and a mail server on it. So you will put one in a virtual box. You have a workstation and you need wine in a different box and accessed from around stations.
On 09/21/2017 11:30 PM, Cristian Sava wrote:
Why do I need to specify this long list of parameters for basic things?
If you're doing this for virtualization purposes (as opposed to creating a network bridge with multiple interfaces), the simpler answer is:
virsh iface-bridge eth0 br0 --no-stp
On Fri, 2017-09-22 at 08:38 -0700, Gordon Messmer wrote:
On 09/21/2017 11:30 PM, Cristian Sava wrote:
Why do I need to specify this long list of parameters for basic things?
If you're doing this for virtualization purposes (as opposed to creating a network bridge with multiple interfaces), the simpler answer is:
virsh iface-bridge eth0 br0 --no-stp
Well, it's not that simple:
[cristi@localhost ~]$ sudo virsh iface-bridge enp5s0 br0 --no-stp [sudo] password for cristi: error: An error occurred, but the cause is unknown
[cristi@localhost ~]$ sudo systemctl stop NetworkManager [cristi@localhost ~]$ systemctl start network Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
This is from my F26 home desktop with F23 and F28 in virtual (I don't care here of dirrect connection to the main interface but I tested virsh) Yes I can fix it but ... On the same box, following https://fedoramagazine.org/build-network-bridge-fedora/ all is working as expected with NM and without NM_CONTROLLED=NO
And sure I can write a simple script and use it ... so, let's stop this debate and leave things as they are.
Sorry for the late response C.S.