isplay error-report packets so you can identify failing network components.
MAC-Layer Frames
Two basic types of frames circulate on a token-ring LAN. The first t
ype carries information from a PC to a file server, or sometimes from one PC to another. These frames comprise the vast majority of LAN traffic.
The other type of frame on a token- ring LAN exists solely to help the network manage itself. Token-ring cards send and receive such frames--called MAC-layer (media access control) frames--without prompting from the network OS (NOS).
An active (i.e., inserted on the ring) token-ring adapter sends and receives MAC-layer frames entirely from within itself, without regard for the type of computer, OS, or NOS. The adapters communicate with each other every few seconds, interspersing their MAC-layer frames with the ordinary (NOS) "work-to-do" frames. The MAC-layer frames allow the adapters to tell each other who's in charge, who's present, who's merely coughing, and who's terminally ill. MAC-layer frames even let the adapters keep track of which adapters are ring neighbors.
Two token-ring devices are neighbors if they have adjacent connections at the
multistation access unit (MAU). However, if some devices aren't presently ring members, their MAU ports don't count. You might, therefore, have two token-ring neighbors whose MAU ports aren't next to each other.
When a device transmits an error notification, the error is often the result of a garbled or missing transmission from the device's upstream neighbor, known as the nearest active upstream neighbor (NAUN). To fix blame for the error, you need to know the NAUN of the device signaling the error.
MAC-layer frames contain the fields that are shown in the table
"A Token-Ring Packet."
The destination address and source address fields are 6 bytes on most networks. The data field varies in size from packet to packet and has a maximum length of approximately 4 KB on 4-Mbps LANs and approximately 17 KB on 16-Mbps LANs.
A frame that isn't a MAC-layer frame carries data in the data field (usually a file service packet, or perhaps an account ID and password during a log-in
attempt). A MAC-layer frame, on the other hand, carries ring management information in the data field.
The 1-byte frame control field contains two subfields, Frame Type (the first 2 bits) and MAC Control ID (the remaining 6 bits). The 2 Frame Type bits have a value of 00 for MAC-layer frames and 01 for other frames (11 and 10 are reserved). The 6 MAC Control ID bits provide a general identification of the type of ring management frame.
Normal Frame Activity
About every 6 seconds, the network adapter that's designated the active monitor (which can be any adapter on the network but usually winds up being the adapter in the PC that's been powered on the longest) transmits an active monitor present frame, which is addressed to all other network adapters. The other network adapters chime in by transmitting standby monitor present frames, which indicate these adapters' ability to take over the role of active monitor if it becomes necessary.
If the adapters don't recei
ve an active monitor present frame within several seconds, they broadcast claim token frames. They then negotiate with one another to decide which adapter will become the new active monitor.
A healthy token-ring LAN that's in a steady state--no one joining or leaving the ring--exhibits simple MAC-layer activity. When a token-ring-connected device joins or leaves the ring, the joining or leaving causes a brief electrical disruption of the ring. This disruption occurs as a relay inside the MAU closes or opens. The downstream device senses the disruption and transmits a soft-error- report (error-notification) frame.
Typically, the downstream device categorizes the error as a burst error, line error, or token error. When a downstream device causes one of these errors by joining or leaving the ring, it's as if the ring suddenly sneezed. A healthy ring will experience burst, line, or token errors as the membership of the ring changes over time.
Abnormal Frames
A downst
ream device also uses the soft-error-report frame to notify other ring stations that a receiver-congestion error, an internal error, a lost-frame error, a frame-copied error, a frequency error, or an access control (A/C) error has occurred. Receiver-congestion errors may be a symptom of a failing network adapter or possibly a network adapter that simply can't keep up with the traffic flow. Receiver congestion happens when a token-ring adapter's input buffers are full and the adapter cannot accept an incoming frame.
An adapter that reports an internal error is trying to tell you that it may soon fail. An adapter notes a lost-frame error when the adapter fails to receive one of its own frames. A frame-copied error happens when an adapter recognizes a frame addressed to itself that another device has already recognized. Frequency errors usually signify serious cabling problems. Finally, an adapter reports an A/C error when the adapter receives a standby monitor present frame without first receiving an act
ive monitor present frame.
Beacon frames are a dreaded occurrence on a token-ring LAN. An adapter transmits beacon frames (it is said to be beaconing) to downstream devices when that adapter detects silence (no token or data frame) from its upstream neighbor. Hopefully, the adapter that's upstream of the beaconing adapter will receive the beacon alert. If the beaconing condition is the result of a momentary adapter fault, the adapter sensing the problem will eventually hear a signal from its upstream neighbor, and the ring will resume normal operation.
During the beaconing condition, the two adapters associated with the fault--the one beaconing and its upstream neighbor--remove themselves from the ring and attempt to reattach. If the condition is the result of a cable break, one or perhaps both of the adapters will fail to reattach, and the rest of the ring resumes normal operation. The result is usually a workstation or two dropping from the ring, and the other people on the LAN resume their no
rmal work.
When a beaconing condition resolves itself successfully, people at most workstations will experience what seems to be a momentary pause in network access. (Of course, if a file server is involved in the fault and drops from the ring, everyone on the LAN may be affected.)
Using the Program
The token-ring
monitoring program
intercepts MAC-layer frames, decodes them, and displays the result. The top of the screen identifies the active monitor, shows the number of standby monitors, counts the number of MAC-layer frames that have been received, and lists the token-ring nodes that have reported errors. The bottom half of the screen displays MAC-layer frames as events, one by one. The program writes a log file of events and error statistics, appending to the file each time a token-ring device reports an error. The program updates the top half (the node list) of the screen every 6 seconds but shows events in the bottom half of the screen as they occur.
The PC on which you run the diagnostic software must use the IBM LAN Support Program (DXMA0MOD.SYS and DXMC0MOD.SYS device drivers) or an equivalent. When the program begins to run, it looks for a file named USER.LST and, if the file is present, loads workstation node addresses and log-on names into memory.
You can create a USER.LST file for your LAN, if your NOS is NetWare, simply by running the USERLIST NetWare utility. Use the /a command-line parameter to cause USERLIST to show node addresses in the utility's output and redirect the output to a file with the ">" redirection character. If you use a NOS other than NetWare, a sample USER.LST file accompanies the software.
When the diagnostic program shows errors on the ring, you should note the node address or log-on name of the node reporting the error and of the NAUN. These pieces of information, along with the error message and the information in this article, should help you locate the problem.
The program clears the statist
ical error counts for a node that hasn't reported a problem in over 10 minutes. This means you'll see entries disappear from the screen as time passes and the network operates normally. However, the log file TOKENRNG.LOG will contain all the events and statistical error counts when you stop the program.
Ring Out
I hope you find the software useful and, if you're a programmer, interesting and informative. Frankly, however, I hope the program displays absolutely nothing but an odometer count of incoming frames on your computer screen. Token-ring errors can be exciting, but it's not the sort of excitement I'd wish on anyone. (The token-ring analyzer program is available on the BYTE Site at
http://www.byte.com
.)