Token Ring in 2021
Token Ring is dead? Long live Token Ring!
Table of Contents
Background
Token Ring was one of several local area network solutions developed in the early days of non-mainframe computing. It's primary competitor was Ethernet. In the 70s and 80s it was not clear which solution would win. This information is definitely informed by hindsight, since as we know today Token Ring is completely obsolete, and twisted pair based networks are dominant.
It's important to know that Ethernet today and Ethernet before the 90s looked quite different. At this time Ethernet was a proper bus network, initially what was known as 10BASE5 was used, which involved a thick usually yellow coaxial cable running through every office with vampire taps connecting to the cable.
You could also choose to build the network using N connectors in line, similar to what 10BASE2 looked like later. The basic signaling of 10BASE2 and 10BASE5 appear to be identical, the difference is primarily in the connection method.
10BASE2 simply swapped the fat RG-8X cable for a thinner RG-58 or 59 type coax, which was patched into with BNC T-adapters. This variant was known as Thinnet, or sometimes Cheapernet. From a modern perspective both 10BASE2 and 10BASE5 were trash for idiots so it's hard to see where the 10BASE5 elitism came from – maybe the lack of convenience was seen as a noble burden?
For a look at what a network like that would have looked like, see this project: Building A 10BASE5 “Thick Ethernet” Network.
The computers were connected to media independentish transceivers using AUI (Attachment Unit Interface), a 15 pin D-Sub connection. This interface in principle allowed any physical interface to be used, such as fat coax, thin coax, phone line, or fiber optic.
This is a similar idea to modern SFP(+) transceivers, defining a standardized user swappable physical interface to allow flexibility in the physical media.
Fun fact: the Base in e.g. 10BASE2 means baseband, as opposed to carrier based. 10BROAD36 was an unsuccessful 10 Mbit⁄s cable TV based ethernet standard, similarish principles were used in the far more successful DOCSIS standards for cable internet. 10BROAD36 was off-handedly mentioned in popular TV show Halt and Catch Fire (somewhere in season 2).
10BASE-T was standardized in 1990, though some examples of similar solutions exist before that, such at StarLAN 10 and LattisNet.
Bus Network Multiple Access
Note that all 10 Mbit⁄s Ethernet networks were bus networks at the time, today the common topology is a star network with layer 2 switching.
At the time 10BASE-T was hub based and 10BASE2 and 10BASE5 were functionally identical at the higher OSI layers. This means that all Ethernet devices share the same bus, and some multiple access method must be used to avoid collisions.
Ethernet used a solution called Carrier Sense Multiple Access, with Collision Detection (CSMA/CD). The principle here is that nodes on the bus can detect when other devices are talking and avoid transmitting on top of them. Further, they can detect when they accidentally do transmit on top of someone else, or someone else transmits on top of them.
When this occurs, each node involved in a collision will wait for a random time and retry. If collisions continue, the delays get longer.
For small networks this was fine, and it was cheap. No special management was required, the anarchy worked just fine.
There are a few issues with real bus networks, if any fault occurs on the bus coax, the entire network will go down. Some special faults can potentially "split" the network as well. 10BASE2 has special termination requirements, and adding a node to the network means the network is down while you fiddle with cables.
Token Ring
Token passing ring networks were the primary alternative to bus networks. This system uses a logical and physical ring, with a special circulating token, when a token reaches a device it's allowed to transmit, and emits a new token after transmission. This is also the low level implementation, the data output from one station is wired directly to the data input of the next station.
This article is about IBM Token Ring, note that there were other token-passing protocols, and e.g. Apollo computers used a Token Ring network that seems to have been entirely unrelated to the IBM implementation. For example, Apollo does not seem to have used a MAU like IBM.
Token Ring is one such network type, though others existed as well, such as 100 Mbit/s Fiber Distributed Data Transfer (FDDI) networks. Note that FDDI is not directly related to Token Ring.
In Token Ring, each network adapter (station) is wired to the next station in the ring by way of a multistation access unit (MAU) or some more complex device.
One such more complicated device would be a Token Ring full duplex switching hub, which uses a dedicated full duplex link per station, and performs internal layer 2 routing. This means that the network size can be much larger, and allows full bandwidth per device. This solution also means that the Token Ring network does not pass tokens, and it's a star network. Congratulations IBM: you reimplemented Ethernet.
There are several complexities in this network to ensure reliability. If you were to hard-wire a ring, the network would go down whenever a single station went down.
To avoid this issue, a MAU is used which functionally resembles a switch in a modern Ethernet network, though it's basically a box of relays.
This MAU also adds some additional utility by allowing cable testing before link establishment (something Ethernet really could do with to detect bad cables automatically).
MAUs can also be wired together in a fault tolerant way using ring out/ring in connections, typically MAUs are wired in a ring with full duplex capable wiring. This way, if a connection is broken between MAUs the traffic can be looped back to form a new longer ring instead of taking the network down.
To build larger networks "Controlled Access Units" (I think this is a managed MAU) and bridge devices could be used to interconnect several rings to avoid having to circulate all traffic through every device on the network.
As seen above, a typical IBM network contains mostly administration, marketing, and accounting.
Performance
Token Ring initially operated at 4 Mbit⁄s, which is not very fast, but it was pretty good for 1985 when most small networks ran at a few kbit. The standard was later updated to allow 16 Mbit operation. This is why most Token Ring cards include 4/16 in the name somewhere. The standard was later revised to support 100 Mbit⁄s operation, just in time for obsolescence.
Token Ring apparently did perform fairly well compared to bus-based Ethernet, in theory the token passing guarantees fair network access for all devices (instead of allowing high traffic devices to cut off other lower traffic devices). There is a QoS principle in the Token Ring specification, so high priority traffic can be prioritized.
A weakness of CSMA/CD is that performance falls off a cliff when the network traffic and node count reaches a critical mass, and Token Ring apparently performed far better for the same node count.
Token Ring also provides somewhat deterministic latency, since the circulating token has a guaranteed maximum time per node, you can determine that maximum delay between each transmission slot for a given device by counting the nodes.
Computing mythology has tales of enterprise software designed grown to only work on Token Ting, as documented in this old TheDailyWTF article: LORD OF THE TOKEN RINGS.
Cost
Token Ring initially used special heavy gauge 150 Ω shielded twisted pairs with hermaphroditic connectors (IBM Type 1), and 9 pin D-Subs on the actual network cards. This implementation was apparently fragile, bulky, and expensive.
Later implementations used RJ-45 connectors and standard 100 Ω twisted pair phone line (2-pair, like Ethernet, but not the same pins).
The cost of the network cards was by all accounts significantly higher than Ethernet. IBM manufactured ASICs for their own Token Ring cards, which implemented all the required features on a single die. See Strange chip: Teardown of a vintage IBM token ring controller. Later devices were more cost optimised using standard plastic packaging. Texas Instruments also manufactured Token Ring controller chips, which were used by Madge.
The Apple Token Ring 4/16 NB Card cost around $1000, while similar Ethernet cards could cost e.g. $200.
Link Establishment & the MAU
Token Ring uses a relatively complex link establishment protocol compared to Ethernet. When a station wants to join the ring, the following procedure is implemented:
- Station does cable test from TX to RX by using the MAU loopback relay
- Station applies ~5 V / 1 mA bias common mode to the TX pair
- There is current sensing/limiting built in to the station
- Return is via the RX pair to ground
- The MAU or similar device has relays that are activated when this bias is applied, relays open that break the ring, and the new station is inserted
Presumably the station will detect e.g. polarity reversal during the cable test stage.
Note that there's no dedicated ringmaster. For auto-speed adapters (all PCI and most ISA cards) you need the "server" computer to operate in fixed speed mode while the others can be left in auto-speed. If this is not done you may not be able to establish the ring, since autospeed cards seem to refuse to participate unless they can detect the speed.
There are then several higher level checks and tests performed to ensure the ring is sensible and to insert the new station into the ring. Token Ring adapters are quite complex, and are required to remove themselves from the ring if they detect any issues caused by them, this is required since a single misbehaving card could potentially take down the entire network.
This setup means that establishing a link without a MAU is not typically possible without additional hardware — connecting two stations together would typically mean the cable test and bias current tests would fail. The cable test would fail due to no loopback, and the bias test would fail on over-current or no current depending on the configuration.
The common mode bias is applied to the center of the TX transformer secondary, typically the transformer has dual windings so there are two bias supplies (the center point is AC coupled to allow the signal to pass). This allows for some further error detection like various shorted or mis-wired configurations.
The return for the bias is through the receiver pair, which from what I've seen is typically DC grounded at the station (no current limiting/monitoring).
The current flowing through the bias line is detected by the MAU (either using an optoisolator for a powered MAU, or a highly sensitive presumably latching relay in the IBM 8288).
Pinouts
Token Ring has two primary pinouts we need to worry about. We will ignore the original 150 Ω wiring.
The RJ45 pinout is:
Pin no. | Function |
3 | TX1 (RO 1) |
6 | TX2 (RO 2) |
5 | RX1 (RI 1) |
4 | RX2 (RI 2) |
All other pins are N/C, though in some cases they may be chassis ground (like with the media filters).
The network adapter 9 pin D-Sub uses the same pins:
Pin no. | Function |
9 | TX1 (RO 1) |
5 | TX2 (RO 2) |
1 | RX1 (RI 1) |
6 | RX2 (RI 2) |
2, 4, 7, 8 | Ground |
3 | +5 V |
The additional ground and 5 V pins are typically not listed in pinout lists, these can be used to power additional circuitry such as relay drive for the MAU, or perhaps fiber optic transceivers. It seems many but perhaps not all cards include the 5 V pin.
Dummy Network
You can make a Token Ring card link up successfully by using a dummy network plug, though you can't make two standard devices link together without a MAU.
The dummy network is made by connecting 2.2 kΩ resistors between RI1/RO1, and RI2/RO2. You may also want to add a 100 nF capacitor in parallel with each resistor.
The card will successfully perform the cable test, and the resistors simulate the MAU load resistance. The card will link up within around 10 seconds of plugging in the dummy, and the card will be lonely.
Note that multi-speed cards may fail at ring speed detection, I set a fixed 16 Mbit speed for my network on the server side to avoid this.
The Hardware
I bought a few Token Ring adapters for my little retro office network.
IBM 16/4 Token-Ring Low Profile PCI Management Adapter
My low profile PCI adapter came new in box with an original CD, which I archived here: 31L5196.zip. These files are still available from IBM at the time of writing however.
This adapter is the only low profile card I could find for Token Ring. It only features an RJ-45 connector instead of RJ-45 + D-Sub.
I use this card in my oldworld server, since only low profile cards can be used in the 2U chassis in that server.
IBM Turbo 16/4 Token-Ring ISA Adapter
This card was bought for my 486DX-2 computer. It uses an IBM 86H1756 controller. Note that the components connecting pin 3 to +5 V appears to not be populated here.
This card also supports Wake On Lan.
This card appears to have some kind of automatic IRQ configuration. When initially installed it didn't do anything except for a brief autodetection in Windows 95.
I found that the card can be configured using the "IBM Turbo 16/4 ISA LANAID & Diagnostics Diskette" which can be written to floppy and booted from. The file name for this floppy is "TRI164T1.EXE".
Windows 2000 has drivers for the card - NT 4.0 and Windows 95 do not so you'll need a driver floppy.
When booted off this floppy use the first boot option, and type "/fast=cfgonly".
This appears to automatically configure that for the correct IRQs and mode etc., and after doing the card worked every time. It also lists all the relevant parameters which might be useful to write down if you need to manually configure the card for a non PnP OS. I think this "advanced" configuration mode is inherited from EISA and/or microchannel, since the same card was sold in those configurations as well.
On a 486DX2 I achieved around 5 Mbit⁄s throughput using Windows 95 SMB file sharing. I suspect this is IRQ/CPU limited.
IBM 16/4 Token-Ring PCI Management Adapter
This card is the "standard" PCI card from IBM, and has the same feature set as the low profile variant. The controller is a 06K1643.
This card is used in my Pentium 2 computer running Windows 2000.
Madge Smart 16/4 PCI Tingnode
This card was made by Madge, which appears to have been eaten by HP since then. It uses a TI380C30A controller, which you can still get the datasheet for. Though information on the card itself appears to be lost to time. This is a spare card, not actually used for anything.
It appears to support the 5 V output on pin 3.
Apple Token Ring 4/16 NB Card
This card is a high end NuBus card suitable for Mac IIs. It's one of several Apple cards that include a 68000 coprocessor running A/ROSE to handle network traffic offloading. There was also an older 4 Mbit variant of this card which looked quite different.
The base design of the card is similar to the Ethernet NB Card, except it has an IBM manufactured subassembly containing a nice IBM chip. The card does have the pin 3 5 V output. Unlike the Ethernet NB card, this card had no traces of John Galt in the ROMs.
The IBM chip is a 63F7704ESD, which looks to be a slightly more modern variant of the chip Ken looked at in the linked post earlier in this article.
This card appears to be incompatible with the SuperMac Spectrum 24/III graphics accelerator card, at least if acceleration is enabled.
Media Filter
The media filter was simply purchased, making your own would require specialized transformers to do properly.
The function of the filter is to convert the 150 Ω nominal impedance at the D-Sub end to 100 Ω for the twisted pair wiring. This is done using a set of impedance matching transformers.
The transformers include dual primary/secondary windings to allow DC passthrough, which is important to allow the network to link up.
The media filter grounds out all unused pins in the RJ45 plug.
IBM 8226
The 8226 is an "active" MAU in that it requires power to operate, unlike the earlier 8228 which is entirely passive. The 8226 is less "fiddly" since it doesn't rely on latching relays like the 8228, and it comes with RJ45s unlike the Type 1 connectors on the 8228.
The 8226 contains a pile of relays and transformers required to insert/remove devices automatically from the ring.
My device had some appalling plastic quality - it was marked as ABS+PC but it was definitely more like polycarbonate than ABS. All the plastic screw posts were cracked and broke as soon as I removed the screws.
I ended up heat staking + epoxying in M4 brass inserts to fix this.
Note that the plastic tended to fly away at high velocity, and eye protection was actually needed.
The Setup
To build this Token Ring, we need a few things:
- Multistation Access Unit
- Network Cards
- Cabling
- Media Filters as required
- Server & Clients
The MAU could be DIYed, but I ended up buying an IBM 8226 since this was less expensive over all.
The cabling is fortunately fairly simple, since most Token Ring hardware you can get now can be used with standard Ethernet cables. For the Apple card I used a media filter to convert to RJ45.
Token Ring is a layer 1 & 2 standard, as such my network isn't fully retro. For example, I'm using new-fangled TCP/IP over it, instead of a more mature standard like NetBIOS or the slightly newer NetBEUI. Though I am running TokenTalk, which is quite retro.
The Old World Server
I decided to build a retro server for my setup. This is based on an Asus P5N-D motherboard and a severely underclocked Core 2 Quad Q9300 CPU with 4 GB of RAM.
The server runs Windows 2000 Server, which is the most convenient way of setting up an AppleTalk network with readily available hardware.
Virtualization works fine for running AppleTalk over Ethernet, but Windows 10 can't use Token Ring cards, and few modern PCs even have PCI slots these days.
The server runs file sharing on both Ethernet and Token Ring, and acts as an IP router, connecting the Token Ring and Ethernet segments together. I decided to simply route the two segments together instead of using NAT or bridging them. This server also provides DHCP, DNS, WINS, and NTP services to the token ring network.
Further, it has a VNC server that means the Mac II can administrate it reasonably well.
Such a server is quite useful for retro computing, since acts as a "bridge" between old and new worlds, the file sharing is available using SMBv1 and AFP, so both modern computers (with the SMBv1 client installed), old computers running Windows, and old Macs can connect to it.
This solves the classic bootstrap problem of getting files on and off retro computers. With an operational bridge server the primary concern for any fresh retro OS install is to get a working network. Once that is working, any additional files, drivers, and software can simply be transferred that way.
For storage I use a DMV340 IDE SSD for boot drive and backups, and an old Samsung 830 128 GB SATA SSD as the file share drive. I initially wanted to only use the IDE SSD, but it has an occasional issue where it locks up. Presumably this happens when it's doing flash maintenance functions. This causes issues for real time network file operations like playing back music with Pro Tools.
Switching to the SATA SSD resolved that issue nicely, and means there is some protection against disk failures built in.
Setting up the Mac
Setting up the Mac was a pain.
I already had a working TCP/IP + AppleShare setup using OpenTransport 1.31, and I had an A/ROSE ethernet card.
Unfortunately, the Token Ring card refused to link insert even when asked to by the software.
I eventually got it working by doing approximately this:
- Remove OpenTransport
- Use ResEdits Info view to set the Network control panel visible
- Remove all the existing Token Ring extensions
- Install Network Software Installer version 1.3 - this will install MacTCP etc.
- This disk is the version included with my 1993 vintage Ethernet NB Card - 800k floppy
- Upgrade to Network Software Installer 1.51 (latest version)
- Upgrade to OpenTransport 1.3
- I have not tested upgrading all the way to 1.31 yet
After this I was able to open the Token Ring control panel, and set the link speed to 16 Mbit/s. It says it will take effect on the next initialization, but it looks like you don't need to reboot. The Token Ring control panel seems to require the TokenTalk Prep extension.
Use TCP/IP, configure the Token Ring connection as required (static, DHPC etc.). Upon saving, or sometimes using the Info button, the card did a link insertion.
Also go into the AppleShare settings and select the Token Ring connection if you use AppleShare.
Since I have a AppleShare file share mounted on startup, this will initialize on startup, and this triggers the card to insert early in the boot.
My current issue is that if the network does down, it seems to halt the computer. The computer gets stuck somewhere in the AppleTalk driver, presumably waiting for a response from something. There might be a long timeout but it's more than 5 minutes in that case. Reinserting cables etc. doesn't let the card insert again, presumably since station insertion requires software cooperation unlike Ethernet.
Naturally, Token Ring offers Enterprise grade reliability, so this not an issue.
But if anyone does know of a fix for the "network goes down causes computer hang" issue I would appreciate it.
Performance
Speed tests of the network using the standard Finder copy over AppleShare gave a result around 250 kb⁄s, for a 25 MB file.
Using Connectix Speed Doubler 2 (which replaces the default file copy handler) it reads speeds of around 200-220 kb⁄s on the network side. For reference the internal SCSI hard drive (emulated) speed is around 700-900 kb⁄s.
These speeds are mostly in line with the Ethernet NB card.
Using a 2 station ring, the latency is a very steady 6 ms, occasionally peaking at 13 ms. I expect this will go up as more stations are added, but it should always be stable.
Anecdotally, the Mac seems to be slightly snappier using Token Ring, browsing the network share is a bit quicker, and iCab loads perhaps slightly faster. This is most noticeable in Pro Tools playing back audio from the network - the display is frozen when it loads data from the network, and the delay is definitely much lower than with Ethernet.
I will note that it's possible some of these speed improvement are caused by the Token Ring network being its own subnet with the Old World routing data as needed. This means the amount of broadcast traffic on the network will be far lower.
If this is true, Mac II users may want to add an IP router between their Macs and the wider network to reduce this effect, even if they're stuck using Ethernet.