Securing and Optimizing Linux:RedHat Edition | All about OS

Install more than one Ethernet Card per Machine

Категория: Securing and Optimizing

You might use Linux as a gateway between two Ethernet networks. In that case, you might have two Ethernet cards on your server. To eliminate problems at boot time, the Linux kernel doesn’t detect multiple cards automatically. If you happen to have two or more cards, you should specify the parameters of the cards in the “lilo.conf” file for a monolithic kernel or in the “conf.modules” file for a modularized kernel. The following are problems you may encounter with your network cards.
Problem 1
If the driver(s) of the card(s) is/are being used as a loadable module (modularized kernel), in the case of PCI drivers, the module will typically detect all of the installed cards automatically. For ISA cards, you need to supply the I/O base address of the card so the module knows where to look. This information is stored in the file 7etc/conf.modules”.
As an example, consider we have two ISA 3c509 cards, one at I/O 0×300 and one at I/O 0×320. For ISA cards, edit the conf.modules file (vi /etc/conf.modules) and add:
alias ethO 3c509 alias eth1 3c509 options 3c509 io=0×300,0×320
This says that the 3c509 driver should be loaded for either ethO or eth1 (alias ethO, eth1) and it should be loaded with the options io=0×300,0×320 so that the drivers knows where to look for the cards. Note that Ox is important - things like 300h as commonly used in the DOS world won’t work.
For PCI cards, you typically only need the alias lines to correlate the ethN interfaces with the appropriate driver name, since the I/O base of a PCI card can be safely detected.
For PCI cards, edit the conf.modules file (vi /etc/conf.modules) and add:
alias ethO 3c509 alias eth1 3c509
Problem 2
If the drivers(s) of the card(s) is/are compiled into the kernel (monolithic kernel), the PCI probes will find all related cards automatically. ISA cards will also find all related cards automatically, but in some circumstance ISA cards still need to do the following. This information is stored in the file “/etc/lilo.conf. The method is to pass boot-time arguments to the kernel, which is usually done by LILO.
For ISA cards, edit the lilo.conf file (vi /etc/lilo.conf) and add: append=”ether=0,0,eth1″
NOTE: First test your ISA cards without the boot-time arguments in the “lilo.conf file, and if this fails, use the boot-time arguments.
In this case ethO and eth1 will be assigned in the order that the cards are found at boot. Since we have recompiled the kernel, we must use the second method (If the drivers(s) is/are compiled into the kernel) to install our second Ethernet card on the system. Remember that this is required only in some circumstance for ISA cards, PCI cards will be found automatically.

« TCP/IP Network Management.Overview
Files related to networking functionality »