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

Maybe just give in to it.

 

If the wild horse wants no saddle, ride it with no saddle.

 

My not just rewrite your configs so it matches what it keeps doing so it works 100 percent of the time even if it is backwards.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...