Chapter 4
Medium Access Control Sublayer

powered by FreeFind

Modified: 


The main theme of the chapter is how to allocate a single broadcast channel (versus point to point) among competing users. Various approaches using static and dynamic channel allocation will be examined. Special attention will be given Ethernet.

4.1.1 Static Channel Allocation in LANs and MANs - Important to remember bursty nature of data communications. WANs not considered because normally connected via a point to point channel.

C = Channel capacity bps (constant). Larger capacity reduces T.
l  = input rate, frames/sec. Smaller input rate reduces T.
m  = average bits per frame. Larger frames reduces T.
T  = 1/ (mC-l) mean time delay

4.1.2 Dynamic Channel Allocation in LANs and MANs - Obviously static allocation of a multi-access channel is not generally desirable when overall channel usage is low. Note that channel use is bursty with long periods of inactivity punctuated by short bursts of activity.

Dynamic Channel Allocation Assumptions
  1. Station model - n independent stations each generating frames for transmission. One frame is generated and successfully transmitted at a time.
  2. Single channel - A single channel is shared with other stations.
  3. Collision - Overlapping transmissions destroy the frames, can be detected, and require retransmission. Collisions are the only errors.
  4. Time
    • Continuous time - No master clock dividing time, transmissions can begin at any time.
    • Slotted time - Master clock, time is divided into discrete intervals (slots), transmissions can only begin at the start of a slot. Slots may contain 0 frames (idle), 1 (a successful transmission), or 2 (a collision).
  5. Carrier
    • Carrier sense - Stations can detect whether the channel is in use prior to transmitting. If in use waits for channel to become available.
    • No carrier sense - Stations cannot detect whether the channel is in use prior to transmitting. Transmits and later determines whether successful.


4.2 Multiaccess Protocols -
Dynamic channel allocation

4.2.1 ALOHA - Radio broadcast on common frequency to transmit. The figure at right illustrates 4 independent stations each attempting to transmit at the same time. Because of the use of a common frequency, when more than one station broadcasts, the signal is effectively destroyed and must be retransmitted.

Pure ALOHA - The first three assumptions are valid along with the following two:

  1. Time
    • Continuous time - Each station can broadcast at any time.
  2. Carrier
    • No carrier sense - Before transmitting, a station does not check for another transmitting.

Important points

Then maximum throughput S = Ge-2G = 0.5e-2*0.5 = 0.5e-1 = 1/2e = 1/2*2.71 = 0.184 new frames per frame time. Channel utilization is about 18%.

Pure ALOHA Contention Period is 2 Frame Times

Slotted ALOHA - The assumption of continuous time has been changed from Pure Aloha:

  1. Time
    • Slotted time - A station can broadcast only at the beginning of a slot.
  2. Carrier
    • No carrier sense - A station does not detect another transmitting.


Important points different from Pure ALOHA

Then S = Ge-G = 1e-1 = 1/e = 1/2.71 = 0.368 new frames per frame time. Channel utilization is about 36% or double that of Pure Aloha due to halving the cost of a collision.

Slotted ALOHA Contention Period is 1 Frame Time

Throughput S versus Attempts G of Aloha

4.2.2 Carrier Sense Multiple Access Protocols - Persistent and Non-persistent. The first three assumptions are valid along with the following 4 and 5:

  1. Station model - n independent stations each generating frames for transmission. One frame is generated and successfully transmitted at a time.
  2. Single channel - A single channel is shared with other stations.
  3. Collision - Overlapping transmissions destroy the frames, can be detected, and require retransmission. Collisions are the only errors.
  1. Time
    • Slotted time - A station can broadcast only at the beginning of a slot. The slot here being a contention slot defined as a time when no station is transmitting. There is no central slot definition.
  2. Carrier
    • Carrier sense - Stations can detect whether the channel is in use prior to transmitting. If in use a station waits for channel to become available.

Collision of Station 1 frame with Station 2 frame after t time 

Throughput S versus Attempts G comparison

  1. Which protocol has the best channel utilization?
  2. What about delay?
CSMA Protocol Comparison
Characteristic 1-persistent - constantly check for carrier, send whenever channel idle nonpersistent - randomly check for carrier, send when channel idle p-persistent for slotted - check for carrier, if idle send with probability of p (or defer to next slot with q=1-p)
carrier sense send when channel idle send when channel idle send with p-probability when channel idle
busy wait for carrier, checking continuously wait random time to check carrier treated like a collision
collision wait random time to check carrier again wait random time to check carrier wait random time to check carrier
utilization above ALOHA since only send when channel idle above 1-persistent since not all stations constantly checking for idle channel at same time, higher probability of a collision depends upon p; above non-persistent since always checks for channel idle but only send with probability of p, fewer collisions
delay 
low load
small since always trying to send when channel becomes idle small since station will send whenever channel found idle but longer than 1-persistent since only checks randomly when busy large when small p since station will not always send when channel idle
delay 
high load
high due to collisions longer than 1-persistent since only checks randomly when busy large when small p since low probability of sending when channel idle and channel rarely idle

CSMA/CD (Carrier Sense Multiple Access with Collision Detection) - CSMA improved over ALOHA by only transmitting when the channel was idle, but still transmitted the full frame because did not detect a collision occurred to stop. A station can transmit a frame that was much longer than the contention slot 2t time, for example, Ethernet has a contention slot size of 64 bytes but a maximum frame size of 1526 bytes.

Collision detection serves to stop transmitting as soon as a collision occurs, reducing wasted time due to the collision to a maximum of 2t.

  1. Problem - What is the minimum frame size (slot size) in bits for:
  2. Problem - Suppose bit rate was increased from 4 Mb/sec to 10 Mb/sec?
  3. Problem - What is S for 802.3 standard (Ethernet)
  4. Problem - Long channel length (L) is desirable as is higher bit rates (b) however large slot sizes increase the cost due to collisions.
  5.   
    What happens to S, the slot size, as L or b increases?       S = 2t/(1/b) = 2*L*p/(1/b)

4.2.3 Collision-Free Protocols - Each of N stations assumed to have an address 0 to N-1. Examine which station gets channel after successful transmission.
 

Basic bit map - Contention slot used to make reservation for transmitting by placing a 1 if station wants to transmit. Stations 1, 3, and 7 make reservation during contention slot, transmit in numerical order during appropriate data slot. All stations can see reservations broadcast by other stations.
  • Utilization high under heavy load since can approach 100% minus the contention slots.
  • Constant delay under light load because a single transmitter must wait through the contention slot time.
Binary countdown - Reduces delay caused by contention slot period. Station wanting to send broadcasts address as bit string starting with high order bit. Addresses from all stations are ORed as arrive (i.e. a system with 256 stations would require an 8-bit address with bits broadcast 7-0; all bit 7's of four station addresses broadcast at same time, ORing 0+0+0+1 = 1). Any station seeing a 1 in a position where their address is 0 drops out and must wait for next contention slot. After all address bits are broadcast the last remaining station transmits.
  • Utilization can be 100% under heavy load.
  • Delay is function of address, station 1111 would enjoy short delay compared to station 0000.


Collision-Free Protocols Comparison
  Bit-Map Protocol Binary Countdown
Format Contention slots - Each station has reservation slot into which it marks (0 or 1) that it wants to transmit. Slots come around 0, 1, 2, 3, ...
Data slots - All stations with a reservation transmit in order of reservation.
Station wanting to send broadcasts address as bit string starting with high order bit. Addresses from all stations are ORed as arrive (i.e. all bit 7s sent at same time, 0+0+0+1 = 1). Any station seeing a 1 in a position where their address is 0 must wait till next time. After all address bits are broadcast the last remaining station transmits.
Delay - Low Load A station wants to send, on average, when contention slot is at N/2 position. Low number stations are too late and must wait another N length again to send. High number send after N/2 delay. Average delay is 1.5N for low numbers, 0.5N for high numbers. log2 N/2 for number of bits of an N station address number. With one station sending, delay is 1 bit time, worst case is log2 N. For 256 station, 8-bit address delay 8 bit times. 
Utilization - Low Load d/(d+N) since N reservation bits for each d data whether sending or not d/(d+log2 N) overhead is the log2 N reservation bits. By sending reservation as senders address first in the message becomes d/d or 100%.
Utilization - High Load d/(d+1) when each station sending data only 1 reservation bit overhead Same as low load.

 

4.2.6 Wireless LAN Protocols

Key problems using CSMA:

MACA

Multiple Access with Collision Avoidance - Sender stimulates receiver to output short frame that is detected by adjacent stations, preventing them from transmitting.

  1. A sends RTS (Request To Send) to B, a 30 byte frame with the length of data frame to follow.
  2. B responds with a CTS (Clear To Send) with the copied length of data frame as an acknowledgement.
  3. A receives CTS and starts sending data frame. C can transmit also after waiting for but not receiving CTS since out of range of B.
  4. Collisions can occur if A receives RTS from C and B simultaneously (RTS collision). A does not send CTS causing both B and C use binary exponential backup algorithm to delay a random time before resending RTS.

 

 

4.3 IEEE 802 Standards

4.3.1 Ethernet 802.3

Collision detection at sender A can take as long as 2t

 

Ethernet 802.3
  • CSMA/CD 1-persistent.
  • 2.5 km maximum network length.
  • Contention size is 512 bits = 64 bytes minimum frame size.
  • Repeaters - Extend cabling by connecting segments, amplify and retransmit (physical layer). Maximum length still 2.5 km and 4 repeaters maximum (each introduces a small delay).
  • Bridges - Can connect two or more networks (e.g. Ethernet to Ethernet). Arbitrary number of bridges possible in theory.
  • Hub - Used to connect stations to a common contention channel when using 10Base-T wiring.
  • Switch - Used to connect stations to an separate contention channel when using 10Base-T wiring.

Most common kinds of Ethernet cabling

Three kinds of Ethernet cabling: (a) 10Base5 or Thick (b) 10Base2 or Thin (c) 10Base-T

 

Cable topologies

Delay based on average number of slots per contention interval. For j=0 to infinity SjA(1-A)j-1 = 1/A the average number of stations attempting to transmit during one contention interval. The smaller the probability A of no collision, the greater the delay.
Channel efficiency = P/(P+2t/A).  P is mean time to transmit a frame. As t (slot size) increases the efficiency goes down. Recall what affects t, the channel length and the bit rate, both of which are desirable to increase.

Channel efficiency = 1/(1+ 2BLe/cF). As frame length increases efficiency increases but delay would also increase (e.g. if the delay for a given frame size were 1, doubling the frame size would increase delay to 2). From the equation, as bandwidth B or channel length L increase, efficiency decreases due to larger contention slots and corresponding cost of a collision. Increasing F  or c increases channel efficiency.

  • F - frame length
  • B - bandwidth
  • L - channel length
  • c - propagation rate
  • e - optimal case of e contention slots per frame
Efficiency of 802.3 with 64 byte contention slots and different size frames. 
Larger frames are more efficient; smaller frames have a higher percentage
of overhead and require more transmissions, increasing the probability of a
collision and the overall cost of transmitting the frame. 

4.3.7 Fast Ethernet 802.3u

100Base-TX

Category 5 UTP - Can handle clock rater of 125 MHz., maximum distance for 100Mbps is 100m.

4.3.8 Gigabit Ethernet 802.3z

Token Ring 802.5

The conceptual flow of bits during a transmission on a token ring network. Except for the sender, computers on the network pass bits of the frame to the next station. The destination makes a copy. 

4.3.9 802.2 Logical Link Control - The top half of the data link layer that interfaces to the network layer. Hides the details of whether 802.3 or 802.5 at the medium access layer from the network layer to provide a consistent interface to Ethernet, Token-Ring, etc.

4.4 WIRELESS LANS

4.4.1 802.11 Protocol Stack

802.11 Protocol Stack

4.4.2 Physical Layer

802.11b

4.4.3 802.11 MAC Sublayer Protocol

 

4.7 Data Link Layer Switching - Bridges

Bridges connect two or more LANs by forwarding frames received. Operate at data link layer so is best effort, if frame cannot be delivered, too bad.

Transparent Bridges

Spanning Tree Bridges

The following illustrates a network with multiple transparent bridges and a spanning tree following the minimum path to all LANs for the network at right. The numbers on the connecting LANs represent some metric such as channel cost or bandwidth that could be used to determine the minimal spanning tree. The spanning tree must still connect all network segments but without cycles a necessary condition to prevent flooded frames from generating redundant frames.

When multiple bridges connect the same LAN, such as LAN O connected by B24 and B11 and LAN G connected by B12 and B11, one of the bridges will not transmit to that LAN, in this case B11 is effectively disconnected from both LAN G and O.

Bridges with cycles between hosts H1 and H2

Spanning tree with B21 as root

Backward learning - Each bridge builds a table as frames arrive containing the source host and arrival LAN. For example, host H2 on LAN Y sending a frame to host H1 on LAN X would cause the frame to be flooded across the spanning tree and an entry to be added in each of the bridge routing tables along the spanning tree:

Bridge B12 B14 B21 B22 B23 B24 B31 B32 B33
H2 Entry F I Y E K N A D B

When H1 responds by transmitting a frame onto LAN X the bridge B24 forwards the frame toward H2 on LAN N. Each bridge along the path from H1 to H2 would record the source host H1 on arrival LAN in its table. The table below reflects routing tables after the transmissions by hosts H1 and H2.

Bridge B12 B14 B21 B22 B23 B24 B31 B32 B33
H2 Entry F I Y E K N A D B
H1 Entry   N B I   X   E D
What changes occur in the table after H1 transmits to a host on LAN G?

a) Interconnected LANs b) A spanning tree covering the LANs.


Transparent Bridges - Advantages/Disadvantages

Source Routing Bridges

One possible discovery frame for host H2 to transmit to H1

Source Routing Bridges - Advantages/Disadvantages

Remote Bridges

Connect two or more distant LANs using bridges at connection of LAN to a point-to-point line. Common for bridge to place complete MAC frame in payload field of PPP and transmit on point-to-point line. Receiving bridge copies payload field onto destination LAN. Only problem is getting frames to correct LAN, requires translation of MAC address to an IP address when using PPP.

FDDI - Fiber Distributed Data Interface

Fast Ethernet - 802.u

  • Three wiring standards
  • 100Base-T4, 100m, half duplex?, using all 8 category 3 UTP wires (internal phone wire) to hub that forms one collision domain.
  • 100Base-TX, 100m, full duplex, only 4 of the category 5 wires to hub used, hub forms one collision domain.
  • 100Base-FX, 2000m, full duplex, using fiber optics to switched hub. Since frames are too long for collision algorithm, with switched hub each connection is it own collision domain, allowing all stations to receive and transmit simultaneously.

  • Document last modified: