5.5. Contention -Access MACContention-access MAC is stochastic, more suitable for bursty traffic, whereby the waste of shared-medium bandwidth cannot be tolerated. Unlike the round- robin and reservation schemes, no control is involved in the contention scheme. Rather, each user needing to transmit frames must contend to access the medium. This scheme is simple to implement and is an effective solution for light or moderate traffic. When a user logs on to a LAN, a channel for the transmission of a frame can be demanded at any random instance, potentially resulting in frame collision. This serious issue can be resolved in a number of ways, as follows :
Several random-access methods are provided for computer networks. Two commonly used ones are Aloha method (see Section 4.4.2) and Carrier Sense Multiple Access (CSMA). The CSMA scheme is explained in the next section. 5.5.1. Carrier Sense Multiple Access (CSMA)Carrier Sense Multiple Access (CSMA) is a protocol that lets only one user at a time transmit, on a first come, first served basis. A user needing to transmit data first listens to the medium and senses for a carrier on the medium to determine whether other users are transmitting: the carrier-sense phase. If the medium is busy, the user has to wait until the medium is idle. The amount of time a user must wait depends on the particular type of the protocol. If no other users transmit data, the user proceeds to transmit its data onto the medium. However, when the medium is busy, a user can follow one of the following three approaches:
If two or more users simultaneously try to transmit, a collision of frames occurs, and all data is corrupted. In such a case, all corresponding users stop transmitting. Thus, after a collision, all the users involved will start contention, each after a randomly chosen amount of time. After finishing the transmission of data, a user waits for an acknowledgment from the destination user. If the acknowledgment does not arrive , the user retransmits the data. The main disadvantage of CSMA when a collision occurs is that other users cannot use the medium until all corrupted frames finish transmission. This problem increases in the case of long frames. However, this issue can be resolved with the use of CSMA/CD, whereby a user listens to the channel while transmitting data. In case of a collision, the transmission is halted, and a jamming signal is transmitted to inform the other users that a collision has occurred. The user enters into back-off mode and transmits after the back-off duration if the medium is idle. In Figure 5.5, a frame that leaves user 4 destined for user 2, collides with another frame that leaves user 1 destined for user 3. Immediately after the collision, user 2 finds the medium idle and transmits its frame destined to user 1. Figure 5.5. The movement and collision of frames in a contention-access MAC network![]() Consider n users to be connected onto a common cable so that when one user transmits a frame while others are silent, all other users sense that frame. When a user starts the transmission, no others start before the user has propagated a signal throughout the cable. This way, the user can finish its frame without collision. The CSMA/CD method can be set up to detect collisions ahead of time. It is quite possible for a user to listen to the cable while transmitting; obviously, if two or more users start to transmit simultaneously, they find a collision in process and cease transmission. That is why this process is called CSMA collision detection (CSMA/CD). CSMA/CD requires the frame length to be long enough to permit collision detection before the completion of transmission. The maximum time to detect a collision is not greater than twice the end-to-end propagation delay. The process of CSMA/CD is viewed in terms of slots and minislots. Setting minislots is required for a signal to propagate from one end of the cable to the other. Minislots are used in a contention mode. If all users are synchronized in minislots and one user transmits during an empty slot, all the other users pick up the transmitted frame until the frame is transmitted completely. However, if more than one user transmits during that slot, each transmitting user senses the situation and ceases transmitting. Analysis of Frame Delay Consider once again the bus LAN shown in Figure 5.5. Let Equation 5.1 Now, let f be the average frame size in bits and r be the data rate on the channel over the medium. The frame transmission time, t r , can be calculated by Equation 5.2 Here, the utilization of the LAN bus can be obtained by Equation 5.3 Analysis of ContentionIf a total of n users are attached to the medium and n a of them are active, the probability of a user restraining itself to resend its frame during a time slot is Equation 5.4 In general, an empty time slot remains empty, is taken by a user, or undergoes a collision. Apparently, the probability that a user attempts to transmit frames in an empty time slot is Equation 5.5 By combining the two Equations (5.4) and (5.5), we obtain Equation 5.6 This probability value merges to Equation 5.7 Interestingly, the average number of contentions can be computed by knowing this behavioral model using the expected value explained in Appendix C: Equation 5.8 Analysis of ThroughputConsider Figure 5.6, and assume that the frame arrivals on the network have a Poisson distribution (see Appendix C for the details of the Poisson model) with an average arrival rate » and a frame duration of T seconds. Based on this model, the probability that there are k frames in a given period [0, t ] is obtained from Figure 5.6. A timing illustration of CSMA/CD Equation 5.9 We start with frame 2 and let t p be the total propagation delay between any pair of users. Thus, the probability that a frame is transmitted successfully, P t , is the probability that no additional frame is transmitted during t p and is expressed by Equation (5.9) when k = 0 as Equation 5.10 The delay time caused by the last colliding frame is modeled by a random variable, Y . The probability that this last frame is transmitted at or before time y is the probability that no other frames are transmitted in the interval ( y , t p ] and is obtained from Equation 5.11 The preceding probability is clearly calculated only for 0 <y <t p and is known as the cumulative distribution function (CDF) of the random variable y . If this distribution is known, the probability density function (PDF), or f Y (y) , can be determined (see Appendix C); thus, the average of time y can be estimated by the expected value of y : Equation 5.12 As seen in Figure 5.6, the average busy time of a channel, t B , has three components : frame duration ( T ), propagation delay ( t p ), and the relative delay of the last colliding frame ( E [ Y ]): Equation 5.13 From the property of the Poisson random variable, we calculate the average idle time as Equation 5.14 The overall throughput of a CSMA/CD channel is defined as the number of frames per time slot and is obtained from Equation 5.15 Throughput R can be normalized to throughput per frame time, or R n . Practically, R n is easier to use for the estimation of the system throughput. 5.5.2. Ethernet LAN: IEEE 802.3 StandardThe IEEE 802.3 standards committee developed a widely used LAN standard called Ethernet , which covers both the MAC layer and the physical layer. The IEEE 802.3 standard uses CSMA for controlling media access and the 1-persistent algorithm explained earlier, although the lost time owing to collisions is very small. Also, IEEE 802.3 uses a back-off scheme known as binary exponential backoff . The use of random backoff minimizes subsequent collisions. This back-off scheme requires a random delay to be doubled after each retransmission. The user drops the frame after 16 retries. The combination of the 1-persistent scheme and binary exponential backoff results in an efficient scheme. A brief description of the frame fields follows and is shown in Figure 5.7.
Figure 5.7. Details of Ethernet IEEE 802.3 LAN frame![]() The Ethernet versions have different data rates. Version 1000BaseSX, carrying 1 Gb/s, and 10GBase-T, carrying 10 Gb/s, hold the most promise for the future of high-speed LAN development. |