home *** CD-ROM | disk | FTP | other *** search
/ Caldera Network Desktop 1.0 / caldera-network-desktop-1.0.bin / doc / HOWTO / mini / Multiple-Ethernet < prev    next >
Text File  |  1995-08-05  |  7KB  |  176 lines

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