# Lesson 1: Access Methods

In networking, to access a resource is to be able to use that resource. This lesson introduces the role of access methods in putting data on a network cable. It focuses on three major access methods: carrier-sense multiple-access methods, token passing, and demand priority.

After this lesson, you will be able to:

• Define the major access methods.
• Describe a primary feature of each of the major access methods:
• Carrier-sense multiple-access with collision detection (CSMA/CD)
• Carrier-sense multiple-access with collision avoidance (CSMA/CA)
• Token passing
• Demand priority

Estimated lesson time: 55 minutes

## The Function of Access Methods

The set of rules that defines how a computer puts data onto the network cable and takes data from the cable is called an access method. Once data is moving on the network, access methods help to regulate the flow of network traffic.

### Traffic Control on the Cable

To understand traffic on a computer network, it helps to use an analogy. A network is in some ways like a railroad track, along which several trains run. The track is interspersed with occasional railway stations. When a train is on the track, all other trains must abide by a procedure that governs how and when they enter the flow of traffic. Without such a procedure, entering trains would collide with the one already on the track.

There are important differences between a railroad system and a computer network, however. On a network, all traffic appears to move simultaneously, without interruption. Actually, this appearance of simultaneity is an illusion; in reality, the computers take turns accessing the network for brief periods of time. The more significant difference arises from the higher speed at which network traffic moves.

Multiple computers must share access to the cable that connects them. However, if two computers were to put data onto the cable at the same time, the data packets from one computer would collide with the packets from the other computer, and both sets of data packets would be destroyed. Figure 3.1 shows what happens when two computers try to access the network at the same time.

Figure 3.1 Collision occurs if two computers put data on the cable at the same time

If data is to be sent over the network from one user to another, or accessed from a server, there must be some way for the data to access the cable without running into other data. And the receiving computer must have reasonable assurance that the data has not been destroyed in a data collision during transmission.

Access methods need to be consistent in the way they handle data. If different computers were to use different access methods, the network would fail because some methods would dominate the cable.

Access methods prevent computers from gaining simultaneous access to the cable. By making sure that only one computer at a time can put data on the network cable, access methods ensure that the sending and receiving of network data is an orderly process.

Run the c03dem01, c03dem02, and c03dem03 videos located in the Demos folder on the CD accompanying this book to view a demonstration of how access methods help ensure orderly transmission of data on a network.

## Major Access Methods

The three methods designed to prevent simultaneous use of the network media include:

• Carrier-sense multiple access methods (with collision detection or with collision avoidance).
• Token-passing methods that allow only a single opportunity to send data.
• Demand-priority methods.

### Carrier-Sense Multiple Access with Collision Detection (CSMA/CD) Access Method

Using the method known as carrier-sense multiple access with collision detection (CSMA/CD), each computer on the network, including clients and servers, checks the cable for network traffic. Figure 3.2 illustrates when a computer can and cannot transmit data.

Figure 3.2 Computers can transmit data only if the cable is free

Only when a computer "senses" that the cable is free and that there is no traffic on the cable can it send data. Once the computer has transmitted data on the cable, no other computer can transmit data until the original data has reached its destination and the cable is free again. Remember, if two or more computers happen to send data at exactly the same time, there will be a data collision. When that happens, the two computers involved stop transmitting for a random period of time and then attempt to retransmit. Each computer determines its own waiting period; this reduces the chance that the computers will once again transmit simultaneously.

With these points in mind, the name of the access method—carrier-sense multiple access with collision detection (CSMA/CD)—makes sense. Computers listen to or "sense" the cable (carrier-sense). Commonly, many computers on the network attempt to transmit data (multiple access); each one first listens to detect any possible collisions. If a computer detects a possible collision, it waits for a random period of time before retransmitting (collision detection).

The collision-detection capability is the parameter that imposes a distance limitation on CSMA/CD. Due to attenuation—the weakening of a transmitted signal as it travels farther from its source, discussed in Chapter 2, "Network Media"—the collision detection mechanism is not effective beyond 2500 meters (1.5 miles). Segments cannot sense signals beyond that distance and, therefore, might not be aware that a computer at the far end of a large network is transmitting. If more than one computer transmits data on the network at the same time, a data collision will take place that will corrupt the data.

Run the c03dem04 and c03dem05 videos located in the Demos folder on the CD accompanying this book to view a demonstration of the CSMA/CD access method.

Contention Method

CSMA/CD is known as a contention method because computers on the network contend, or compete, for an opportunity to send data.

This might seem like a cumbersome way to put data on the cable, but current implementations of CSMA/CD are so fast that users are not even aware they are using a contention access method.

Run the c03dem06 video located in the Demos folder on the CD accompanying this book to view a demonstration of why CSMA/CD is considered a contention method.

CSMA/CD Considerations

The more computers there are on the network, the more network traffic there will be. With more traffic, collision avoidance and collisions tend to increase, which slows the network down, so CSMA/CD can be a slow-access method.

After each collision, both computers will have to try to retransmit their data. If the network is very busy, there is a chance that the attempts by both computers will result in collisions with packets from other computers on the network. If this happens, four computers (the two original computers and the two computers whose transmitted packets collided with the original computer's retransmitted packets) will have to attempt to retransmit. These proliferating retransmissions can slow the network to a near standstill.

The occurrence of this problem depends on the number of users attempting to use the network and which applications they are using. Database applications tend to put more traffic on the network than word-processing applications do.

Depending on the hardware components, the cabling, and the networking software, using a CSMA/CD network with many users running several database applications can be very frustrating because of heavy network traffic.

### Carrier-Sense Multiple Access with Collision Avoidance (CSMA/CA) Access Method

Carrier-sense multiple access with collision avoidance (CSMA/CA) is the least popular of the three major access methods. In CSMA/CA, each computer signals its intent to transmit before it actually transmits data. In this way, computers sense when a collision might occur; this allows them to avoid transmission collisions. Unfortunately, broadcasting the intent to transmit data increases the amount of traffic on the cable and slows down network performance.

Run the c03dem07 video located in the Demos folder on the CD accompanying this book to view a demonstration of the CSMA/CA access method.

### Token-Passing Access Method

In the access method known as token passing, a special type of packet, called a token, circulates around a cable ring from computer to computer. When any computer on the ring needs to send data across the network, it must wait for a free token. When a free token is detected, the computer will take control of it if the computer has data to send.

The computer can now transmit data. Data is transmitted in frames, and additional information, such as addressing, is attached to the frame in the form of headers and trailers, discussed later in this chapter.

In Figure 3.3, the server is shown transmitting data. It takes control of the free token on the ring and sends data to the computer with the address 400080865402.

Figure 3.3 Token-passing access method

While the token is in use by one computer, other computers cannot transmit data. Because only one computer at a time can use the token, no contention and no collision take place, and no time is spent waiting for computers to resend tokens due to network traffic on the cable.

Run the c03dem08, c03dem09, c03dem10, c03dem11, and c03dem12 videos located in the Demos folder on the CD accompanying this book to view demonstrations of the token-passing access method.

### Demand Priority Access Method

Demand priority is a relatively new access method designed for the 100-Mbps Ethernet standard known as 100VG-AnyLAN. It has been sanctioned and standardized by the Institute of Electrical and Electronic Engineers (IEEE) in its 802.12 specification, which is discussed later in this chapter.

This access method is based on the fact that repeaters and end nodes are the two components that make up all 100VG-AnyLAN networks. Figure 3.4 shows a demand-priority network. The repeaters manage network access by doing round-robin searches for requests to send from all nodes on the network. The repeater, or hub, is responsible for noting all addresses, links, and end nodes and verifying that they are all functioning. According to the 100VG-AnyLAN definition, an end node can be a computer, bridge, router, or switch.

Figure 3.4 Star-bus network access method for 100VG-AnyLAN is demand priority

Run the c03dem13 and c03dem14 videos located in the Demos folder on the CD accompanying this book to view a demonstration of the demand-priority access method.

Demand-Priority Contention

As in CSMA/CD, two computers using the demand-priority access method can cause contention by transmitting at exactly the same time. However, with demand priority, it is possible to implement a scheme in which certain types of data will be given priority if there is contention. If the hub or repeater receives two requests at the same time, the highest priority request is serviced first. If the two requests are of the same priority, both requests are serviced by alternating between the two.

In a demand-priority network, computers can receive and transmit at the same time because of the cabling scheme defined for this access method. In this method, four pairs of wires are used, which enables quartet signaling, transmitting 25 MHz signals on each of the pairs of wire in the cable.

Demand-Priority Considerations

In a demand-priority network, there is communication only between the sending computer, the hub, and the destination computer. This is more efficient than CSMA/CD, which broadcasts transmissions to the entire network. In demand priority, each hub knows only about the end nodes and repeaters directly connected to it, whereas in a CSMA/CD environment, each hub knows the address of every node in the network.

Demand priority offers several advantages over CSMA/CD including:

• The use of four pairs of wires.
• By using four pairs of wires, computers can transmit and receive at the same time.

• Transmissions through the hub.
• Transmissions are not broadcast to all the other computers on the network. The computers do not contend on their own for access to the cable, but operate under the centralized control of the hub.

### Access Methods Summary

Table 3.1 summarizes the major features of each access method.

Table 3.1 Features of Different Access Methods

 Feature or function CSMA/CD CSMA/CA Token passing Demand priority Type of Communication Broadcast-based Broadcast-based Token-based Hub-based Type of access method Contention Contention Noncontention Contention Type of network Ethernet LocalTalk Token RingArcNet 100VG-AnyLan

## Lesson Summary

The following points summarize the main elements of this lesson:

• Managing data on a network is a form of traffic control.
• The set of rules that governs how network traffic is controlled is called the access method.
• When using the CSMA/CD access method, a computer waits until the network is quiet and then transmits its data. If two computers transmit at the same time, the data will collide and have to be re-sent. If two data packets collide, both will be destroyed.
• When using the CSMA/CA access method, a computer transmits its intent to transmit before actually sending the data.
• When using the token-ring access method, each computer must wait to receive the token before it can transmit data. Only one computer at a time can use the token.
• When using the demand-priority access method, each computer communicates only with a hub. The hub then controls the flow of data.