lcfg-network patch

The existing version of lcfg-network component that manages the networking at an OS level, general and very briefly that means the scripts under /etc/sysconfig/network-scripts/ as well as /etc/sysconfig/network and /etc/hosts, lacks of support for bridge interfaces. The following patch adds support for such usage.

network.cin.patch (script)
network.def.patch (resources)

Two new resources have been defined:

type
This resource can be used to define the type of the interface.  For example,
defining a bridge interface as "type"_<interface>, then that should be set to "Bridge".

bridge
This resource can be used by the main interface in case it is bridged.  For instance,
if eth0 is bridged over br0, then "bridge"_<interface> should be set to "br0".

That would look like this:

!network.interfaces     mADD(eth0 br0)
!network.hwaddr_eth0    mSET(00:12:11:22:26:2B)
!network.bridge_eth0    br0
!network.ipaddr_br0     DHCP
!network.type_br0       Bridge

The official RPM hasn’t still be generated.

Without the use of the patch, the workaround of configuring a bridge interface is via the file component. You’ll need something like the following in your machine’s profile:

!network.interfaces     mREMOVE(eth0)

!file.files             mADD(eth0)
file.file_eth0          /etc/sysconfig/network-scripts/ifcfg-eth0
file.type_eth0          literal
file.mode_eth0          0644
!file.tmpl_eth0         mSET(DEVICE=eth0\nHWADDR=XX:XX:XX:XX:XX:XX\nONBOOT=yes\nBRIDGE=br0)

!file.files             mADD(br0)
file.file_br0           /etc/sysconfig/network-scripts/ifcfg-br0
file.type_br0           literal
file.mode_br0           0644
!file.tmpl_br0          mSET(DEVICE=br0\nTYPE=Bridge\nBOOTPROTO=dhcp\nONBOOT=yes)

2 thoughts on “lcfg-network patch

  1. Pingback: lcfg-network patch « : | : vortex of false deceit : | :

  2. Pingback: lcfg-libvirt « : | : vortex of false deceit : | :

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s