You are not logged in.
Hello,
I recently went through a bit of a conundrum with my onboard ethernet that was caused by a sudden switch of roles between eth1, formerly my primary onboard, and eth0, formerly my PCI chipset (my workstation shares its internet connection with other computers).
Now that the confusion is over, and I have edited all of my network config files to reflect this change, I was wondering: is there any possible way to bind a device, i.e. by specifying its module, to a given interface, so that every time at boot up, physical hardware device X will be eth0 and physical hardware device Y will be eth1, etc?
Thank you.
Offline
This used to work:
/etc/modprobe.conf
alias eth0 myethermodule
alias eth1 otherethermodule
But looks like in 2.6 there's a better way of doing it with udev, so you bind a interface name to a MAC address directly:
/etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x10de:0x0057 (sky1)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:b6:f2:66:a5:9a", NAME="eth0"
# PCI device 0x1969:0x1048 (atl1)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:e0:a6:1f:63:6a", NAME="eth1"
Last edited by freakcode (2008-04-19 02:40:59)
Offline
Awesome, thanks!
Last edited by deconstrained (2008-04-19 03:19:49)
Offline
Or you can specify the order in which the modules are loaded in your rc.conf
Offline
Or easier... pacman -S netcfg, modify the default /etc/iftab, and set net-rename to start on boot.
Offline
Or easier... pacman -S netcfg, modify the default /etc/iftab, and set net-rename to start on boot.
Does that work only with Arch (I mean, the netcfg is a Arch thingie right)?
Offline
iphitus wrote:Or easier... pacman -S netcfg, modify the default /etc/iftab, and set net-rename to start on boot.
Does that work only with Arch (I mean, the netcfg is a Arch thingie right)?
I think it uses ifrename which exists on most distributions.
Offline
freakcode wrote:iphitus wrote:Or easier... pacman -S netcfg, modify the default /etc/iftab, and set net-rename to start on boot.
Does that work only with Arch (I mean, the netcfg is a Arch thingie right)?
I think it uses ifrename which exists on most distributions.
Yup, just ifrename and iftab
Offline
Oh, good then. I tried to give a general Linux solution for the problem, as I guess a lot of people will hit the forums from Google and the like. So, it's good to know that the netcfg scripts can work on another distros too.
Offline