moving ghost image changes interface address

Dear Debian help Forum,

I maintain a number of laptops that run identical versions of debian etch for a class.
They are connected through a wireless ad-hoc network.
For maintenance I often have to switch disks between systems.
Every time I switch a disk the /etc/udev/ruled.d/z25_persistent-net.rules file is automatically modyfied, and a new rule is added for the -now new looking to the harddisk- network interfaces.
This of course means /etc/network/interfaces does not work anymore as the interfaces are now mapped to eth2 and eth3 or higher. So each time I need to migrate a disk I have to clear the rules file and reboot to keep the interfaces configuration working correctly, which is a hassle I want to avoid.
I looked at tying the eth address to a driver with iftables, but I read that udev doesn't read iftables anymore and ifrename is deprecated in etch or something. Anyways, adding an
'eth0 driver ipw2100' to /etc/iftables had no effect.
What other way is there for me to have udev tie the eth address to something other than the mac so it doesn't change after each disk swap? Can I do this manually in /etc/udev/ruled.d/z25_persistent-net.rules, and if so how do I specify the module in stead of the mac?

kind regards,

maarten

5
Average: 5 (1 vote)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: moving ghost image changes interface address

Hi, if you have only one network interface on your box, you can go with a very generic udev rule in /etc/udev/ruled.d/z25_persistent-net.rules using jokers :

Quote:
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="??:??:??:??:??:??", NAME="eth0"

It should do the trick. Of course you can fill in the driver instead of using a joker here, but this way it won't be completely portable.

Syndicate content