[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] eth0 and eth1

On Sunday 07 September 2008 10:42, Stephen Crampton wrote:
> Could someone please explain how an LTSP system decides how to use eth0 and
> eth1?
> For instance, if I pull up firefox and type in cnn.com, over which
> interface does my request go out?
> Which interface is serving DHCP and TFTP requests?
> /etc/ltsp/dhcpd.conf doesn't seem to provide the answer.  The DHCP script
> under /etc/init.d refers to a variable $INTERFACES, but I cannot figure out
> where that variable is initialized.
> I'm assuming that, in the default case, firefox sends requests over both
> interfaces, but dhcpd only uses eth0.  But how do I determine whether this
> is true or not for my system?
> I'm using Edubuntu 8.04 again, because none of the K12LTSP install discs
> recognize my SATA hard drives (I tried 5SEL, 6SEL, and a beta live
> version).

That's done by the kernel.  Whichever kernel module gets loaded first becomes 
eth0.  I had an issue with my Slackware systems flipping eth0 and eth1 
between the wired and wireless NIC's at nearly every reboot until I figured 
out how to force the issue.  It's done differently on both Red Hat-ish 
distros and Debian.

On Debian systems (I have a Debian Etch system handy), you'll go into the 
directory /etc/udev/rules.d and edit a file that looks like this (just grep 
for eth0 in the whole directory).  Note that each entry in these z??_whatever 
files is *ONE* line, despite the word-wrapping going on in this email!

terrell debianbox:/etc/udev/rules.d$ grep eth0 *
z25_persistent-net.rules:SUBSYSTEM=="net", DRIVERS=="?*", 
ATTRS{address}=="00:02:a5:51:54:65", NAME="eth0"
terrell debianbox:/etc/udev/rules.d$

Aha!  We have our file, so let's look at it....

terrell debianbox:/etc/udev/rules.d$ more z25_persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.

# PCI device 0x8086:0x1229 (e100)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:02:a5:51:54:65", 
terrell debianbox:/etc/udev/rules.d$

On my CentOS 5 workstation (actually K12LTSP 5.0EL running in "regular 
workstation" mode), there's a file called /etc/modprobe.conf.  It tells the 
kernel to "alias" eth0 to a specific NIC driver.  In my case, it looks like 

more [microman multimedia01 ~]$ more /etc/modprobe.conf
alias eth0 forcedeth
alias scsi_hostadapter sata_nv
alias snd-card-0 snd-intel8x0
options snd-card-0 index=0
options snd-intel8x0 index=0
remove snd-intel8x0 { /usr/sbin/alsactl store 0 >/dev/null 
2>&1 || : ; }; /sbin/
modprobe -r --ignore-remove snd-intel8x0
alias snd-card-1 snd-mpu401
options snd-card-1 index=1
options snd-mpu401 index=1
remove snd-mpu401 { /usr/sbin/alsactl store 1 >/dev/null 
2>&1 || : ; }; /sbin/mo
dprobe -r --ignore-remove snd-mpu401
[microman multimedia01 ~]$

Note the first line with "eth0" in it.  For dual-NIC systems like LTSP 
servers, you can also put in an "eth1" line.

Hopefully this will help out, regardless of which LTSP distro you use.  Let us 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]