[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#101728: ifupdown: Using logical mappings only



First some terminology.  There are real network adapters and
there are, assigned to the latter:

* MAC addresses
* "physical" interface names (assigned by the kernel)
* "logical" interface names (i.e., names of ifupdown profiles)

AIUI you want to be able to define logical interfaces in
/etc/network/interfaces as this is currently done but you want
a simpler way of getting these assigned to real interfaces on
the basis of their MAC addresses and you want the "physical"
interface names to be changed so that they are the same as the
logical interface names.

The behavior you want is already obtainable by installing the
ifrename package.  The ifrename command changes the physical
interface name to another name on the basis of the real
interface's MAC address.  Once interfaces have been ifrenamed,
all you have to do is define logical interfaces in /e/n/i 
using the same names.

E.g. Suppose you have an interface adapter card with MAC address
11:22:33:44:55:66.  You set up /etc/iftab with this line:

    george     mac 11:22:33:44:55:66

and /etc/network/interfaces with:

    iface george inet static
        address 11.22.33.44
        netmask ...

Suppose the interface has been named 'eth0' by the kernel.  Then you
do:

    ifrename -i eth0

to rename the interface and then do:

    ifup george

to bring it up.

If the interface is hot plugged and you have the hotplug package
installed then the ifrename command gets executed automatically.
An ifup command also gets executed automatically, but in this form:

    ifup george=hotplug

In order to allow this to to have the effect of bring up interface
"george" as logical interface "george" you need to add the following
stanza to /etc/network/interfaces:

    mapping hotplug
        script echo

--
Thomas Hood



Reply to: