� ECEN 5032 Data Networks Medium Access Control Sublayer Peter Mathys mathys@colorado.edu University of Colorado, Boulder Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.1/35
� Overview (Sub)networks can be divided into two categories: 1. Those using point-to-point connections (e.g., leased line). 2. Those using broadcast connections (e.g., wireless LANs). In a broadcast network one of the key issues is how to determine who gets to use the channel when there is competition for it. Broadcast channels are often referred to as multiaccess channels or random access channels . Real life example: Meeting between several people: After one speaker finishes, who gets to talk next? More tricky: Conference call (cannot use external means to avoid chaos, e.g., by raising hands). Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.2/35
� Medium Access Control The protocols used to determine who goes next on a multiaccess channel belong to the MAC (medium access control) sublayer. The MAC sublayer is a sublayer of the data link layer (DLL). The MAC sublayer is expecially important for LANs. WANs, in contrast, use point-to-point links, except for satellite networks. Examples of MAC protocols are the CSMA/CD protocol used by Ethernet, and the CSMA/CA protocol used by 802.11 wireless LANs. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.3/35
� � � � � Static Channel Allocation Traditional ways of allocating channels are TDM (time division multiplexing) and FDM (frequency division multiplexing). If there are users, time gets divided up into time slots for TDM, or bandwidth gets divided up into frequency slots for FDM. If is large and not all users transmit at all times, a lot of transmission capacity is wasted with static TDM or FDM allocations. In addition, in most computer systems data traffic is very bursty, e.g., peak to mean traffic ratio of 1000:1 Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.4/35
✞ ✟ � ✆ ✟ � � � ✟ � � � ✄ ☎ ✁ ☛ ✆ ✟ � ☞ ✝ ☞ ✄ � ☎ ✂ � � ✄ ✁ � ✂ ✄ ✁ � ✆ ✝ � ✞ ✝ ✂ ✆ ✆ ✁ ☛ Static Channel Allocation Simple example: M/M/1 queue (memoryless Poisson arrivals with rate and memoryless Poisson departures with rate ): where is the average delay of a frame and is the channel capacity. Now divide this up into static subchannels, each with capacity and arrival rate to obtain ✂✡✠ resulting in an increase of the delay by a factor of . Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.5/35
✄ ✂ � � ✂ ✁ ✁ ✄ Dynamic Channel Allocation Key assumptions: 1. Station model . There are independent stations or terminals. Arrival rate is (probability of frame generated in interval of length is ). Terminals can have at most one frame to transmit at any given time. 2. Single Channel Assumption . A single channel is available for all communication. All stations can transmit on it and receive from it. All stations are eqivalent in hardware, but protocol software may assign priorities. 3. Collision Assumption . If two or more terminals transmit at the same time, a collision results and the frame must be retransmitted at a later time. All stations can detect collisions and there are no other errors than collisions. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.6/35
� Dynamic Channel Allocation Key assumptions (contd.): 4. Continuous/Slotted Time . If channel time is continuous, frame transmission can sart at any time. If channel time is slotted, then frame transmissions must always begin at the start of a slot. A slot may be idle (0), contain exactly one frame (1), or a collision (C). 5. Carrier Sense (Y/N) . If carrier sensing is used, stations can tell if the channel is in use before trying to use it. In this case stations wait until the channel is idle before starting a new transmission. Wired LANs generally have carrier sense, while in wireless networks not all stations may be within radio range of other stations so that carrier sensing cannot be relied upon. Key assumption is single (collision) channel. No other means of communication. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.7/35
� ALOHA The ALOHA network was developed around 1970 to provide radio communication between the central computer and various data terminals at the campuses of the University of Hawaii. The basic idea of ALOHA is to let users transmit frames whenever they have data to send. If frames collide, they are retransmitted after a random amount of time. It is assumed that each station can determine whether a collision happened or not. If there is no collision, transmission is assumed to be successful. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.8/35
� Pure ALOHA Example In pure ALOHA, frames are transmitted at completely random times. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.9/35
� Pure ALOHA Pure ALOHA: Vulnerable period for shaded frame. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.10/35
✟ ✞ � ✄ ☎ ✆ ✌ ☎ ☞ � ✟ ☞ � ✝ ☎ ✁ ☛ Pure ALOHA Throughput Successfull frames leave system at rate and �✂✁ arrivals occur at rate , leading to a hypothetic equilibrium point as shown. Necessary condition: . ✠☛✡ Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.11/35
� ✄ ✞ ✆ ✄ � ✄ � ☎ ✄ ✟ ✁ ✟ ✁✂ ☞ � ☎ Slotted ALOHA In 1972 a method for doubling the throughput of a (pure) ALOHA system was published. The key idea is to divide time into discrete intervals, each corresponding to the length of a frame. Under this method, known as slotted ALOHA , a computer is required to wait for the beginning of a slot before it can transmit data. This reduces the vulnerable period to the length of one frame and consequently the throughput becomes �✂✁ which peaks at and yields . ✠☛✡ Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.12/35
☎ ✟ � ✄ ✆ ☞ ✁✂ � ✟ ✁ � ✝ Slotted ALOHA Throughput Successfull frames leave system at rate and �✂✁ arrivals occur at rate , leading to a hypothetic equilibrium point as shown. Necessary condition: . ✠☛✡ Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.13/35
� CSMA In (wired) local area networks it is possible for each station to detect what other stations are doing and adapt their behavior accordingly. Protocols in which stations listen for a carrier on the channel are called carrier sense protocols . CSMA stands for carrier sense multiple access. There are two types of CSMA protocols: persistent and nonpersistent CSMA. CSMA/CD stands for carrier sense multiple access with collision detection. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.14/35
� Persistent CSMA 1-persistent CSMA works as follows: When a station has data to send, it first listens to the channel to see if anyone else is already transmitting. When the channel is idle, the station transmits its frame. When the channel is busy, the station waits until it becomes idle, and then transmits with probability 1 (hence the name 1-persistent). If a collision occurs during transmission, the station waits a random amount of time and then starts all over again. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.15/35
� Effect of Propagation Delay When two or more stations start transmitting at about the same time instant, they may not be able to sense each other’s transmissions because of the propagation delays between different stations. Thus, when 1-persistent CSMA is used, there is a good chance that after one transmission ends, two or more new stations start transmitting and collide. Such collisions can be avoided if not all stations that become ready to transmit start sending immediately after the previous transmission ends. The resulting protocols are nonpersistent or p-persistent versions of CSMA. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.16/35
� Nonpersistent CSMA Nonpersistent CSMA works as follows: Before sending, a station senses the channel. If the channel is idle, the station starts transmitting. If the channel is busy, the station waits a random amount of time (without sensing the channel) before it repeats the algorithm. This leads to longer delays, but better channel utilization than 1-persistent CSMA. Data Networks, Medium Access Control Sublayer, c 1996–2005, P . Mathys – p.17/35
Recommend
More recommend