Jump to content

Multiple ethernet cards help


jerrytaff
 Share

Recommended Posts

Hi,

I have 2 ethernet connections, an Realtek 8139, and an SMC USB to Ethernet dongle. The first is my connection to the outside world, the second is connected to my home network.

 

On boot I want the 8139 to be eth0 so I have the following in my modules.conf file

 

alias eth0 8139too

alias eth1 Pegasus/Pegasus II USB Ethernet v0.4.32 (2003/06/06)

 

I have the following files in /etc/sysconfig/network-scripts

 

ifcfg-eth0

 

DEVICE=eth0

BOOTPROTO=dhcp

ONBOOT=yes

MII_NOT_SUPPORTED=yes

WIRELESS_ENC_KEY

 

ifcfg-eth1

 

DEVICE=eth1

BOOTPROTO=static

IPADDR=192.168.1.1

NETMASK=255.255.255.0

NETWORK=192.168.1.0

BROADCAST=192.168.1.255

ONBOOT=yes

 

The problem is that on boot it randomly decides that the SMC USB device is eth0, and the 8139 is eth1. This is annoying in the extreme requiring multiple boots before the system comes up as I want it.

 

How do I force the behaviour I want?

I am using 10.0 official, but with the 2.4.25-2 kernel because of problems with the 2.6 kernel which I posted here some time ago.

Link to comment
Share on other sites

The problem is that on boot it randomly decides that the SMC USB device is eth0, and the 8139 is eth1. This is annoying in the extreme requiring multiple boots before the system comes up as I want it.

 

How do I force the behaviour I want?

I believe that it has a lot to do with driver loading order. "alias eth0" and "alias eth1" have an effect only when the drivers are loaded along the lines of "modprobe eth0", or if there is any request to eth0. If the USB driver loads first, it catches eth0 regardless of the aliases.

So, what you have to do ( and what I've successfully done before to solve a similar problem ) is to force 8139too to load before the USB driver. One way to do this is to put "8139too" line into /etc/modules ( for kernel 2.4.x ) or into /etc/modprobe.preload ( for kernel 2.6.x).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...