home *** CD-ROM | disk | FTP | other *** search
- <html>
- <title>Multiple Linux ethercard HowTo</title>
- <h1><a name="top">Mini-HowTo on using multiple ethercards with Linux</h1>
- <h2>Don Becker, becker@cesdis.gsfc.nasa.gov</h2>
- <body>
-
-
- <P>This is an short note on configuring Linux to recognize multiple ethernet
- adapters.
-
- <P>For most people running a standard Linux distribution, just add this
- line to the top of your <i>/etc/lilo.conf</i> file and re-run `lilo':
-
- <listing>
- append = "ether=0,0,eth1"
- </listing>
-
- <P>That's all there is to it. The next time you boot Linux should
- recognize your second ethercard.
-
- <h2>What you did, and how you did it.</h2>
-
- <P>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:
-
- <ul>
- <li>Passing parameters to your kernel at boot time.
- <li>Configuring your boot loader to always pass those parameters.
- <li>Modifying the kernel netcard probe tables in <b>drivers/net/Space.c</b>.
- </ul>
-
- <P>For most people the second method is most appropriate, and it's the
- one that was described above.
-
- <h2>Passing parameters using your boot loader</h2>
-
- <P>In the following instructions it's assumed that you are using the standard
- Linux boot loader, `<i>LILO</i>'.
-
- <P>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:
- <listing>
- ether=<IRQ>,<IO-ADDR>,<PARAM1>,<PARAM2>,<NAME>
- </listing>
-
- Valid numeric arguments may be in decimal, octal (with a leading '0')
- or hexadecimal (preceded by a '0x'). The first non-numeric argument
- is taken to be the <i>NAME</i> of the device. Empty arguments are
- taken to be zero, and any omitted arguments before the name are left
- unchanged.
- <dl>
- <dt>IRQ
- <dd>This entry specifies the IRQ value to be set (on boards with
- software-settable IRQs) or used (on boards with jumpered IRQs). A
- value of '0' means to read the IRQ line from the board (if possible)
- or use autoIRQ if the board doesn't provide a way to read the IRQ.
- <dt>IO-ADDR
- <dd>This entry specifies a single base I/O address to probe.
- A value of zero specifies that all reasonable I/O address are to be probed.
-
- <P>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=<IO-ADDR>,<EXTENT>" parameter to exclude
- other device probes from an IO region.
-
- <dt>PARAM1,PARAM2
- <dd>Originally these entries were for specifying the memory address of
- adaptors that use shared memory, like the WD8013. Over time they have
- been extended to provide other driver-specific information.
-
- <dt>NAME
- <dd>The name of a predefined device. The stock kernel defines at
- least "eth0", "eth1", "eth2", and "eth3". Other devices names (e.g.
- for PPP, SLIP, or a pocket ethernet device) may exist but will have
- different semantics.
-
- </dl>
-
- <P>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.
- <listing>
- linux ether=0,0,eth1 ether=0,0,eth2 ether=0,0,eth3
- </listing>
-
- <P>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,
- <i>/etc/lilo.conf</i>, and running LILO to install your updated configuration.
- <listing>
- append = "ether=0,0,eth1 ether=0,0,eth2 ether=0,0,eth3"
- </listing>
-
-
- <h2>Modifying your kernel</h2>
-
- <P>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:
-
- <ul>
- <li>When you need to enable more than four devices. (The
- drivers/net/Space.c only has entries for eth0...eth3.)
- <li>When you must limit the probe types to a subset of possible card types
- e.g. when a probe confuses a different type of device.
- <li>When you want a device name other than eth<i>N</i>.
- </ul>
-
- If you've decided to go this route, edit the device list in
- drivers/net/Space.c to insert your desired values. If you need to add
- a new device take care that you preserve the chaining: use the
- existing list entries as a guide.
-
- <h2><a name="cardnotes">Special notes on the specific device probes</h2>
-
- <h3>LANCE/PCnet cards</h3>
-
- <P>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.
-
- <h3>The 3c509 in ISA mode</h3>
-
- <P>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.
-
- <P>The most noticeable aspect is that it's difficult to predict
- <i>a priori</i> 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.
-
- <P>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.
-
- <h3>The EISA 3c579 and the 3c509 in EISA mode</h3>
-
- Kernels before 1.1.25 will not correctly probe for multiple EISA-mode cards.
- If multiple "ethN" entries are specified the *same* 3c5*9 card will be
- found multiple times.
- The work-around is to specify the slot-based I/O address explicitly.
-
- Kernels after 1.1.25 will correctly find multiple EISA-mode cards, and
- will continue to find additional ISA-mode adaptors after all of the
- potential EISA-mode addresses are checked.
- </body>
- <hr>
- <a href=#top>Top</a><br>
- <a href="http://cesdis.gsfc.nasa.gov/linux/linux.html">Linux at CESDIS</a><br>
- <address><i>Author: </i><a href="http://cesdis.gsfc.nasa.gov/pub/people/becker/whoiam.html">Donald
- Becker</a>, becker@cesdis.gsfc.nasa.gov</address>
- The HowTo right-to-copy is given in
- <a href="http://sunsite.unc.edu/mdw/HOWTO/HOWTO-INDEX-6.html">
- http://sunsite.unc.edu/mdw/HOWTO/HOWTO-INDEX-6.html</a>
- </html>
-
-