On Mon, Dec 19, 2005 at 06:40:53AM +0100, Bernd Eckenfels wrote:
> We could enhance the ifup interfaces file format to use MACs as interface
> identifiers and have an additional labeling statement. (i know it can be
> done with other means right now but I think it sould be introduced as first
> class citizen - AIUI just like suse does):
If, instead of,
> iface 00:00:C0:A1:E7:CD inet static
> name lan0
you had
iface lan0
mac 00:00:C0:A1:E7:CD
> address 10.0.0.3
> network 10.0.0.0
> netmask 255.255.255.0
> broadcast 10.0.0.255
> gateway 10.0.0.1
> up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.0.0.1 || true
and a pre-up command (in /etc/network/if-pre-up.d/) that renames the
interface with the given mac to lan0 ("nameif $IFACE $IF_MAC"), the
above should work now.
As a bonus, "ifup lan0" is much more pleasant than "ifup 00:00:C0:A1:E7:CD"
too.
Cheers,
aj
Attachment:
signature.asc
Description: Digital signature