[netcf-devel] MAC lookup, alternative 2

David Lutterkort lutter at redhat.com
Mon Aug 10 23:13:34 UTC 2009


On Wed, 2009-08-05 at 09:37 +0200, Jonas Eriksson wrote:
> This is another alternative when implementing the MAC lookup.

I am not clear on where you are trying to go with this. The MAC/iface
name association should be managed outside the scope of netcf by udev
rules on modern Linux distributions.

When you look an interface up by MAC, netcf looks into /sys to find the
name of an interface/interfaces with that MAC; when you define an
interface with a <mac/> tag, the initscripts driver puts a HWADDR entry
into the config file - that is mostly for documentation purposes, unless
you do 'ifup <MAC>', that's the only place it is used by the
initscripts[1].

Finally, the one thing that is iffy to me is if dumpxml should report a
MAC address even if the underlying config file doesn't have a HWADDR
entry, i.e. should it go to /sys and pull the MAC out ? I don't view
netcf as a HW enumeration tool, and the iface name/MAC correspondance to
me falls under HW enumeration.

David

[1] There is of course the possibility that the HWADDR does not match
the MAC address, in which case 'ifup <MAC>' and 'ifup <NAME>' will
produce different results, but that's really an instance of 'config is
broken'



More information about the netcf-devel mailing list