wiki:WikiStart
Last modified 4 years ago Last modified on 11/03/09 23:32:20

What is it ?

netcf is

  • a library for configuring network interfaces
  • a command line tool (ncftool) to do the same from the command line
  • distribution-agnostic and supports multiple distributions and operating systems (well, soon, anyway)
  • sets up Ethernet interfaces, bridges, and bonds

Both libvirt and NetworkManager need this functionality - netcf implements what is common to both of them.

How does it work ?

The API for netcf accepts an XML description of the overall interface you want. For a simple bridge, this is

<interface type="bridge" name="br0">
  <start mode="onboot"/>
  <mtu size="1500"/>
  <dhcp/>
  <bridge stp="off">
    <interface type="ethernet" name="eth0">
      <mac address="ab:bb:cc:dd:ee:ff"/>
    </interface>
  </bridge>
</interface>

A call to ncf_define with the above XML will make the necessary changes to your system's network configuration scripts to set up a bridge br0 with the ethernet interface eth0 enslaved to it.

This goes both ways: you can also retrieve the XML description for any network interface on your system with ncf_if_xml_desc. The important point is that netcf uses your distribution's 'native' network configuration mechanisms directly. That makes it possible to hand-edit those scripts, or modify them with other programs, without confusing netcf.

How do I use it ?

netcf comes with a command line tool called ncftool and a C API.

There's a separate page with the feeble beginnings of documentation.

Where can I get it ?

Releases
Releases are available here, though you should use the RPM's for Fedora/EPEL. Details about each release are in the NEWS
Source code
The sources are kept in a git repository: git clone git://git.fedorahosted.org/netcf.git
Mailing list
Subscribe to netcf-devel

Currently, we only have a backend for initscripts-style network configuration. If you know something about network configuration on other distributions like Debian, Ubuntu etc. or on other operating systems, like Solaris, stop by the mailing list and lend a hand.

How can I help ?

netcf is in its very early stages, and can be improved in any number of ways. The most pressing needs right now are

  • implementing backends for other distributions (Debian, Ubuntu, etc.) and operating systems (Solaris)
  • testing and using netcf