Docsity

Data Link Layer Part 2-Data Communication-Lecture Slides, Slides of Data Communication Systems and Computer Networks

Partial preview of the text

Download Data Link Layer Part 2-Data Communication-Lecture Slides and more Slides Data Communication Systems and Computer Networks in PDF only on Docsity!

Data Link Layer

Data Communication

Transport Layer 3-

DATA LINK LAYER

»Outline » MAC Protocols » (Random Access )ALOHA , SLOTTED ALOHA, CSMA, CSMA/CD » Collision Free Protocols » CSMA/CA

Transport Layer 3-

COLLISION FREE PROTOCOLS

» CSMA/CD is good in many aspects i.e. once the medium is seized by any sender collision don’t occur, however collision is possible in contention period » CSMA/CD is not universally accepted » Collision free protocols provide mechanism for multiple access without collision » Assumption for collision free protocols » No of stations are fixed i.e. N » Each station is assigned a unique address from 0 to N- » Propagation delay is negligible » Following protocols will be discussed » Bit Map Protocol » Binary Count down Protocol

BIT MAP PROTOCOL

Contention period consist of N slots for N stations Each stations is allotted exactly one contention slot Stations announce their reservation for medium during contention period by sending 1 during their contention slot After contention period stations send data frames in numerical order. Example  8 stations  Contention period divided in 8 slots 0 to 7  Slot 0 for station 0, slot 1 for station 1 etc.  If station 1 wants to occupy medium it will do so by sending a 1 during its contention slot  All other stations note that station 1 has queued a frame  After contention period station 1 will send the data frame.

PERFORMANCE

Low numbered stations have to wait longer if they just miss the slot  If a low order station misses its contention slot it has to wait N/2 time slot (contention) of current scan and N slot time of the next scan before it can send a frame. Higher order stations have to wait little before they send data frame

Channel efficiency  Under light load when 1 or 2 frames of d bits, per frame over head is almost N bits  d/(d + N)

Heavy Load  Under heavy load when all stations are sending data per frame over head is 1 bit  d/(d+1)

BINARY COUNT DOWN

Stations are assigned binary address Stations compete for medium Stations send their address bits one by one during contention slot Bits sent in one scan are ORed together by each station, Based on the result of ORed bits stations decides to send frame or defer themselves Example  4 stations with addresses 1-0010,2-0100,3-1001,4-  Bits sent during first bit time 0,0,1,1, these are ORed to 1  Station 1 and 2 defers themselves  Bits sent during 2nd^ bit time, 0,0 so station 3 and 4 will continue  Bits send during 3rd^ bit time 0,1 ORed to 1 station 3 gives up

CSMA/CA

CSMA/CA

A wireless network multiple access method (802.11) Based on CSMA i.e. stations senses the carrier before transmitting data BSCIS CSMA/CA Working

  1. Sense the medium
  2. If busy defer itself
  3. If idle wait for specific time *
  4. If still send the data
  5. Wait for acknowledgement
  6. If ACK transmission successful
  7. If no ACK resend or go to step 1

REVISION BASIC CSMA/CA

»Virtual Carrier Sensing

» A four way frame exchange is used to avoid collision from the stations that are not directly in the range of each other » When medium is free » RTS : Source Request To Send data ( request to destination) » CTS : Destination if willing reply with Clear To Send » Data: Source may send data after CTS » ACK : Successful transmission follows an ACK

»How the problems of collision is avoided

» All stations that are not involved in transmission and receive RTS or CTS will defer themselves according to the details of CTS » Stations defer themselves using a timer called NAV (Network Allocation Vector)

14

FOUR WAY FRAME EXCHANGE (VIRTUAL CHANNEL SENSING)

Timing in CSMA/CA

Flow diagram for CSMA/CA without RTS/CTS

19

CSMA/CA (CSMA WITH COLLISION AVOIDANCE)

All terminals listen to the same medium as CSMA/CD.

Terminal ready to transmit senses the medium.

If medium is busy it waits until the end of current transmission.

It again waits for an additional predetermined time period DIFS (Distributed inter frame Space).

Then picks up a random number of slots (the initial value of backoff counter) within a contention window to wait before transmitting its frame.

If there are transmissions by other terminals during this time period (backoff time), the terminal freezes its counter.

It resumes count down after other terminals finish transmission + DIFS. The terminal can start its transmission when the counter reaches to zero.