On Wed, 2009-09-02 at 14:14 +0100, James Masson wrote:
I've been playing with netcf for about a day now, and have loads
of
questions, if this isn't the right place to ask, let me know.
You're in the right place.
1) We've heard that netcf will possibly be in RHEL 6, and would
like
to replace our custom scripts
for something that hopefully will become mainline. - Is it likely netcf will be in RHEL
6?
It is slated for RHEL6, since newer libvirt versions depend on it.
2) The (limited) documentation, and my testing seems to imply that
netcf uses the distribution's
native network configuration files to assemble the network - is this
true? Can you assemble network
configurations with netcf that you couldn't with the native scripts alone?
Yes, the goal of netcf is to _not_ reinvent 'native' network
configuration, for two reasons: (1) other mechanisms to modify network
config (e.g. your favorite python script) will get broken if we add a
new network config regime (2) bypassing the distros network config
scripts leads to lots of horrible headaches (cf. Xen network
configuration)
As a consequence, you can't describe network configs with netcf that you
can't describe with the native distro scripts, though I am not aware of
any setups that run into such a limitation on RHEL/Fedora.
If there are any, we should see to it that they are first fixed in
initscripts, and then add whatever capability is needed to netcf.
3) The documented configuration examples are fairly limited, and
I'm reduced to dumping the
configuration of existing bond/bridge/vlan'd networks to try to figure out how to
construct some of
configurations I want. Could you provide an example for the configuration below?
eth5 --\ ---bond0.51 ------ xenbr51
\ /
\___bond0__/
/ \
/ \
eth9 --/ ---bond0.61 ------ xenbr61
The key to this setup is
https://fedorahosted.org/netcf/wiki/InterfaceNesting - nested interfaces
(like the slaves for a bond) are described as part of the containing
interface _except_ for VLAN interfaces, which simply reference the
underlying interface.
The above picture would consist of three netcf interfaces
('connections'): one for bond0, one for xenbr51 and one for xenbr61. A
rough sketch of the three XML files is below. The omitted bits describe
address details etc. for the interface. There's some examples in
tests/interface in the git repo and of course the RelaxNG grammar in
data/xml/interface.rng - of course, more docs are needed.
bond0.xml:
<interface type="bond" name="bond0">
...
<bond mode="active-backup">
<miimon freq="100" updelay="10"
carrier="ioctl"/>
<interface type="ethernet" name="eth5"/>
<interface type="ethernet" name="eth9"/>
</bond>
</interface>
xenbr51.xml:
<interface type="bridge" name="xenbr51">
...
<bridge stp="off">
<interface type="vlan" name="bond0.51">
<vlan tag="51">
<interface name="bond0"/>
</vlan>
</interface>
</bridge>
</interface>
and similar for xenbr52.
David