home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / HOWTO / MINI / MULTIPLE < prev    next >
Encoding:
Text File  |  1995-04-20  |  6.6 KB  |  168 lines

  1. <html>
  2. <title>Multiple Linux ethercard HowTo</title>
  3. <h1><a name="top">Mini-HowTo on using multiple ethercards with Linux</h1>
  4. <h2>Don Becker, becker@cesdis.gsfc.nasa.gov</h2>
  5. <body>
  6.  
  7.  
  8. <P>This is an short note on configuring  Linux to recognize multiple ethernet
  9. adapters. 
  10.  
  11. <P>For most people running a standard Linux distribution, just add this
  12. line to the top of your <i>/etc/lilo.conf</i> file and re-run `lilo': 
  13.  
  14. <listing>
  15. append = "ether=0,0,eth1"
  16. </listing>
  17.  
  18. <P>That's all there is to it.  The next time you boot Linux should
  19. recognize your second ethercard.
  20.  
  21. <h2>What you did, and how you did it.</h2>
  22.  
  23. <P>By default a stock Linux kernel probes for a single ethercard, and once
  24. one is found the probe ceases.  There are three defined ways to cause the
  25. kernel to probe for additional cards.  In increasing order of difficulty and
  26. permanence they are:
  27.  
  28. <ul>
  29. <li>Passing parameters to your kernel at boot time.
  30. <li>Configuring your boot loader to always pass those parameters.
  31. <li>Modifying the kernel netcard probe tables in <b>drivers/net/Space.c</b>.
  32. </ul>
  33.  
  34. <P>For most people the second method is most appropriate, and it's the
  35. one that was described above.
  36.  
  37. <h2>Passing parameters using your boot loader</h2>
  38.  
  39. <P>In the following instructions it's assumed that you are using the standard
  40. Linux boot loader, `<i>LILO</i>'.
  41.  
  42. <P>The Linux kernel recognizes certain parameters passed at boot-time.  Most
  43. often these parameters specify aspects of the configuration that cannot be
  44. determined at boot-time.  For network adaptors the following parameter is
  45. recognized: 
  46. <listing>
  47. ether=<IRQ>,<IO-ADDR>,<PARAM1>,<PARAM2>,<NAME>
  48. </listing>
  49.  
  50. Valid numeric arguments may be in decimal, octal (with a leading '0')
  51. or hexadecimal (preceded by a '0x').  The first non-numeric argument
  52. is taken to be the <i>NAME</i> of the device.  Empty arguments are
  53. taken to be zero, and any omitted arguments before the name are left
  54. unchanged.
  55. <dl>
  56. <dt>IRQ
  57. <dd>This entry specifies the IRQ value to be set (on boards with
  58. software-settable IRQs) or used (on boards with jumpered IRQs).  A
  59. value of '0' means to read the IRQ line from the board (if possible)
  60. or use autoIRQ if the board doesn't provide a way to read the IRQ.
  61. <dt>IO-ADDR
  62. <dd>This entry specifies a single base I/O address to probe.
  63. A value of zero specifies that all reasonable I/O address are to be probed.
  64.  
  65. <P>Normally an I/O region reservation map is used to decide if a
  66. location can be probed.  This map is ignored if an I/O address is specified.
  67. This allows the "reserve=<IO-ADDR>,<EXTENT>" parameter to exclude
  68. other device probes from an IO region. 
  69.  
  70. <dt>PARAM1,PARAM2
  71. <dd>Originally these entries were for specifying the memory address of
  72. adaptors that use shared memory, like the WD8013.  Over time they have
  73. been extended to provide other driver-specific information.
  74.  
  75. <dt>NAME
  76. <dd>The name of a predefined device.  The stock kernel defines at
  77. least "eth0", "eth1", "eth2", and "eth3".  Other devices names (e.g.
  78. for PPP, SLIP, or a pocket ethernet device) may exist but will have
  79. different semantics.
  80.  
  81. </dl>
  82.  
  83. <P>LILO provides two ways to pass these boot-time parameters to the kernel.
  84. The most common way to do this is to type them immediately after specifying
  85. the name of the boot image.  The following example enables all four of the
  86. available probe slots.
  87. <listing>
  88. linux ether=0,0,eth1 ether=0,0,eth2 ether=0,0,eth3
  89. </listing>
  90.  
  91. <P>Of course this is pretty complicated to type in at each boot, and
  92. would preclude unattended reboots.  You can make the kernel parameters
  93. permanent by adding an "append" line to your LILO configuration file,
  94. <i>/etc/lilo.conf</i>, and running LILO to install your updated configuration.
  95. <listing>
  96. append = "ether=0,0,eth1 ether=0,0,eth2 ether=0,0,eth3"
  97. </listing>
  98.  
  99.  
  100. <h2>Modifying your kernel</h2>
  101.  
  102. <P>If it's possible for you to configure your system without modifying
  103. the kernel source, I recommend that you do so.  Modifying the source
  104. code isn't self-documenting and results in extra complications at
  105. upgrade time.  Still there are a few instances where it is
  106. appropriate:
  107.  
  108. <ul>
  109. <li>When you need to enable more than four devices.  (The
  110. drivers/net/Space.c only has entries for eth0...eth3.)
  111. <li>When you must limit the probe types to a subset of possible card types
  112. e.g. when a probe confuses a different type of device.
  113. <li>When you want a device name other than eth<i>N</i>.
  114. </ul>
  115.  
  116. If you've decided to go this route, edit the device list in
  117. drivers/net/Space.c to insert your desired values.  If you need to add
  118. a new device take care that you preserve the chaining: use the
  119. existing list entries as a guide.
  120.  
  121. <h2><a name="cardnotes">Special notes on the specific device probes</h2>
  122.  
  123. <h3>LANCE/PCnet cards</h3>
  124.  
  125. <P>The LANCE driver requires special low-memory DMA buffers, and so the
  126. LANCE probe is differently and earlier than the other network device probes.
  127. The upside of this is that you can ignore this whole section: multiple LANCE
  128. cards are automatically probed for.  The downside is that the LANCE driver
  129. doesn't (yet!) use the LILO parameters e.g. IRQ.
  130.  
  131. <h3>The 3c509 in ISA mode</h3>
  132.  
  133. <P>The 3c509 has a unique feature that allows truly safe probing on the
  134. ISA bus.  This is great, but unfortunately for us this method doesn't
  135. mix well with the rest of the probes.
  136.  
  137. <P>The most noticeable aspect is that it's difficult to predict
  138. <i>a priori</i> which card will be accepted "first" -- the order is based
  139. on the hardware ethernet address.  That means that the ethercard with the
  140. lowest ethernet address will be assigned to "eth0", and the next to "eth1",
  141. etc.  If the "eth0" ethercard is removed, they all shift down one number.
  142.  
  143. <P>A related aspect is that it's not possible to leave an "earlier"
  144. card disabled, enable a card at an address or IRQ different than the
  145. EEPROM setting, or enable a card at a specific address. 
  146.  
  147. <h3>The EISA 3c579 and the 3c509 in EISA mode</h3>
  148.  
  149. Kernels before 1.1.25 will not correctly probe for multiple EISA-mode cards.
  150. If multiple "ethN" entries are specified the *same* 3c5*9 card will be
  151. found multiple times.
  152. The work-around is to specify the slot-based I/O address explicitly.
  153.  
  154. Kernels after 1.1.25 will correctly find multiple EISA-mode cards, and
  155. will continue to find additional ISA-mode adaptors after all of the
  156. potential EISA-mode addresses are checked. 
  157. </body>
  158. <hr>
  159. <a href=#top>Top</a><br>
  160. <a href="http://cesdis.gsfc.nasa.gov/linux/linux.html">Linux at CESDIS</a><br>
  161. <address><i>Author: </i><a href="http://cesdis.gsfc.nasa.gov/pub/people/becker/whoiam.html">Donald
  162. Becker</a>, becker@cesdis.gsfc.nasa.gov</address>
  163. The HowTo right-to-copy is given in
  164. <a href="http://sunsite.unc.edu/mdw/HOWTO/HOWTO-INDEX-6.html">
  165. http://sunsite.unc.edu/mdw/HOWTO/HOWTO-INDEX-6.html</a>
  166. </html>
  167.  
  168.