LinuxQuestions.org
Help answer threads with 0 replies.
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 05-13-2005, 11:32 AM   #1
Eastside
LQ Newbie
 
Registered: Apr 2005
Posts: 3

Rep: Reputation: 0
Assigning eth0 / eth1 or multi-LAN motherboards?


I am running SuSe 9.2 Pro on a Gigabyte GA-K8N Ultra-9 motherboard, and I'm having trouble with the way that Linux ties eth devices to actual ethernet jacks.

The motherboard has two LAN jacks: an Nvidia-based port and a Marvell technology-based one. The Nvidia driver is nvnet, and the Marvell uses driver sk98lin (if you use this motherboard, you very much want to use the option "AutoNeg=sense" for the Marvell. Took me a long time to discover this).

When I first got the board up and running, things worked out that the Nvidia was always identified as eth0, and the Marvell as eth1. Nvidia used DHCP, and Marvell used a static IP address. When I looked at /etc/sysconfig/network I had two files:

ifcfg-eth0 the options for the NVidia
ifcfg-eth-id-01:1f:ee:aa:88:67 the options for the Marvell

If I looked at the options with the setup tool YAST, I found that the Nvidia
had a "Network device" of eth0, and the Marvell had a network device of eth-id-01:1f:ee:aa:88:67.

All was well and good.

But I did some online upgrades, and things fell apart. Suddenly at bootup, the Marvell device was coming up as eth0, and being configured. But then it came time to do eth1, which was identified as the Nvidia device, and configuration failed with the error "no configuration found".

It seemed that Nvidia HAS to be eth0 to be happy(I learned differently, see below) and I knew no way of ensuring that the Nvidia device would be picked for eth0, except to remove the configuration for the Marvell device, which worked fine but wasn't exactly the solution I wanted.

That's my question- is there any way to control that? It's "funny" that the whole separation of devices and interfaces was supposed to cure this problem, but it's caused me a world of headaches.

Or, better, is there any way to set things up so that the NVidia will work as intended- correctly as either eth0 or eth1? I kluged it by creating a symlink in /etc/sysconfig/network/ifcfg-eth1 -> ifcfg-eth0, but I'm pretty sure that's not the expected technique.

So, in summary, I'm curious about two things:

1. why the NVidia device isn't working correctly as either eth0 or eth1. (It's not the hardware device, but something to do with finding an appropriate configuration.) I think that making this work is the "right" way to solve the problem.

2. if it's possible for the assignment of eth0 and eth1 to a particular device to be deterministic. Perhaps a line in modules.conf?

Thanks in advance.
 
Old 05-14-2005, 11:12 AM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Try adding something like this in your /etc/modules.conf.

Code:
## Added by me for proper loading of net modules.
alias eth0 nvnet
alias eth1 sk98lin
options sk98lin AutoNeg=sense
 
Old 05-14-2005, 01:11 PM   #3
Eastside
LQ Newbie
 
Registered: Apr 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks very much!

I was sorta afraid that the correct solution was to force eth0 and eth1. I thought the whole separation of interfaces from devices thing was to make it not be a problem!

But- your solution certainly can't hurt. Is that what you use on your own system, or did you write it custom for me?
 
Old 05-14-2005, 01:32 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally posted by Eastside
Thanks very much!

I was sorta afraid that the correct solution was to force eth0 and eth1. I thought the whole separation of interfaces from devices thing was to make it not be a problem!

But- your solution certainly can't hurt. Is that what you use on your own system, or did you write it custom for me?
I had to use similar on one of my systems once when I did not want to get into changing the cables around. Another thing you may want to check for is what order the module names are listed in your /etc/modules file make sure that the nvnet is before the sk98lin then the nvnet should be loaded before the sk98lin making it be the eth0 by default since it gets detected first.
 
Old 06-13-2005, 07:21 AM   #5
rnp
LQ Newbie
 
Registered: Jun 2005
Distribution: SuSE
Posts: 1

Rep: Reputation: Disabled
I have exactly the same board & distro, and exactly the same problems.
However, with the contents of this thread I cannot fix them. YAST does not find the nVidia. And the Marvell crashes the system. So I guess I have a major mess.
Could you please post your /etc/sysconfig/whatever and /etc/modules.conf? And any other configuration file that I might need to change.

Thanks a lot.

Last edited by rnp; 06-13-2005 at 08:16 AM.
 
Old 06-13-2005, 10:34 PM   #6
Eastside
LQ Newbie
 
Registered: Apr 2005
Posts: 3

Original Poster
Rep: Reputation: 0
My config changes are very simple, but they aren't a perfect solution- eth0 will be either the nVidia LAN or the Marvell. YaST will have an absolute conniption if you try to use it to adjust your network hardware after you implement these changes. (Actually, it's a simple matter to put things back in order, run YaST, and then redo the mods. I don't want to scare you off.)

But it works without crashing, which is what's important to me.

I tried using /etc/modules.conf to setup the eth ports in a deterministic way, but it didn't work. However, this is a great place to help out the driver for the Marvell a bit:

/etc/modules.conf:
Code:
options sk98lin AutoNeg=sense
It took me a very long time to find this one. So long that when I tried to thank the person who had posted it originally, the address had expired.

I put the option in modules.conf because I figured I could make all my changes in one file, which is more tidy. But since I can't, maybe I should have done it as follows.

There are two ethernet ports on this motherboard, which means that there will be two files in /etc/sysconfig/hardware and two in /etc/sysconfig/network. First, the hardware. I have one that is called "static" for the nVidia, and one called "bus-pci-yadayadayada" for the Marvell.

/etc/sysconfig/hardware/hwcfg-static-0:
Code:
MODULE='nvnet'
MODULE_OPTIONS=''
STARTMODE='auto'
/etc/sysconfig/hardware/hwcfg-bus-pci-0000:02:00.0:
Code:
MODULE='sk98lin'
MODULE_OPTIONS='AutoNeg=sense'
STARTMODE='auto'
So- maybe I don't need the AutoNeg line in modules.conf.

OK, the only "tricky" thing I did is in /etc/sysconfig/network/. First I'll describe the files as YaST created them.

/etc/sysconfig/network/ifcfg-eth0: (for nVidia)
Code:
BOOTPROTO='dhcp'
MTU=''
/etc/sysconfig/network/ifcfg-eth-id-00:0f:ea:7a:83:67:
Code:
BOOTPROTO='dhcp'
MTU=''
REMOTE_IPADDR=''
STARTMODE='auto'
UNIQUE='B3.edited.h8'
USERCONTROL='no'
_nm_name='bus-pci-0000:02:00.0'


And here's the only tricky thing that I did:

Code:
/etc/sysconfig/network #ln ifcfg-eth0 ifcfg-eth1
That's it. Now, when the nVidia port comes up as eth1, it finds it as ifcfg-eth1 and runs away happy.

A brief checklist of getting things up and running is to use YaST to set up both devices as described, using the drivers I mentioned. Then, manually create ifcfg-eth1. If you need to use YaST again on network hardware, remove ifcfg-eth1, make your changes, and recreate ifcfg-eth1.

I hope this helps.
 
  


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(WAN) and eth1(LAN) getting mixed with weird results Artanicus Linux - Networking 3 08-12-2005 07:23 AM
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
It dznt matter wheter eth0 (internet) or eth1(my lan) lelski Linux - General 1 06-07-2003 08:36 PM

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

All times are GMT -5. The time now is 10:14 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