[Samba] OT: SUSE 9.3 and NICs

Eric Hines eehines at comcast.net
Sun Dec 25 23:43:02 GMT 2005


At 12/25/05 15:29, John H Terpstra wrote:
>On Saturday 24 December 2005 17:38, Eric Hines wrote:
> > Folks, I realize this is off topic, and if anyone can suggest a
> > better source for the question, I'd be glad to go there.  Novell
> > SUSE's support is unresponsive, however.
> >
> > My problem is this: I'm running 9.3 Pro on an Intel server board that
> > has two NIC chips built in (a 10/100 and a GigE).  I've since added a
> > Netgear GigE NIC.  However, every time I reboot, the NICs assigned to
> > eth0, 1, and 2 all change at random, as do the IP addresses
> > assigned.  This happens whether I do anything at all or try to set
> > things up through YaST.  I'm trying to set up two subnets off this
> > (samba-run) server, with one NIC (or one IP address) facing the Net
> > and the other two NICs (or IP addresses) having to go through this
> > NIC to get to the Net.  It would seem impossible to cable up the LAN
> > if the NIC supporting a given subnet--and its address--keep changing.
> >
> > How can I stabilize the NIC/IP address/ethx assignments?
>
>I see the exact same thing happening on my SusE9.3 boxen.
>Upgrade to SuSE 10 - seems to fox this.
>
> > What other information does anyone need to help me with this?
>
>Let me know if you discover the secret - I'd like to know also.
>
>- John T.
>
> > Thanks very much.
> >

What I got from the suse-linux-e at suse.com mailing list (summarized 
here and the key parts of the thread added below) is that you don't 
care if eth0 comes up on one NIC this time and another NIC the 
next.  The only thing you have to get right is the NIC/IP address 
pairing.  This must remain stable--and it does.  The man page on 
ifstatus says ethx wander around since the advent of removable (e.g., 
USB) cards, and the boot up process initializes the first NIC it 
comes to and calls that one eth0, and so on.  The kernel's IP stack 
then keeps track of the eth/NIC pairing so the NIC/IP address go 
where they need to go.

>X-Originating-IP: [195.135.221.131]
>Mailing-List: contact suse-linux-e-help at suse.com; run by ezmlm
>list-help: <mailto:suse-linux-e-help at suse.com>
>list-unsubscribe: 
><mailto:suse-linux-e-unsubscribe-eehines=comcast.net at suse.com>
>list-post: <mailto:suse-linux-e at suse.com>
>Delivered-To: mailing list suse-linux-e at suse.com
>From: Michael W Cocke <cocke at catherders.com>
>To: suse-linux-e at suse.com
>Subject: Re: [SLE] SUSE 9.3 Pro and 3 NICs
>
>On Sun, 25 Dec 2005 15:59:12 -0500, you wrote:
>
> >Eric Hines wrote:
> >> At 12/25/05 07:51, James Knott wrote:
> >>> Eric Hines wrote:
> >>> > At 12/24/05 18:53, James Knott wrote:
> >>> >> Eric Hines wrote:
> >>> <snip>
> >>> >
> >>> > Alternatively, how do I use YaST to do this?  I've been in YaST|Network
> >>> > Devices|Network Card|<NIC>|Edit and edited the IP address for each.  I
> >>> > can't find any place to pin a NIC to a particular ethx, though.  And
> >>> > both the addresses and the ethx change on each boot--e.g., eth0 will
> >>> > have on NIC (by MAC address) and one IP address after one bootup, and
> >>> > after another bootup it'll have a different NIC and a different IP
> >>> > address (and both will be completely different--it won't simply be a
> >>> > NIC/IP address pairing from another ethx on the earlier bootup).
> >>>
> >>> I'm not sure what you're getting at here.  If you use the ifcfg files,
> >>> you'll always configure the correct NIC.  If you need to refer to the
> >>> NICs in a script, you use the full name.
> >>>
> >>> <snip>
> >>
> >> One of the problems I have--and I'll try editing the files directly, to
> >> guarantee that I'm configuring the correct NIC with the correct
> >> information--is that it doesn't seem to make any difference how I
> >> configure each NIC--or whether I configure them at all--on one boot up,
> >> eth0, say, will have NIC1, with IP address 2, attached to it, and on a
> >> subsequent bootup, eth0 will have NIC2, with IP address 3, attached to
> >> it, even though I have done nothing at--just boot up, run ifconfig -a to
> >> see what's where, then shut down.  Similarly, there's no pairing between
> >> NIC and IP address--these change on their own, also: NIC3 with IP
> >> address 1 on one bootup will have, on the next bootup, IP address 3
> >> attached.
> >>
> >> Also, even editing the files directly, I could see no way to pin a NIC
> >> to a specific eth.  How do I do that?
> >
> >Either I'm missing something or you're missing something.  Those files
> >are tied directly to a NIC, with the corresponding MAC address.  They
> >don't work with any other.  Now eth0, eth1 etc., may wander around, but
> >why is that an issue?  Servers talk to IP addresses, not NICs.  It's up
> >to the IP stack to figure out which NIC to talk to.  You shouldn't have
> >any need to worry about whether a NIC is eth0 or not.
>
>
>James, I think you're assuming that the OP understands as much about
>this as you do.  I went thru the same learning/aggravation cycle when
>I installed SuSE 9.3 on my firewall system.
>
>Eric,  What you're encountering is a raceway condition that's set up
>during boot. What happens is that a whole bunch of initialization
>tasks are started in a batch, and whatever NIC is initialized first is
>named eth0, second is eth1, etc.
>
>There are actually several ways to work around what may be the dumbest
>design decision in operating system history since 640K.
>
>The one that I use is explained here:
>http://www.catherders.com/tikiwiki-1.9.1/tiki-read_article.php?articleId=36
>
>
>The one that James is trying to explain is more elegant but requires
>you to understand the contents of /etc/sysconfig/network/.  In a
>nutshell, find the file named ifcfg-eth-id-mac address of the
>particular nic.  Edit the contents to assign the ipaddress you want to
>the particular NIC with that MAC address.  Repeat for the rest of your
>NICs.
>
>Mike-



There is no nonsense so errant that it cannot be made the creed of 
the vast majority by adequate governmental action.
         --Bertrand Russell



More information about the samba mailing list