/********************************************************************
*	THE USE BY YOU OF THIS SOFTWARE IS GOVERNED IN ALL
*	RESPECTS BY THE MADGE NETWORKS LTD OPEN SOURCE LICENSE.		
*	WE ADVISE YOU TO READ THE TERMS OF THE OPEN SOURCE LICENSE
*	WHICH CAN BE FOUND WITHIN THE LICENSE.TXT FILE WHICH IS PART OF
*	THE SOFTWARE OR BY VISITING THE URL
*	http://www.madge.com/Connect/Downloads/Software/.		
*	MADGE NETWORKS LTD RESERVES THE RIGHT TO SEEK REDRESS FOR
*	ANY VIOLATION OF THE LICENSE'S TERMS					
*********************************************************************/

Madge Token Ring FAQ                                    10/08/1999
====================                                    ==========

Contents

1.  Why are Token Ring drivers much larger than Ethernet drivers?
2.  What's an adapter download image and why is it necessary?
3.  Why is the Madge driver so large compared to other Token Ring driver?
4.  OK, so why are the IBM drivers so small?
5.  What driver can I use on my Madge Blue Adapter?
6.  What order does the driver bind to multiple adapters?
7.  How do I force an adapter to open at a particular ring speed?
8.  My Madge Smart 100/16/4 adapter won't open on to a switch port at
    100Mbps.
9.  How do I get a working DHCP server using Token Ring under Linux?
10. Why don't packet sniffers work?
11. How do I make the Madge Linux Driver pass up MAC frames to the upper
    layers?
12. The driver fails to load saying device or resource busy and the Madge
    PCI cards have been assigned an IRQ of 255.  Whats wrong?
13. The driver times out on loading on a 2.0.36 SMP kernel. Whats wrong?
14. Who do I contact for technical support for the Madge Linux TR driver?

----

1.  Why are Token Ring drivers much larger than Ethernet drivers?

Many Token Ring adapters require a download image which runs on the
adapter and this download image must be embedded inside the driver
or stored in a separate data file.

2.  What's an adapter download image and why is it necessary?

The adapter download image is the program which runs on the Token
Ring adapter itself.

Token Ring is much more complex than Ethernet and supports many more
features.  Every Token Ring card has a microprocessor on it to off load
the complex processing from the CPU.

The microprocessor on the Token Ring adapter needs a program to run
and thats whats in the download image.

Each manufacturers download image is different depending on what type
of processor they have on their adapters.

Ethernet cards are much simpler and generally just contain glue logic
to talk to the host bus.  (However, nowadays some high end Fast Ethernet
cards have microprocessors on them to off load some processing from the
host CPU).

3.  Why is the Madge driver so large compared to other Token Ring driver?

The Madge driver supports two different kinds of adapter in a single driver.
There are two adapter download images embedded within the driver.

Not only does the Madge driver support two different *kinds* of adapter
it supports, in total, 8 Madge Token Ring Adapters.

Other Linux Token Ring drivers support only one kind of adapter so they
only require one download image.

4.  OK, so why are the IBM drivers so small?

The IBM adapters (and compatibles such as the Madge Blue range of cards)
have their adapter code stored on a ROM on the card.

5.  What driver can I use on my Madge Blue Adapter?

The ibmtr driver can be used for these adapters.  The Madge driver does not 
support Blue cards.

6.  What order does the driver bind to multiple adapters?

The Madge Linux driver binds to PCI cards in order of bus, device, function
number.  
Madge adapters all have function numbers of zero.
The device number and bus number is dependent upon which slot the adapter
is placed in.
For example

    Bus 0, Device 0E, Function 0    - tr0
    Bus 0, Device 0F, Function 0    - tr1
    Bus 1, Device 05, Function 0    - tr2

etc etc.

7.  How do I force an adapter to open at a particular ring speed?

Use the ringspeed module parameter.  This is useful for the first adapter
opening on to a local ring hub.  If the speed is forced to the wrong speed
when opening into a Smart RAM the adapter will open in loop back mode and
communication with other machines is not possible.

8.  My Madge Smart 100/16/4 adapter won't open on to a switch port at
    100Mbps.

Try forcing it using the ringspeed module parameter:-

insmod mtok.o ringspeed=100

9.  How do I get a working DHCP server using Token Ring under Linux?

Use dhcp v2.0 or greater from ISC.

    ftp://ftp.isc.org/isc/dhcp/dhcp-2.0.tar.gz

DHCP servers and clients sometimes need to be aware of the hardware type in
order to function properly.  Some Linux DHCP clients are not aware of the
Token Ring hardware type.

10. Why don't packet sniffers work?

Many packet sniffers are not aware of Token Ring.  There are patches
available for tcpdump and other common packet sniffers.

There are also many frame format problems with the Linux 2.0.x Token Ring
implementation.

These frame format problems have been fixed in the 2.2.x series kernels
but there still exists a bug in both 2.0.x and 2.2.x kernels (as of
25/08/1999).  See below for details.

If you wish to packet sniff it is recommended you use 2.2.x kernels
and a sniffer program that is aware of the bug in the kernel.

A good X11 GTK based packet sniffing program with Token Ring support
is ethereal and can be found here:-

http://ethereal.zing.org


** Technical **

Problem 1
=========
Both 2.0.x and 2.2.x sometimes fail to preserve the source routing bit
on the source address in received Token Ring Frames.  A sniffer sees
there is no source route bit, assumes there is no source route 
information and proceeds to look in the wrong part of the frame for 
frame data.

Problem 2
=========
The 2.0.x series of kernels require data from the Token Ring driver
not in the same format as it comes off the wire.
Specifically the 2.0.x kernels require the LLC header of the frame 
to start at a fixed offset in the frame (the kernel assumes there is
always 18 bytes of source routing information even when there is none).

Problem 3
=========
For non SNAP frames the Linux kernel expects a fake LLC and
SNAP header to be present before the real LLC header from the wire.
This situation occurs in Netware networks.  This situation does not 
occur if only TCP/IP is used because TCP/IP always uses SNAP frames.

Problem 4
=========
Consider this scenario.  The kernel passes a frame down to the driver
for transmission.  The driver needs to modify the frame before it can
be put on the wire because Linux has padded out the source routing
information.

The driver can modify the frame in situ (i.e. in the buffer that the
higher layer passed down) or it can make a complete copy of the
frame and modify the copy.

If it modifies in situ this modified version of the frame will be
passed to a packet sniffer.  The packet sniffer will then receive
a correctly formatted Token Ring frame whereas it might be expecting
a Linux 2.0.x mangled one.  This can confuse the sniffer.

Versions of the Madge Linux Token Ring driver prior to 2.01 made a 
complete copy of the frame before modifiying it so packet sniffers 
received the Linux mangled frame.  However, starting with version 2.01
of the Madge Linux driver the driver will modify the frame in situ as
this improves performance.  This may confuse some packet sniffer
programs.

11. How do I make the Madge Linux Driver pass up MAC frames to the upper
    layers?

Use the trconfig program found in the diag subdirectory of the source code
distribution.

You must be root in order to alter whether MAC frames are passed
up or not.

To enable MAC frame passing up:-

trconfig tr0 mac

To disable MAC frame passing up:-

trconfig tr0 -mac

Use trconfig on its own to display information about an adapter.

This feature is only available on the latest Madge Linux driver
(2.26 and above).

12. The driver fails to load saying device or resource busy and the Madge
    PCI cards have been assigned an IRQ of 255.  Whats wrong?

Try setting the "plug and play aware OS" option in the computers BIOS
to OFF.

13. The driver times out on loading on a 2.0.36 SMP kernel. Whats wrong?

At Madge we have found that the driver fails to work properly with an old
SMP kernel (2.0.36) on newer SMP machines.  The driver worked fine with a new
kernel SMP (2.2.12).  We recommend upgrading to a newer 2.2.x kernel to see
if this fixes the problem.

14. Who do I contact for technical support for the Madge Linux TR driver?

eurtech@madge.com

END
