Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
running slack 10.1 on my thinkpad and after install the ethernet card worked.... a couple days later i got the wireless card working and they were both fighting over eth0. i did a
ifconfig eth1 up
and it looks like the ethernet card is now eth1 instead of eth0. how can i make sure all this is set up right and they aren't fighting with each other.
alias eth0 <module name> didn't work . My cards swapped today!
I added now:
Code:
options <module name> index=0
Currently, it works but I don't know if it stays like that because I couldn't find back the meaning of the index option. I used the analogy for loading the sound .
The first module to load gets to be eth0..
So the trick is to make sure your eth nic module loads before the wireless nic module.
This order is handled by hotplug and the order of lines in /etc/rc.d/rc.modules
Make sure your eth nic module is specified earlier than your wireless module.
If you wanted, another solution involves using udev rules to assign interface names based on MAC addresses. For older kernels (2.4) there are utilities that do this as well (ifrename, nameif, etc.).
The utilities work after the interface is up..
I'd say it's better to do it from the boot sequence, then use those tools to tidy up any last bits, eg 4 NICs all the same chipset..
Last edited by peter_robb; 07-23-2006 at 11:41 AM.
Not exactly. They work after the loading of the driver, but not necessarily after the interfaces are up (you can put it in the boot sequence right after modprobing but before ifup/down).
Nevertheless, (assuming a recent distro) udev rules take place as the drivers are being loaded. This way, you are closest to the kernel naming scheme. And you won't get problems, if, for example you have the drivers for both NICs built-in to the kernel (instead of modules).
A lot of people compile drivers into the kernel, and then realize, that after a kernel upgrade, the internal order of loading drivers had inadvertently been switched, so the interface names are backwards. Udev rules can fix this.
The udev flexibility is certainly great.
It's a pity about the learning curve tho'.
Let's hope we can get something entered into the LQ Wiki for future reference..
FYI, my earlier writing doesn't work neither. I found out that my cards swap when I make a reboot . Nevertheless, the tip from osor seems to work and udev isn't that difficult! http://www.reactivated.net/writing_udev_rules.html has a good description on how to do it.
I used following procedure (debian, kernel 2.6):
via
Code:
udevinfo -a -p /sys/class/net/eth0 and
udevinfo -a -p /sys/class/net/eth1
I updated now my scripts (e.g. /etc/network/interfaces) and instead of referring to eth0 and eth1, I refer now to lan and wlan.
udev seems to me a great tool! I am looking for a strategy on how to load my modules. At the moment, it is a real mess (and I think that this is the root cause why my cards were swapping all the time). It seems to me that udev will be great help to structure my module loading. If anyone has tips or has his own strategy on module loading, they are always welcome (but maybe we can open a new thread for that)
Hi everybody, I have a similar problem, let me explain you, I have a Debian 5.0.5 64bits kernel 2.6.26-2-amd64, running over VmWare esxi 4.1, the hardware has 4 network adapters and Debian can see the 4 adapters, well my problem is that every time a shutdown the Debian with init 0 the ips change their physical port, I have tried a lot of things like the udev rules changing the names of the interfaces, I have tried also the aliases in the /etc/modprobe.d/aliases, I have also tried to give always the same MAC write them manually in vmware but nothing, every time I use "init 0" the ips change their position, another thing, if a I use init 6 the ips stay in the same place they were last time. I don't know what else to do, please help me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.