On VL 5.8, udev makes this very easy for you by providing an /etc/udev/rules.d/network-devices.rules file customized to your hardware (NOTE: this is actually not provided by default). In it you will find a line for each of your network interfaces, defined by MAC address. All you need to do is remove the comment markers (#) and edit the names as you want them. Here's an example of how this looks:

As stated above, you only need to know which MAC address corresponds to which network adapter, then set the "NAME=" part as you want it. Keep in mind that ifplugd is set to handle only ethX type interfaces, so if you use a name like "wlan0", you will have to handle it another way (NOTE: seems it does handle wlan0).

If you change your network interfaces and want a new file set up automatically, simply delete the current file and udev should set a new one up for you on the next boot.

« Last Edit: February 14, 2007, 10:45:13 pm by Joe1962 »

Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."http://joe1962.bigbox.infoRunning: VL 7 Std 64 + self-cooked XFCE-4.10

# Local network rules to name your network cards.# These rules were generated by nethelper.sh, but you can# customize them. By default, all rules are commented out.# You will need to uncomment and edit them as needed.# (If, for example, your machine has more than one network# card and you need to be sure they will always be given# the same name, like eth0, based on the MAC address)## If you delete this file, /lib/udev/nethelper.sh will try to# generate it again the next time udev is started.So I figured it would be generated again if deleted...

@blurymind: it's okay to just create the file and add a line for your card, but your example is not quite right. The word "address" has to stay as it is, since it means the SYSFS parameter known as address will be used to compare with the MAC address you put after that. It's not a placeholder for your ip address.

Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."http://joe1962.bigbox.infoRunning: VL 7 Std 64 + self-cooked XFCE-4.10

Well, this is just to confirm that the file isn't created automatically in RC 4.2, so it probably isn't in Gold, either. I don't know why it was there on my earlier RC, but at least it served to get this HOWTO done...

Anyway, just create an empty file and paste the above lines, then fix the MAC addresses to the ones on your machine. Maybe running /lib/udev/nethelper.sh will also do it, as stated, but I haven't tried.

Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."http://joe1962.bigbox.infoRunning: VL 7 Std 64 + self-cooked XFCE-4.10

I had the same problem - my box was assigning the eth0/1 numbers at random, so I never could be sure, what will happen upon the next boot.The file etc/udev/rules.d/network-devices.rules was present, with all lines commented out.I edited it like this:

Well, this is just to confirm that the file isn't created automatically in RC 4.2, so it probably isn't in Gold, either. I don't know why it was there on my earlier RC, but at least it served to get this HOWTO done...

From the file's comments, it looks like *something* needs to run /lib/udev/nethelper.sh to create the rules file that has the commented-out rules. But it looks like this script is also a service-like script that also attempts to manage the network connection as well (seems to talk about dhcp, etc). I'm not sure what all it does, and I've not tried running it as I don't want to hose anything. Maybe it needs to be in or called by the VL bootup routines at some point?

ok guys, this is unbearably annoying..I just installed a fresh vec58std aaand now after playing around with vasm and the file i created(/etc/udev/rules.d/network-devices.rules ) , i get an error at boot and there is no internet in vector.

The error message goes like something like this:"cannot rename eth0_rename to eth1"

Any ideas ? I tried deleting the /etc/udev/rules.d/network-devices.rules file ,restarting and creating it again,but i get the same error.