LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Interface Ordering - permanently set NIC as eth0 (https://www.linuxquestions.org/questions/debian-26/interface-ordering-permanently-set-nic-as-eth0-568809/)

simonmorley 07-12-2007 01:36 PM

Interface Ordering - permanently set NIC as eth0
 
Hi,

We've just created a live cd for an Internet cafe based on debian.

I'm having issues with the network interfaces. The motherboard we're using has an integrated realtek 8139 NIC.

For some reason, every kiosk we have built boots with a different interface name. We started on eth0 and are now on eth2. Obviously there's no network.

What I need to do is make sure that each time a box boots, it's always on eth0 so we can automatically start the interface.

I've edited /etc/modprobe.d/aliases and added the following:

alias eth0 8139too

And then run update-modules but that doesn't help.

We can't also specify that a certain MAC address should use eth0 as we're using tonnes of different machines.

Thanks,

Simon

Hern_28 07-14-2007 09:19 AM

Write a udev rule.
 
Write udev rules specifying your devices and you can force device naming.

A very basic how-to:
http://www.reactivated.net/writing_udev_rules.html

If you have more than one interface on the system:
http://www.linuxquestions.org/questi...d.php?t=563356

Gluck man :)

simonmorley 07-15-2007 05:05 AM

Mac addressing issue
 
Hi, thanks for the answer. The problem with this is that I cannot specify a mac address as the livecd will be used in numerous computers.

Simon

Hern_28 07-24-2007 01:59 PM

Interesting.
 
Only way i know of to fix that would be to get the Mac address on all of the computers and manually edit the iso image of the disk before burning it.

If you are using dhcpcd then you could edit the iso file to dhcpcd everything before burning.

Other than these two possibilities I'm not really sure of another way it could be done. Good luck, and if you figure it out it would be a nice how-to though. :)

simonmorley 07-25-2007 03:01 AM

NIC Ordering with UDEV
 
Hi,

I've actually done it using udev and our kiosks are rolling out right now!

Because currently all our kiosks are using the same NIC I setup a Udev rule to say for driver 8139too name interface eth0.

It seems to be working ok - the only issue is that we'll have to change if we update the machines.

Simon


All times are GMT -5. The time now is 02:44 AM.