Token-Ring mini-HOWTO

Mike Eckhoff, mike.e@emissary.aus-etc.com

v4.1, 7 January 1998


This howto is designed to help you install the kernel patch and also try to point out some things to look for. I suggest that you at least browse through all of this document before attempting to install any part of the Token Ring driver for Linux.

Special Thanks

to Mark Swanson, Peter De Schrijver, David Morris, Paul Norton and everyone else I may have missed who put in their time to write and maintain this driver. Also to packrat for his support of the linux-tr listserv.

1. Copyright and other Jazz

2. Hardware requirements

3. Software needed

4. Installation and setup

5. NetTools installation

6. Known problems

7. Questions and comments

8. Distribution Specific Installations


1. Copyright and other Jazz

We do not guarantee that this howto will be accurate for your system. Most people who have used it have had very good results in installing Linux on a Token Ring network.

USE THIS HOWTO AT YOUR OWN RISK!!! ... We are not responsible for any problems caused by using this howto.

If you have any problems with the driver that are not talked about in this howto, feel free to email me at...

mike.e@emissary.aus-etc.com
You may also wish to join the Linux on Token Ring Listserv by mailing majordomo@emissary.aus-etc.com with the body containing:
subscribe linux-tr

This document is copyright (c) 1995-1998 by Michael Eckhoff. You may make copies of this document in whole or in part, in any medium physical or electronic, as long as the copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, please notify me so that I can make sure that you have the most current information available.


2. Hardware requirements

Make sure that you have a Token Ring card that is supported by this driver. Currently the only cards that are supported are those that use the Tropic chipset.

Cards that I personally know to work are:

All other 100% IBM compatable shared-ram adapters should also work fine. Please let us know if you find differently.

It is recommended that you use 16KB Shared RAM for the time being.

Cards that may cause problems:

IBM Turbo 16/4 ISA adapter

This adapter will, in fact, work fine with the Linux token ring driver. However, you MUST run the card in Auto 16/4 compatability mode. The simplest way to set this is to use the LANAID disks sent with the card and run the command:

LANAIDC /FAST=AUTO16
       
You should then use LANAIDC or LANAID to configure the card according to documentation.

Token-Ring Network 16/4 Adapter II

This adapter will NOT work. Do not confuse this card with the IBM Token Ring adapter II (4mbit) which does. It is a DMA/Busmaster adapter for ISA.

3Com TokenLink Velocity ISA

You may or may not get this one to work. I have had reports of people running it without problems, and others who get errors left and right.

PCI adapters

Currently, none of the IBM PCI adapters are supported.

IBM Auto LanStreamer 16/4 Token-Ring PCI Adapter

Currently not supported, but being worked on. This driver should be Full Duplex as well when completed.


3. Software needed

NOTE:

If you are running a 2.0 distribution of Linux, please jump to the distriubtion specific section of this document. The following is mostly for 1.2 kernels.

This assumes you already have Linux up and running.

Obtain the Token Ring patch from:

ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-Ring/TokenRing.patch-1.2.0.gz
Obtain the NetTools patched source from:
ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-Ring/net-tools-1.2.0.patched.tar.gz
Create a directory for the patches (such as /usr/src/patches) and place the patches there.
mkdir /usr/src/patches             central directory for patch storage
mkdir /usr/src/patches/token       place TokenRing patch here

4. Installation and setup

NOTE:

These instructions are for patching a 1.2 kernel for token ring support. If you have a 2.0 kernel, you only need to recompile the current source and say ``yes'' or ``module'' when asked for token ring support.

  1. Install the Token Ring card into the system and configure it for the settings that you want to use. It is a good idea to see if you can use the card through DOS before trying to use it through Linux. If it works in DOS, chances are, it will work in Linux with the same settings. If you have a Plug and Play adapter, if possible, lock the settings once you get them where they work.
  2. Make a backup of your linux directory. This is very important in case you need to totally remove the source of the patch from your kernel and go back to your original code.
    cd /usr/src
    tar cvzhf linuxbak.tar.gz linux
            
    
  3. Uncompress the TokenRing patch.
    cd /usr/src/patches/token
    gzip -d TokenRing.patch-1.2.0.gz
            
    
  4. Modify your kernel with the TokenRing patch.
    cd /usr/src/linux
    patch -p1 < /usr/src/patches/token/TokenRing.patch-1.2.0
            
    
    -or-
    patch -p1 < <directory-of-patchfile>/TokenRing.patch-1.2.0
            
    
  5. Search your kernel for any rejects from the patch and make changes as necessary.
    find . -name \*.rej -print
            
    
  6. Search your kernel for the orig files and remove them.
    find . -name \*.orig -print | xargs rm
            
    
  7. Configure your kernel and remake.
    NOTE:

    Make sure your swap space is active if you have one.

    cd /usr/src/linux
    make config
            
    
    (The patch should have added two lines to your config.in file for the following options)
    Token Ring support (CONFIG_TR) [y]
            
    
    (and further down the list...)
    IBM Tropic chipset based adaptor support (CONFIG_IBMTR) [y]
            
    
    make dep
    make clean
    make zImage
            
    
  8. Setup LILO. First rename your /vmlinuz kernel to vmlinuz.old then copy the kernel to /vmlinuz. On my system this would consist of copying
    /usr/src/linux/arch/i386/boot/zImage to /vmlinuz and editing /etc/lilo.conf to boot that kernel.
    Now from the prompt run ``lilo''.
  9. You should now be able to reboot your system and use the Token Ring card in your computer. Please check the distribution specifc section for any extra configuration information.

5. NetTools installation

The NetTools package contains a lot of the basic utils that you will use to communicate with network devices. This includes programs like arp, rarp, route, ifconfig and netstat. Since these programs do not know about Token Ring by default, you will need to add the NetTools patch so these utilities can work more efficiently with the Token Ring driver.

NOTICE:

The current version of NetTools for 1.2.x kernels is 1.2.0. If you are running a 2.0 kernel, your nettools is most likely already up to date. However, you can get the latest source from:

ftp://tapac.inka.de/pub/comp/Linux/networking/NetTools/
  1. (1) Copy and Untar the NetTools source into your source directory.
    cp net-tools-1.2.0.patched.tar.gz  /usr/src
    tar -zxvof /usr/src/net-tools-1.2.0.tar.gz 
            
    
  2. (5) Make the net-tools files.
    cd /usr/src/net
    make install
            
    

6. Known problems

I personally have had very few problems with this driver. It has been working perfectly for me for quite some time.

If you have any problems with the driver on a 1.2.x kernel, please update to Linux 2.0. The current version, as of this writing, is 2.0.33. There have been many improvements to the token ring driver since the 1.2 patches and most of them have not been ported back.

Also, you will not have to patch a Linux 2.0 kernel for token ring. The source is already included. However, there are some test patches of the code going into 2.1 available if you would like to use it.


7. Questions and comments

Q:

Can the token ring driver be compiled as a module?

A:

Yes, it can be — and it works rather well. There is an extra parameter that you can use when it is compiled as a module. If you ever need to ``spoof'' software install programs, such as the redhat boot disks, into configuring your token ring card as an ethernet device (for NFS/FTP installs, etc), you can use the ``device'' parameter to force a device name other then tr0. You will probably have problems if you try this with multiple adapters. It is mostly there to get around a few incompatabiliites. Ex.:

/sbin/insmod ibmtr device=eth0
        

Q:

I keep getting an error code ``0011''. Whats up?

A:

Make sure that your connection to the network is good or that you have a loopback connector on your token ring card. This message just means that it could not open the ring. 99.99% of the times, it is just not plugged into one.

C:

If you have a sound card in your machine, and it sits at IO 0x220, you may end up with a conflict with your token ring adapter at 0xa20. If you notice that a supported adapter does not seem to be working and you have a sound card, please try to either set your token ring card to 0xa24 or move/remove your sound card.

Also...

Here are some email messages that I have received about Token Ring and Linux. In some of the messages, I have removed parts that were not important to save space.

Q:

From: "Mr. Chuck Rickard" <chuck@gl.umbc.edu>
Subject: Re: Token Ring Kernel patch

I d/l'd the patch, applied it, and re-compiled. When booting it said,
"tr0: Can't assign device to adapter" and again for tr1.  Any ideas?

Thanks!

Chuck Rickard
(chuck@umbc8.umbc.edu)
              

A:

From: David Morris <dwm@shell.portal.com>
              
When this is the only message issued, it means that the PIO request for adapter information (see segment = inb(PIOaddr) in ibmtr.c) was so out of range that there is no TR card at that IO address.

Q:

From: Mike Glover <glover@credit.erin.utoronto.ca>
Subject: Token ring problems.

Thanks for responding. I was starting to thing that I posted incorrectly, 
and I was about to post again. Anyway, the following  clip is part of my
/var/adm/messages file from when I boot up.

May  2 10:03:14 linux kernel: tr0: Unable to assign adapter to device.
May  2 10:03:14 linux kernel: tr1: Unable to assign adapter to device.

The section, tr0: Unable to assign adapter device. is what kinda confuses 
me. The documentation is slim at best so I didn't know what to do with 
the message. I know I didn't assign any token ring information,
and I didn't know where to do it.

The hardware:
            Its a PC clone (Dell OMNIPLEX 560 to be exact)
            The token ring card is a Olicom 16/4 Adapter.

I have DOS token ring drivers and it snaps into the network, so there is 
nothing wrong with the card. I think, I am just missing something really 
small in the config on the Linux side.
              

A:

The Olicom 16/4 Adapter does not use the Tropic Chipset. Try using one of the cards that are listed at the top of the HOWTO.

Q:

From: Mike Glover <glover@credit.erin.utoronto.ca>
Subject: Found an IBM card...

I found myself an IBM token ring card and I got a little further,
but still not luck. (I did change /etc/rc.d/rc.inet1 ifconfig entry
from eth0 to tr0)

Anyway, here is part of the /var/adm/messages file:
May  2 16:23:07 linux kernel: IPX Portions Copyright (c) 1995 Caldera, Inc.
May  2 16:23:07 linux kernel: tr0: PIOaddr:  a20 seg/intr: b8 mmio base:
   000dc000 intr: 0
May  2 16:23:07 linux kernel: tr0: Channel ID string not found for PIOaddr: a20
May  2 16:23:07 linux kernel: tr0: Expected for ISA: 5049434f3631313039393020
May  2 16:23:07 linux kernel: tr0:            found: 000902003021111000182000
May  2 16:23:07 linux kernel: tr0: Expected for MCA: 4d4152533633583435313820
May  2 16:23:07 linux kernel: tr0: Unable to assign adapter to device.
May  2 16:23:07 linux kernel: tr1: Unable to assign adapter to device.
May  2 16:23:07 linux kernel: PPP: version 0.2.7 (4 channels) NEW_TTY_DRIVERS
   OPTIMIZE_FLAGS


Does this tell you anything. It tells me little.
              

A:

From: David Morris <dwm@shell.portal.com>
              
This message means either a memory conflict with the MMIO area or a TR card which is not compatible with the driver (at least the signature isn't known).

Q:

From: Mike Glover <glover@credit.erin.utoronto.ca>
Subject: Almost there...

The following sample is what I'm getting on my messages file:

May  3 14:50:24 linux kernel: tr0: now opening the board...
May  3 14:50:24 linux kernel: tr0: board opened...
May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec.
   Donald resets adapter, but resetting
May  3 15:11:47 linux kernel:  the IBM tokenring adapter takes a long time.
   It might not even help when the
May  3 15:11:47 linux kernel:  ring is very busy, so we just wait a little longer
   and hope for the best.
May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec.
   Donald resets adapter, but resetting
May  3 15:11:47 linux kernel:  the IBM tokenring adapter takes a long time.
   It might not even help when the
May  3 15:11:47 linux kernel:  ring is very busy, so we just wait a little longer
   and hope for the best.
May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec.
   Donald resets adapter, but resetting

The Arrg entry only comes when I telnet, rlogin or ftp to a remote 
machine. Once that happens, the connection hangs big time. I took out all 
the other hardware (which was 1 SCSI card) and tried running the card all 
by itself. Same thing, so it eliminates hardware IRQ's from getting into 
a yelling match. The following are the DIP switches on the card:

1       Up      |
2       Down    |
3       Down    |       According to the manual this sets the 
4       Up      |       base address to CC000 Which is fine for
5       Up      |       my machine.
6       Down    |
7       Down    +       This sets the IRQ to 2. Which is also fine      
8       Down    +
9       Up      X       Primary Lan adapter. Which it is.
10      Up      =       16 KB shared RAM size. This OK? 
11      Down    =
12      Up      #       16 Mbps Data rate.

I was wondering if it is in fact the dip switches, or the way I have 
configured my route table and other network info.

ttfn,
Mike
              

A:

The Arrg problem is pretty much taken care of in the 2.0 kernels. All of the patches have not been ported back to 1.2, and I doubt that they will be. If you get excessive Arrg messages, do yourself a favour and move to Linux 2.0.


8. Distribution Specific Installations

8.1 Slackware 96

If you have not already ran ``netconfig'' on your system, do so now. Setup your machine just as if it were on Ethernet.

Edit your /etc/rc.d/rc.inet1 scripts to point to the tr0 device rather than the eth0 device.

You should have a line that looks like

/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
Change this line to read
/sbin/ifconfig tr0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

8.2 RedHat 4.0+

The RedHat distribution of Linux has a wonderful Xwindows control panel for configuring modules and devices. If you have added a token ring adapter to a standard RedHat installation, there should already be token ring support compiled in as a module. Try to:

modprobe ibmtr
and see what you come up with. Chances are, if you have a supported adapter, you will be ready to go.

The easiest way to configure your interface would be to use the control-panel. You will first want to go to the kernel module control and instruct it to load a new network device for token ring. It should then start to autoload the ibmtr driver on boot. You will then want to jump over to network configuration and add a new device, tr, and give it an ip address, etc.

You should then be able to restart and go with Linux and Token Ring on RedHat 4.0+.

Please note that these RedHat instructions came from the top of my head. I havn't had to modify any of my RedHat systems for quite some time and am writing this from memory. Either way, they should be able to get you where you need to go.