Token Ring is a protocol that contains the same basic elements as Ethernet: physical layer options, a frame format, and a MAC mechanism. However, it approaches the tasks of transmitting and receiving data on a shared network medium in a completely different manner. IBM originally designed Token Ring, but it was standardized in the IEEE 802.5 document, and there are many manufacturers now producing Token Ring hardware. Token Ring networks were originally designed to run at 4 Mbps, but later implementations increased the speed to 16 Mbps. Most of the Token Ring NICs sold today support both speeds. 16 Mbps is faster than standard Ethernet, but nowhere near the 100-Mbps speed of Fast Ethernet. However, it's important to note that Token Ring networks experience no collisions (under normal circumstances) like Ethernet, which improves the network's overall efficiency.
Token Ring is far less commonly used than Ethernet, and one of the major reasons is the price of Token Ring hardware, which is substantially higher than that of Ethernet equipment. You can build a simple Ethernet network by purchasing NICs for as little as $20 and a hub for less than $75. Token Ring multistation access units (MAUs) are considerably more complex than Ethernet hubs, however, and start at around $250, and Token Ring NICs generally cost $120 and more.
As described in Lesson 1: Network Cables, in Chapter 2, "Network Hardware," Token Ring networks use a ring topology, which is implemented logically inside the MAU, the Token Ring equivalent of a hub. The network cables take the form of a star topology, but the MAU forwards incoming data to the next port only, not to all of the ports at the same time, as in an Ethernet hub. This topology enables data packets to travel around the network from one workstation to the next until they arrive back at the system that originally generated them.
Token Ring networks still use a shared medium, however, meaning that every packet is circulated to every computer on the network. When a system receives a packet from the MAU, it reads the destination address from the Token Ring header to determine if it should pass the packet up through that computer's networking stack. However, no matter what the address, the system returns the packet to the MAU so that it can be forwarded to the next computer on the ring.
The physical layer specifications for Token Ring networks are not as numerous as are those for Ethernet, and they are not as precisely standardized. The IEEE 802.5 document contains no physical layer specifications at all. Cabling guidelines are derived from practices established by IBM and they can differ when you are working with products made by other manufacturers.
Originally, the medium for Token Ring networks was a cable known as IBM Type 1, also called the IBM Cabling System. Type 1 is a heavy, shielded twisted pair (STP) cable that is sold in various lengths, generally with connectors attached. The connector at the MAU end of the cable is a large, proprietary jack called an IBM data connector (IDC) or a universal data connector (UDC), as shown in Figure 5.7. The NICs in the computers use standard DB-9 connectors. Cables with one IDC and one DB-9 connector, which are used to connect a computer to a MAU, are called lobe cables. Cables with IDC connectors at both ends, used for connecting MAUs together, are called patch cables.
Figure 5.7 A Type 1 cable with an IDC attached
Type 1 cable is thick, relatively inflexible, and difficult to install in walls and ceilings because of its large, preattached connectors. Type 1 MAUs also require a special IDC "key," which is a separate device that you plug into each MAU port and remove to initialize the port before connecting a lobe cable to it. Today, most Token Ring networks use Category 5 UTP cable with standard RJ-45 connectors at both ends, known in the Token Ring world as Type 3 cabling. Type 3 networks use the same connectors for both computers and MAUs, so only one type of cable is needed. In addition, it's possible to install the network inside walls and ceilings using bulk cable and attach the connectors afterward. Type 3 MAUs also don't require a separate key, as the ports are self-initializing.
The only advantages Type 1 networks have over Type 3 networks are that they can span longer distances and connect more workstations. A Type 1 lobe cable can be up to 300 meters long, whereas Type 3 cables are limited to 150 meters. Type 1 networks can have up to 260 connected workstations, whereas Type 3 networks can have only 72.
The MAC mechanism of a Token Ring LAN, called token passing, is the single most defining element of the network, just as CSMA/CD is for Ethernet. Token passing is an inherently more efficient MAC mechanism than CSMA/CD because it provides each system on the network with an equal opportunity to transmit its data without generating any collisions and without diminished performance at high traffic levels. Other data-link layer protocols, like FDDI, also use token passing as their MAC mechanism.
Token passing works by circulating a special packet called a token around the network. The token is only 3 bytes long and contains no useful data. Its only purpose is to designate which system on the network is allowed to transmit its data. In their idle state, computers on a Token Ring network are in what is known as repeat mode. While in this state, the computer systems receive packets from the network and immediately forward them back to the MAU for transmission to the next port. If a system doesn't return the packet, the ring is effectively broken and network communication ceases. After a designated system (called the active monitor) generates it, the token circulates around the ring from system to system. When a computer has data to transmit, it must wait for a free token to arrive before it can send its data. No system can transmit without being in possession of the token, and because there is only one token, only one system on the network can transmit at any one time. This means that there can be no collisions on a Token Ring network unless something is seriously wrong.
Run the TokenPassing video located in the Demos folder on the CD-ROM accompanying this book for a demonstration of how token passing works.
When a computer takes possession of the token, it changes the value of one bit (called the monitor setting bit) and forwards the packet back to the MAU for transmission to the next computer on the ring. At this point, the computer enters transmit mode. The new value of the monitor setting bit informs the other computers that the network is in use and that they can't take possession of the token themselves. Immediately after the computer transmits the "network busy" token, it transmits its data packet.
As with the token frame transmitted immediately before it, the MAU forwards the data packet to each computer on the ring in turn. Eventually, the packet arrives back at the computer that generated it. At the same time that the sending computer goes into transmit mode, its receive wire pair goes into stripping mode. When the data packet traverses the entire ring and returns to its source, it is the responsibility of the sending computer that generated the packet to strip it from the network. This prevents the packet from circulating endlessly around the ring.
Run the TokenRingNetwork video located in the Demos folder on the CD-ROM accompanying this book for a step-by-step illustration of the path that packets take on a Token Ring network.
The original Token Ring network design calls for the system transmitting its data packet to wait for the last bit of data to arrive back at its source before it generates a new token by modifying the monitor setting bit in the token frame back to its original value and transmitting it. Today, most 16-Mbps Token Ring networks have a feature called early token release, which enables workstations to transmit a free token immediately after their data packets. This way, another system on the network can receive a data packet, take possession of the token, and begin transmitting its own data frame before all of the data from the first packet has returned to its source. There are parts of two data frames on the network at the same time, but there is never more than one free token.
Unlike Ethernet, which uses one frame format for all communications, Token Ring uses four different frames: the data frame, the token frame, the command frame, and the abort delimiter frame. The largest and most complex of the Token Ring frames is the data frame, shown in Figure 5.8. This is the frame that is most comparable to the Ethernet frame, because it encapsulates the data received from the network layer protocol using a header and a footer. The other three frames are strictly for control functions, such as ring maintenance and error notification.
Figure 5.8 The Token Ring data frame
The functions of the fields in the data frame are as follows:
The token frame is 3 bytes long (as shown in Figure 5.9), and contains only the Start Delimiter, Access Control, and End Delimiter fields. The Start Delimiter and End Delimiter fields use the same format as in the data frame, and the token bit in the Access Control field is set to a value of 1.
Figure 5.9 The Token Ring token frame
The command frame (also called a MAC frame because it operates at the MAC sublayer, whereas the data frame operates at the LLC sublayer) uses the same basic format as the data frame, differing only in the value of the Frame Control field and the contents of the Information field. The Information field, instead of containing network layer protocol data, contains a 2-byte major vector ID, which specifies the control function the packet is performing, followed by the actual control data itself, which can vary in length. The following major vector IDs indicate some of the most common control functions performed by these packets:
The abort delimiter frame consists of only 2 bytes, the same Start Delimiter and End Delimiter fields, and uses the same values for those fields as the data and command frames. When a problem occurs, such as an incomplete packet transmission, the active monitor system generates an abort delimiter frame to flush all existing data from the ring.
Match the standard in the left column with the most suitable technology in the right column.
| || |
For each of the following scenarios, specify which data-link layer protocol you think is preferable, Ethernet or Token Ring, and give reasons why. In some cases, either protocol would be suitable; the reasons you provide are more significant than the protocol you select.