LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2004, 11:52 PM   #1
letrout
LQ Newbie
 
Registered: Feb 2004
Posts: 13

Rep: Reputation: 0
specifying eth0 and eth1


I have two ethernet cards in my box, using a monolithic kernel. I'm trying to specify which physical card is the eth0 but the kernel keeps autoprobing them in the wrong order. My lilo.conf looks like this:

image = /boot/bzImage-2.4.24-nonxpagesok
label = nonxpagesok-24
append = "ether=10,e400,eth0"
optional
root = /dev/hdc2

lsdev returns

Device DMA IRQ I/O Ports
------------------------------------------------
Advanced e400-e41f
cascade 4 2
dma 0080-008f
dma1 0000-001f
dma2 00c0-00df
eth0 11
fpu 00f0-00ff
ide1 15 0170-0177 0376-0376
Intel 4000-403f 5000-501f e000-e01f f000-f00f
keyboard 1 0060-006f
ne2k-pci e800-e81f
parport0 0378-037a
PCI 0cf8-0cff d000-dfff
PCnet/FAST e400-e41f
PCnet/FAST 79C971 10
pic1 0020-003f
pic2 00a0-00bf
serial 02f8-02ff 03f8-03ff
timer 0 0040-005f
usb-uhci 11 e000-e01f
vga+ 03c0-03df
Winbond e800-e81f

eth0 keeps coming up as the Winbond (11, 0xe800), but I want the PCnet (10, 0xe400) to be eth0. What am I doing wrong?
 
Old 02-20-2004, 12:06 AM   #2
flashingcurser
Member
 
Registered: Jan 2003
Distribution: many win/nix/mac
Posts: 259

Rep: Reputation: 32
Does it matter which is eth0 or eth1? I'm not familiar with your nics. In slack it is simply a change of a couple of lines in a few scripts--I'm just happpy to have both cards come up. Everthing else is easy.

I might be able to help with a few details.


 
Old 02-20-2004, 12:25 AM   #3
letrout
LQ Newbie
 
Registered: Feb 2004
Posts: 13

Original Poster
Rep: Reputation: 0
Well, I want the PCnet on my LAN side as the Winbond is only 10Mbps and the PCnet is 100/full duplex. I'd prefer to have the speed on the LAN side for activities like virus scans, backups, IDS checks from other machines over NFS. And, I'd prefer to have eth0 be the LAN side as that's how I've always done it and my firewall scripts etc are all written that way. Converting them (and my mind) to go the other way around would probably result in errors.

So no, it's not the end of the world if I have to live with what the kernel is picking for me. But it does make my life more complicated. Besides, I know this is possible so I want to configure the system the way I want it. If I didn't want control over my OS I'd probably just run Windows.

Forgot to mention, this is SuSE 8.2 (though I think this is a basic kernel/bootloader issue rather than distro).
 
Old 02-20-2004, 12:55 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Why not just change the IP addresses associated with each interface?
 
Old 02-20-2004, 01:09 PM   #5
bstempi
LQ Newbie
 
Registered: Feb 2003
Location: Horsham, PA
Posts: 28

Rep: Reputation: 15
If you're really that advent about changing device names, then do so. In RedHat 9 (idk if you have a similar tool in slackware), you can go to Hat->Settings->Network, and change the names of your physical device(s). From this configurator, you can also change IPs and restart the interfaces. Hope this helps.
 
Old 02-20-2004, 01:15 PM   #6
letrout
LQ Newbie
 
Registered: Feb 2004
Posts: 13

Original Poster
Rep: Reputation: 0
Because then my eth0 (was LAN side) becomes the WAN i/f, and vice versa. My firewall rules (and probably other things I'm missing) have to be changed. I know this is a workaround and that there are others I could pursue as well. Still leaves me uneasy though, if I don't know why the kernel is picking the order that it is, how sure can I be that next kernel upgrade (or even boot) is going to pick the same order? I don't have assurances that this is deterministic.

Regardless, the point is: Why isn't passing the kernel param working like it's supposed to? Am I missing something, syntax error etc? It doesn't sit right with me that the kernel is ignoring my directives. That's not good behavior for a respectable OS.

Something else I somehow forgot to mention: I glimpse some messages very early in the boot process that look like they have my NIC drivers names in them, there is likely a clue there. But they fly by way too fast for me to read, even after booting repeatedly. I don't see them in dmesg output, either they happen before it starts recording (possible?) or I'm imaging it.

Another "doh!": This is 2.4.24 vanilla kernel, patched with grsecurity and built from source.
 
Old 02-20-2004, 01:21 PM   #7
letrout
LQ Newbie
 
Registered: Feb 2004
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by bstempi
If you're really that advent about changing device names, then do so. In RedHat 9 (idk if you have a similar tool in slackware), you can go to Hat->Settings->Network, and change the names of your physical device(s). From this configurator, you can also change IPs and restart the interfaces. Hope this helps.
Something like that should work, all I want is to change the physical->name mapping. I can't find such a thing in SuSE though. Perhaps I just need to look harder. I tried monkeying with the Network Device settings in Yast2, seemed to have no effect. Hm, did I set the io address like "e400" or "400"...? I'll have to play with it some more, I may not have done it properly.

When you make this change, do you know where it is stored? I poked around /etc and /etc/sysconfig and couldn't find anything that looked right. Though I suppose this could vary by distro.
 
  


Reply



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
how to use eth1 instead of eth0 WindozeFREE Linux - Networking 8 03-22-2005 03:04 AM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 05:57 PM
Firewall WAN eth0 LAN eth1 self-bridges, eth0 does all routeing. Nichole_knc Linux - Networking 5 07-29-2004 02:33 PM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 12: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 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:54 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
Open Source Consulting | Domain Registration