This is an short note on configuring Linux to recognize multiple ethernet adapters.
For most people running a standard Linux distribution, just add this line to the top of your /etc/lilo.conf file and re-run `lilo':
That's all there is to it. The next time you boot Linux should recognize your second ethercard.
By default a stock Linux kernel probes for a single ethercard, and once one is found the probe ceases. There are three defined ways to cause the kernel to probe for additional cards. In increasing order of difficulty and permanence they are:
For most people the second method is most appropriate, and it's the one that was described above.
In the following instructions it's assumed that you are using the standard Linux boot loader, `LILO'.
The Linux kernel recognizes certain parameters passed at boot-time. Most often these parameters specify aspects of the configuration that cannot be determined at boot-time. For network adaptors the following parameter is recognized:
Normally an I/O region reservation map is used to decide if a
location can be probed. This map is ignored if an I/O address is specified.
This allows the "reserve=
LILO provides two ways to pass these boot-time parameters to the kernel. The most common way to do this is to type them immediately after specifying the name of the boot image. The following example enables all four of the available probe slots.
Of course this is pretty complicated to type in at each boot, and would preclude unattended reboots. You can make the kernel parameters permanent by adding an "append" line to your LILO configuration file, /etc/lilo.conf, and running LILO to install your updated configuration.
If it's possible for you to configure your system without modifying the kernel source, I recommend that you do so. Modifying the source code isn't self-documenting and results in extra complications at upgrade time. Still there are a few instances where it is appropriate:
The LANCE driver requires special low-memory DMA buffers, and so the LANCE probe is differently and earlier than the other network device probes. The upside of this is that you can ignore this whole section: multiple LANCE cards are automatically probed for. The downside is that the LANCE driver doesn't (yet!) use the LILO parameters e.g. IRQ.
The 3c509 has a unique feature that allows truly safe probing on the ISA bus. This is great, but unfortunately for us this method doesn't mix well with the rest of the probes.
The most noticeable aspect is that it's difficult to predict a priori which card will be accepted "first" -- the order is based on the hardware ethernet address. That means that the ethercard with the lowest ethernet address will be assigned to "eth0", and the next to "eth1", etc. If the "eth0" ethercard is removed, they all shift down one number.
A related aspect is that it's not possible to leave an "earlier" card disabled, enable a card at an address or IRQ different than the EEPROM setting, or enable a card at a specific address.