On Fri, 2015-10-16 at 17:47 -0300, Daniel Henrique Barboza wrote:
On 10/16/2015 05:25 PM, Ramon Medeiros wrote:
> Hi,
>
> to create a bridge on Fedora and Debian systems, it's possible to use
> brctl (who work in both), but it's not persistent. So, to create a
> persistent bridge, files must be create in
> /etc/sysconfig/network-scripts on Fedora and /etc/network/interfaces
> on debian based.
>
> Does not exist a tool that handle this issues? If not, how kimchi are
> dealing when working with this differences between distros?
>
Today, AFAIK, Kimchi does not deal with creating vlan and bridges and so
on. What kimchi does is check if they exist. This is done by reading and
parsing /sys/class/net files, which I believe are the same across distros.
But don't take only my work for it - check out
/plugins/kimchi/netinfo.py and see by yourself.
As for "Does not exist a tool that handle this issues ", I believe this
is a question that the network guys from Ginger can answer. I'll let
them come here and answer ...... but I can say in advance that this
kind of operation will be done in Ginger via ifup and ifdown scripts and
parsing of the network config files. We considered using Network Manager
to help us with these tasks, but decided not to because we can't enforce
the user to have NManager installed.
Right Ramon, Daniel.
Last friday i was discussing the same with Walter, how to handle
different distros specially Ubuntu(/etc/network/interface) which is
different in file handling as compared to
Fedora/RHEL/SUSE(/etc/sysconfig/network-scripts).
If we were using network manager , we would have been in better off with
the distors, as network manager would take care of all these internally.
But since we are not free to use it currently, by configuring the ifcfg
files which is persistent way in /etc/sysconfig/network-scripts and
using ifup/ifdown seems the better option. Similarly we have to take
care to add to ubuntu in /etc/network/interfaces, which is a special
case but currently we were thinking of targeting Fedora/RHEL/Suse which
are of same type and later add ubuntu support. ifup/ifdown commands
exist in Ubuntu, but configuring is different.
With respect to bridge, we can create a ifcfg-<bridge> file
in /etc/sysconfig/network-scripts.
Ex :- /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
IPADDR=192.168.1.1
PREFIX=24
BOOTPROTO=none
ONBOOT=yes
DELAY=0
In the interfaces which need to be part of bridge, we can add
BRIDGE=br0
Ex :- /etc/sysconfig/network-scripts/ifcfg-ethX
DEVICE=ethX
TYPE=Ethernet
HWADDR=AA:BB:CC:DD:EE:FF
BOOTPROTO=none
ONBOOT=yes
BRIDGE=br0
Bring up the bridge, ifup ifcfg-br0
If network manager is enabed, ifup will internally use nmcli utilities,
else it will use ip commands to bring the interface up.
Even i am not network expert here :) Please let us know your feedback.
Hope it helps,
Daniel
_______________________________________________
Kimchi-devel mailing list
Kimchi-devel(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel