home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / doc / HOWTO / mini / Token-Ring < prev    next >
Text File  |  1997-05-25  |  17KB  |  457 lines

  1.  
  2. Token-Ring HOWTO
  3. Mike Eckhoff (meckhoff@wayne.esu1.k12.ne.us)
  4. 4/30/97 - Rev 4
  5. To make reading/printing of this document easier, be sure that your margins
  6. are set to ".3" and you are using a proportional font like Courier.
  7.  
  8. This howto is designed to help you install the kernel patch and also try
  9. to point out some things to look for.  I suggest that you at least browse
  10. through all of this document before attempting to install any part of the
  11. Token Ring driver for Linux.
  12.  
  13. Special Thanks to Mark Swanson, Peter De Schrijver, David Morris, 
  14.     Paul Norton and everyone else I may have missed who put in
  15.     their time to write and maintain this driver.
  16.  
  17. Copyright and other Jazz
  18. ------------------------
  19.  
  20.     We do not guarantee that this howto will be accurate for your system.
  21.     Most people who have used it have had very good results in installing
  22.     Linux on a Token Ring network.
  23.  
  24.     USE THIS HOWTO AT YOUR OWN RISK!!! ... We are not responsible for 
  25.     any problems caused by using this howto.
  26.  
  27.     If you have any problems with the driver that are not talked about
  28.     in this howto, feel free to email me at...
  29.  
  30.         meckhoff@wayne.esu1.k12.ne.us
  31.  
  32.     You may also wish to join the Linux on Token Ring Listserv
  33.     by mailing majordomo@wayne.esu1.k12.ne.us with the body
  34.     containing:
  35.  
  36.     subscribe linux-tr
  37.  
  38.     This document is copyright (c) 1995-1997 by Michael Eckhoff.  
  39.     You may make copies of this document in whole or in part, in 
  40.     any medium physical or electronic, as long as the copyright 
  41.     notice is retained on all copies.  Commercial redistribution 
  42.     is allowed and encouraged; however, please notify me so that 
  43.     I can make sure that you have the most current information 
  44.     available.
  45.  
  46.  
  47.  
  48. INDEX
  49. -----
  50.  
  51.     I.    Hardware Requirements
  52.     II.    Software Needed
  53.     III.    Installation and Setup
  54.     IV.    NetTools Installation
  55.     V.    Known Problems
  56.     VI.    Questions and Comments
  57.     VII.    Distribution Specific Installations
  58.         a.  Slackware 96
  59.         b.  RedHat 4.0+
  60.  
  61. ----
  62.  
  63. I.  HARDWARE REQUIREMENTS
  64.  
  65.        Make sure that you have a Token Ring card that is supported by this
  66.        driver.  Currently the only cards that are supported are those that
  67.        use the Tropic chipset.  
  68.  
  69.        Cards that I personally know to work are:
  70.         
  71.           3Com 3C619B Token Link
  72.           3Com 3C619C Token Link
  73.           HyperRing Classic 16/4
  74.               IBM Turbo 16/4 ISA adapter**    
  75.           IBM Token Ring Auto 16/4 ISA adapter
  76.           IBM Token Ring Auto 16/4 adapter /A
  77.           IBM Token Ring 16/4 adapter /A
  78.           IBM Token Ring adapter /A
  79.           IBM Token Ring adapter II (4 Megabit only)
  80.               IBM 16/4 ISA Token Ring card (16bit)
  81.               IBM 16/4 ISA Token Ring card (8bit)
  82.             Madge Blue (100% IBM compatable)
  83.  
  84.        All other 100% IBM compatable shared-ram adapters should also
  85.        work fine.  Please let us know if you find differently.
  86.  
  87.        It is recommended that you use 16KB Shared RAM for the time
  88.        being.
  89.  
  90.     Cards that may cause problems:
  91.  
  92.       IBM Turbo 16/4 ISA adapter
  93.  
  94.        This adapter will, in fact, work fine with the linux
  95.        token ring driver.  However, you MUST run the card in
  96.        Auto 16/4 compatability mode.  The simplest way to set
  97.        this is to use the LANAID disks sent with the card and
  98.        run the command:  LANAIDC /FAST=AUTO16
  99.        You should then use LANAIDC or LANAID to configure the
  100.        card according to documentation.
  101.  
  102.       Token-Ring Network 16/4 Adapter II
  103.  
  104.        This adapter will *NOT* work.  Do not confuse this card with 
  105.        the IBM Token Ring adapter II (4mbit) which does.  It is a 
  106.        DMA/Busmaster adapter for ISA.
  107.  
  108.      3Com TokenLink Velocity ISA    
  109.        
  110.        You may or may not get this one to work.  I have had reports
  111.        of people running it without problems, and others who get
  112.        errors left and right. 
  113.  
  114.      PCI adapters
  115.     
  116.        Currently, none of the IBM PCI adapters are supported. 
  117.  
  118.      IBM Auto LanStreamer 16/4 Token-Ring PCI Adapter 
  119.  
  120.        Currently not supported, but being worked on.  This driver
  121.        should be Full Duplex as well when completed.
  122.  
  123. II. SOFTWARE NEEDED.
  124.  
  125.     NOTE:  If you are running a 2.0 distribution of Linux,
  126.         please jump to the distriubtion specific section of
  127.         this document.  The following is mostly for 1.2 kernels.
  128.  
  129.     This assumes you already have Linux up and running.
  130.  
  131.     Obtain the Token Ring patch from:
  132.     ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-Ring/
  133.             TokenRing.patch-1.2.0.gz
  134.  
  135.     Obtain the NetTools patched source from:
  136.     ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-Ring/
  137.             net-tools-1.2.0.patched.tar.gz
  138.  
  139.      Create a directory for the patches(such as /usr/src/patches) and place
  140.      the patches there.
  141.   
  142.        mkdir /usr/src/patches             central directory for patch storage
  143.        mkdir /usr/src/patches/token       place TokenRing patch here
  144.  
  145.  
  146. III.  INSTALLATION AND SETUP
  147.  
  148.     NOTE:  These instructions are for patching a 1.2 kernel for
  149.         token ring support.  If you have a 2.0 kernel, you
  150.         only need to recompile the current source and say 'yes'
  151.         or 'module' when asked for token ring support.
  152.  
  153. 1.  Install the Token Ring card into the system and configure it for the 
  154.     settings that you want to use.  It is a good idea to see if you can use 
  155.     the card through DOS before trying to use it through Linux.  
  156.     If it works in DOS, chances are, it will work in Linux with the same 
  157.     settings.  If you have a Plug and Play adapter, if possible, lock the 
  158.     settings once you get them where they work.
  159.  
  160. 2.  Make a backup of your linux directory.  This is very important in case you 
  161.     need to totally remove the source of the patch from your kernel and go 
  162.     back to your original code.
  163.  
  164.       cd /usr/src
  165.       tar cvzhf linuxbak.tar.gz linux
  166.  
  167. 3.  Uncompress the TokenRing patch.
  168.  
  169.        cd /usr/src/patches/token
  170.        gzip -d TokenRing.patch-1.2.0.gz
  171.  
  172. 5.  Modify your kernel with the TokenRing patch.
  173.  
  174.       cd /usr/src/linux
  175.       patch -p1 < /usr/src/patches/token/TokenRing.patch-1.2.0
  176.                     -or-
  177.       patch -p1 < <directory-of-patchfile>/TokenRing.patch-1.2.0
  178.  
  179. 6.  Search your kernel for any rejects from the patch and make changes as 
  180.     necessary.
  181.  
  182.       find . -name \*.rej -print
  183.  
  184. 7.  Search your kernel for the orig files and remove them.
  185.  
  186.       find . -name \*.orig -print | xargs rm
  187.  
  188. 8.  Configure your kernel and remake.
  189.  
  190.         NOTE:  Make sure your swap space is active if you have one.
  191.  
  192.     cd /usr/src/linux
  193.     make config
  194.         (The patch should have added two lines to your config.in file for the 
  195.          following options)
  196.  
  197.            Token Ring support (CONFIG_TR) [y]
  198.  
  199.               (and further down the list...)
  200.  
  201.            IBM Tropic chipset based adaptor support (CONFIG_IBMTR) [y]
  202.  
  203.     make dep
  204.     make clean
  205.     make zImage
  206.  
  207. 9.  Setup LILO.
  208.     First rename your /vmlinuz kernel to vmlinuz.old then copy the kernel to
  209.     /vmlinuz
  210.       On my system this would consist of copying
  211.         /usr/src/linux/arch/i386/boot/zImage to /vmlinuz and editing
  212.         /etc/lilo.conf to boot that kernel.
  213.     Now from the prompt run 'lilo'.
  214.  
  215. 10.  You should now be able to reboot your system and use the Token Ring
  216.      card in your computer.  Please check the distribution specifc section
  217.      for any extra configuration information.
  218.  
  219. IV.  NETTOOLS INSTALLATION
  220.  
  221.       The NetTools package contains a lot of the basic utils that you
  222.       will use to communicate with network devices.  This includes
  223.       programs like arp, rarp, route, ifconfig and netstat.  
  224.       Since these programs do not know about Token Ring by default, 
  225.       you will need to add the NetTools patch so these utilities can 
  226.       work more efficiently with the Token Ring driver.
  227.  
  228.     NOTICE:  The current version of NetTools for 1.2.x kernels is 
  229.          1.2.0.  If you are running a 2.0 kernel, your nettools
  230.          is most likely already up to date.  However, you can
  231.          get the latest source from:
  232.  
  233.     ftp://tapac.inka.de/pub/comp/Linux/networking/NetTools/
  234.  
  235. 1.  Copy and Untar the NetTools source into your source directory.
  236.  
  237.       cp net-tools-1.2.0.patched.tar.gz  /usr/src
  238.       tar -zxvof /usr/src/net-tools-1.2.0.tar.gz 
  239.  
  240. 5.  Make the net-tools files.
  241.  
  242.       cd /usr/src/net
  243.       make install
  244.  
  245. V.  KNOWN PROBLEMS
  246.  
  247.     I personally have had very few problems with this driver.  It has
  248.     been working perfectly for me for quite some time. 
  249.  
  250.     If you have any problems with the driver on a 1.2.x kernel, please
  251.     update to Linux 2.0.  The current version, as of this writing, is
  252.     2.0.30.  There have been many improvements to the token ring driver
  253.     since the 1.2 patches and most of them have not been ported back.
  254.  
  255.     Also, you will not have to patch a Linux 2.0 kernel for token ring.
  256.     The source is already included.  However, there are some test patches
  257.     of the code going into 2.1 available if you would like to use it.
  258.  
  259. VI.  Questions and Comments
  260.  
  261. Q:  Can the token ring driver be compiled as a module?
  262. A:  Yes, it can be - and it works rather well.  There is an extra
  263.     parameter that you can use when it is compiled as a module.
  264.     If you ever need to "spoof" software install programs, such as
  265.     the redhat boot disks, into configuring your token ring card
  266.     as an ethernet device (for NFS/FTP installs, etc), you can use
  267.     the 'device' parameter to force a device name other then tr0.
  268.     You will probably have problems if you try this with multiple
  269.     adapters.  It is mostly there to get around a few incompatabiliites.
  270.  
  271.     ex. /sbin/insmod ibmtr device=eth0
  272.  
  273. Q:  I keep getting an error code '0011'.  Whats up?
  274. A:  Make sure that your connection to the network is good or that you
  275.     have a loopback connector on your token ring card.  This message
  276.     just means that it could not open the ring.  99.99% of the times,
  277.     it is just not plugged into one.
  278.  
  279. C:  If you have a sound card in your machine, and it sits at IO 0x220,
  280.     you may end up with a conflict with your token ring adapter at
  281.     0xa20.  If you notice that a supported adapter does not seem to
  282.     be working and you have a sound card, please try to either set
  283.     your token ring card to 0xa24 or move/remove your sound card.
  284.  
  285.     Also...    
  286.  
  287.     Here are some email messages that I have received about Token
  288.     Ring and Linux.  In some of the messages, I have removed parts
  289.     that were not important to save space.
  290. ----
  291.  
  292. ~From: "Mr. Chuck Rickard" <chuck@gl.umbc.edu>
  293. ~Subject: Re: Token Ring Kernel patch
  294.  
  295. I d/l'd the patch, applied it, and re-compiled.  When booting it said,
  296. "tr0: Can't assign device to adapter" and again for tr1.  Any ideas?
  297.  
  298. Thanks!
  299.  
  300. Chuck Rickard
  301. (chuck@umbc8.umbc.edu)
  302.  
  303. ~From: David Morris <dwm@shell.portal.com>
  304.  
  305. A:  When this is the only message issued, it means that the PIO request for
  306.     adapter information (see segment = inb(PIOaddr) in ibmtr.c) was so out
  307.     of range that there is no TR card at that IO address.
  308.  
  309. ----
  310.  
  311. ~From: Mike Glover <glover@credit.erin.utoronto.ca>
  312. ~ubject: Token ring problems.
  313.  
  314. Thanks for responding. I was starting to thing that I posted incorrectly, 
  315. and I was about to post again. Anyway, the following  clip is part of my
  316. /var/adm/messages file from when I boot up.
  317.  
  318. May  2 10:03:14 linux kernel: tr0: Unable to assign adapter to device.
  319. May  2 10:03:14 linux kernel: tr1: Unable to assign adapter to device.
  320.  
  321. The section, tr0: Unable to assign adapter device. is what kinda confuses 
  322. me. The documentation is slim at best so I didn't know what to do with 
  323. the message. I know I didn't assign any token ring information, and I 
  324. didn't know where to do it.
  325.  
  326. The hardware:
  327.     Its a PC clone (Dell OMNIPLEX 560 to be exact)
  328.     The token ring card is a Olicom 16/4 Adapter.
  329.  
  330. I have DOS token ring drivers and it snaps into the network, so there is 
  331. nothing wrong with the card. I think, I am just missing something really 
  332. small in the config on the Linux side.
  333.  
  334. A:  The Olicom 16/4 Adapter does not use the Tropic Chipset.  Try using
  335.     one of the cards that are listed at the top of the HOWTO.
  336.  
  337. -----
  338.  
  339. ~From: Mike Glover <glover@credit.erin.utoronto.ca>
  340. ~Subject: Found an IBM card...
  341.  
  342. I found myself an IBM token ring card and I got a little further, but 
  343. still not luck. (I did change /etc/rc.d/rc.inet1 ifconfig entry from eth0 
  344. to tr0)
  345.  
  346. Anyway, here is part of the /var/adm/messages file:
  347. May  2 16:23:07 linux kernel: IPX Portions Copyright (c) 1995 Caldera, Inc.
  348. May  2 16:23:07 linux kernel: tr0: PIOaddr:  a20 seg/intr: b8 mmio base: 000dc000 intr: 0
  349. May  2 16:23:07 linux kernel: tr0: Channel ID string not found for PIOaddr:  a20
  350. May  2 16:23:07 linux kernel: tr0: Expected for ISA: 5049434f3631313039393020
  351. May  2 16:23:07 linux kernel: tr0:            found: 000902003021111000182000
  352. May  2 16:23:07 linux kernel: tr0: Expected for MCA: 4d4152533633583435313820
  353. May  2 16:23:07 linux kernel: tr0: Unable to assign adapter to device.
  354. May  2 16:23:07 linux kernel: tr1: Unable to assign adapter to device.
  355. May  2 16:23:07 linux kernel: PPP: version 0.2.7 (4 channels) NEW_TTY_DRIVERS OPTIMIZE_FLAGS
  356.  
  357.  
  358. Does this tell you anything. I tells me little.
  359.  
  360. ~From: David Morris <dwm@shell.portal.com>
  361.  
  362. A:  This message means either a memory conflict with the MMIO area or a TR
  363.     card which is not compatible with the driver (at least the signature
  364.     isn't known).
  365.  
  366. -----
  367.  
  368. ~From: Mike Glover <glover@credit.erin.utoronto.ca>
  369. ~Subject: Almost there...
  370.  
  371. The following sample is what I'm getting on my messages file:
  372.  
  373. May  3 14:50:24 linux kernel: tr0: now opening the board...
  374. May  3 14:50:24 linux kernel: tr0: board opened...
  375. May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec. Donald resets adapter, but resetting
  376. May  3 15:11:47 linux kernel:  the IBM tokenring adapter takes a long time. It might not even help when the
  377. May  3 15:11:47 linux kernel:  ring is very busy, so we just wait a little longer and hope for the best.
  378. May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec. Donald resets adapter, but resetting
  379. May  3 15:11:47 linux kernel:  the IBM tokenring adapter takes a long time. It might not even help when the
  380. May  3 15:11:47 linux kernel:  ring is very busy, so we just wait a little longer and hope for the best.
  381. May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec. Donald resets adapter, but resetting
  382.  
  383. The Arrg entry only comes when I telnet, rlogin or ftp to a remote 
  384. machine. Once that happens, the connection hangs big time. I took out all 
  385. the other hardware (which was 1 SCSI card) and tried running the card all 
  386. by itself. Same thing, so it eliminates hardware IRQ's from getting into 
  387. a yelling match. The following are the DIP switches on the card:
  388.  
  389.     1    Up    |
  390.     2    Down    |
  391.     3    Down    |    According to the manual this sets the 
  392.     4    Up    |    base address to CC000 Which is fine for
  393.     5    Up    |    my machine.
  394.     6    Down    |
  395.     7    Down    +    This sets the IRQ to 2. Which is also fine    
  396.     8    Down    +
  397.     9    Up    X    Primary Lan adapter. Which it is.
  398.     10    Up    =    16 KB shared RAM size. This OK?    
  399.     11    Down    =
  400.     12    Up    #    16 Mbps Data rate.
  401.  
  402. I was wondering if it is in fact the dip switches, or the way I have 
  403. configured my route table and other network info.
  404.  
  405. ttfn,
  406.     Mike
  407.  
  408. A:  The Arrg problem is pretty much taken care of in the 2.0 kernels.
  409.     All of the patches have not been ported back to 1.2, and I doubt that
  410.     they will be.  If you get excessive Arrg messages, do yourself a favour
  411.     and move to Linux 2.0.
  412.  
  413. VII.  Distribution Specific Installations
  414.  
  415.   A.  Slackware
  416.  
  417.       If you have not already ran 'netconfig' on your system, do so now.  
  418.       Setup your machine just as if it were on Ethernet.
  419.  
  420.       Edit your /etc/rc.d/rc.inet1 scripts to point to the tr0 device rather 
  421.       then the eth0 device.  
  422.  
  423.       You should have a line that looks like
  424.  
  425.         /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
  426.  
  427.       Change this line to read
  428.  
  429.         /sbin/ifconfig tr0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
  430.  
  431.   B.  RedHat 4.0+
  432.  
  433.     The RedHat distribution of Linux has a wonderful Xwindows control
  434.     panel for configuring modules and devices.  If you have added a
  435.     token ring adapter to a standard RedHat installation, there should
  436.     already be token ring support compiled in as a module.  Try to:
  437.     
  438.     modprobe ibmtr
  439.  
  440.     and see what you come up with.  Chances are, if you have a supported
  441.     adapter, you will be ready to go.
  442.  
  443.     The easiest way to configure your interface would be to use the
  444.     control-panel.  You will first want to go to the kernel module control
  445.     and instruct it to load a new network device for token ring.  It
  446.     should then start to autoload the ibmtr driver on boot.
  447.     You will then want to jump over to network configuration and add
  448.     a new device, tr, and give it an ip address, etc.
  449.  
  450.     You should then be able to restart and go with Linux and Token Ring
  451.     on RedHat 4.0+.
  452.  
  453.     Please note that these RedHat instructions came from the top of my
  454.     head.  I havn't had to modify any of my RedHat systems for quite
  455.     some time and am writing this from memory.  Either way, they should
  456.     be able to get you where you need to go.
  457.