Re: Problem: 2.6.x and network (e1000 Intel 82546EB)
--- Robert Lemmen <firstname.lastname@example.org> wrote:
> iface eth1 inet static
> address 192.168.0.254
> netmask 255.255.255.0
> pre-up /usr/local/bin/check-mac-address.sh eth1 00:30:84:76:68:B2
> and the script referenced there looks like this:
> #!/bin/sh -e
> mac=$(/sbin/ifconfig $iface | sed -n 's/^.*HWaddr \([0-9A-Za-z:]*\).*/\1/p')
> if [ "$targetmac" = "$mac" ]; then exit 0; else exit 1; fi
This script comes from /usr/share/doc/ifupdown/examples .
What your configuration achieves is to make "ifup eth1" fail if
eth1's MAC isn't 00:30:84:76:68:B2 . I doubt that that is what
you really want.
The fact that the kernel can assign different interface names
to the same adapter at different times is a problem. You
should think of a kernel-assigned interface name as a handle.
Handles are distinct and they give access to adapters but which
adapter a handle refers to can't be read off its face. Instead
you should use the mapping mechanism to assign to the interface
a "logical interface" that is appropriate to the actual adapter.
The mapping script uses the handle to examine the properties of
the underlying adapter (such as its MAC) which the script then
uses to choose an appropriate logical interface.
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now