How to detect two ethernet cards in linux

To configure an ethernet card in Linux, you need to enable it in the kernel. Then the kernel will detect your ethernet card if it is at a common IO port. But it will stop there, and will never check if you have 2 ethernet cards.

The trick is to tell the ethernet driver that there are 2 cards in the system. The following line will tell the kernel that there is an ethernet card at IRQ 10 and IO 0x300, and another one at IRQ 9 and IO 0x340:

ether=10,0x300,eth0 ether=9,0x340,eth1

You can add that line on bootup at the "boot:" prompt, or in the /etc/lilo.conf file. Don't forget to run:

lilo

That will reload the lilo.conf file and enable changes.