LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 09-19-2006, 01:52 AM   #1
zux
Member
 
Registered: Jul 2006
Location: latvia
Distribution: slackware
Posts: 127

Rep: Reputation: 16
how do I choose wich interface ir eth0 and witch eth1?


i have some scripts using eth0 and eth1 from wich one is for internet and other for local network. By using different and kernels it sometimes changes wich one is eth0 and wich eth1. how do i make it allways stick with one way?
 
Old 09-19-2006, 02:40 AM   #2
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
My solution, tested only on my two-box LAN, is to force the order of module probing by using the /etc/rc.d/rc.netdevice script. The order in which each card is listed in that script determines the ethx assignment order. I then use static IP address assignments on my LAN side, which is configured in /etc/rc.d/rc.inet1.conf. Works for me, and I assume the solution will work for others. Assuming is not a Good Thing, but I hope this idea might work for you.
 
Old 09-19-2006, 05:36 AM   #3
zux
Member
 
Registered: Jul 2006
Location: latvia
Distribution: slackware
Posts: 127

Original Poster
Rep: Reputation: 16
and if the drivers are compiled in kernel, not as modules?
 
Old 09-19-2006, 05:55 AM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,396

Rep: Reputation: Disabled
Are you running a recent UDEV and slackware-current perhaps? You don't tell us much about your setup and I am not willing to dust off my crystal ball.

Eric
 
Old 09-19-2006, 07:39 AM   #5
zux
Member
 
Registered: Jul 2006
Location: latvia
Distribution: slackware
Posts: 127

Original Poster
Rep: Reputation: 16
i noticed it some time ago when i first installed slackware 10.2, then after compiling my own kernel with the interface drivers built in, now the eth0 was eth1 and otherwise, this also happens when booting some live cd's and so on. I think what i'm looking for is a way to make it sign numbers by HWadress.
 
Old 09-19-2006, 04:07 PM   #6
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
I seem to recall reading something to the effect that with compiled drivers, the kernel assigns ethx order based upon MAC addresses. But I might be remembering incorrectly.
 
Old 09-19-2006, 04:38 PM   #7
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 215
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by Woodsman
I seem to recall reading something to the effect that with compiled drivers, the kernel assigns ethx order based upon MAC addresses. But I might be remembering incorrectly.
Try this in you lilo.conf

append="ether=0,0,eth1"

Last edited by number22; 09-19-2006 at 04:41 PM.
 
Old 09-19-2006, 06:23 PM   #8
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Quote:
Try this in you lilo.conf
append="ether=0,0,eth1"
Ah! Yes! That rings the bell again. That ether kernel parameter works only if the NIC drivers are compiled into the kernel. And I now recall that users must add this ether parameter for each card.
 
Old 09-20-2006, 02:30 AM   #9
zux
Member
 
Registered: Jul 2006
Location: latvia
Distribution: slackware
Posts: 127

Original Poster
Rep: Reputation: 16
thank you alot

Last edited by zux; 09-20-2006 at 02:32 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
eth0/eth1 interface fails to come up Jayraj Prabhu Linux - Hardware 1 12-16-2005 08:57 PM
Witch distro to choose? Calenulma Linux - Newbie 10 09-17-2004 04:59 PM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 01:12 PM
Kernel 2.4.22 finds eth0 and eth1 but 2.6.0 does not find eth1 coollink Linux - Networking 3 01-13-2004 08:32 PM
Slackware 9 Install: wich kernel too choose? smiltee Slackware 5 09-24-2003 07:39 PM


All times are GMT -5. The time now is 04:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration