SlideShare a Scribd company logo
1 of 66
DISCLAIMER STATEMENT
In preparation of these slides, materials have been
taken from different online sources in the shape of
books, websites, research papers and presentations
etc. However, the author does not have any intention
to take any benefit of these in her/his own name. This
lecture (audio, video, slides etc) is prepared and
delivered only for educational purposes and is not
intended to infringe upon the copyrighted material.
Sources have been acknowledged where applicable.
The views expressed are presenter’s alone and do not
necessarily represent actual author(s) or the
institution.
1
Mobile & WirelessNetworks
Typical LayeringArchitecture and
Wireless Networks
(Data LinkLayer)
Layering in WirelessNetworks
ApplicationLayer
Transport Layer
Network Layer
Data linklayer
Physical Layer
 Modulation and Demodulation
 Analog Modulations: AM, FM,PM
 Digital Modulations: ASK,FSK,PSK
 Spread Spectrum
 FHSS
 DSSS
Data LinkLayer
(MACLayer)
Data LinkLayer Issues in WirelessNetworks
 Framesizeand overhead
 Frame error
 Error recovery(ARQ)
 Forward error correction
 Multiple access (Wireless ChannelAccessMechanism)
Application Layer
TransportLayer
Network Layer
Data LinkLayer
Physical Layer
MACLayer Issues and Wireless Networks
Application Layer
TransportLayer
Network Layer
Data LinkLayer
Physical Layer
 Multiple UserPerspective
 MACLayerIssuesin Wireless Networks
Hidden/Exposed Station Problem
Multiple AccessSchemes
Logical LinkControl
Medium AccessControl
Wired/Ethernet MAC – CSMA/CD
Carrier sense
 Nodes can distinguish between an idle and busy
link
Multiple access
 Nodes send and receive frames over a shared
link
Collision detection
 A node listens as it transmits to detect collision
CSMA/CD MAC Algorithm
 If line is idle (no carriersensed)
 Sendimmediately
 Must wait between back-to-backframes
 If line is busy (carriersensed)
 Wait until the line becomes idle (continuously
sensemedium) and then transmit immediately
 If collisiondetected
 Stop sending data
 Try again later
MACLayer Issues in
Wireless Networks
Reason for not using CSMA/CD in Wireless LANs
 Wireless LANscannot implement CSMA/CDfor three
reasons
 For Collision Detection, Voltagelevelcheckinginwireless
networksisexpensiveoperation.
 Collision may not be detected because of Hiddenstation
problem
 Thedistance between stations can be great. Signalfading
could prevent astation at one end from hearing acollisionat
the other
Multiple User Perspective/MAC LayerIssuesin
Wireless Networks
 How to share the broadcast wirelesschannel
efficiently among multiple users?
How to separate transmissions from differentusers?
How to avoid interference andcollisions?
How to achieve flexible, efficient and fairshare of
bandwidth?
 How to addressHidden/ExposedstationProblems?
Hidden/Exposed StationProblem
 Hidden nodes in a wireless network refer to nodes
that are out of range of other nodes or a collection
of nodes
 In wireless networks, the exposed nodeproblem
occurs when anode is prevented from sending
packets to other nodes due to aneighboring
transmitter
Hidden StationProblem
 NodeAcancommunicate with Band Cboth
 Band C cannot hear each other
 When B transmits to A, Ccannot detect the transmission
using the carrier sensemechanism
 If C also transmits, collision willoccur at nodeA
Exposed StationProblem
 Nodes Band D are out of range of eachother
 NodesAand Care in range of eachother
 If Ais transmitting to B,Node Cis prevented from transmitting to D
 Cconcludes after carrier sense that it will interfere with the transmission
by its neighborA
 However, Dcould still receive the transmission of C withoutinterference
becauseitis out of range of theongoingcommunicationbetweenAandB
Node Cprevented
to Transmit toD
Multiple UserPerspective
Classification of MAC LayerSchemes
Contention FreeMAC – Polling
 Works with topologies in which one device isdesignated as a
primary station and other devices are secondary devices and
all data exchangesmust be made through primarydestination
 Theselect (SEL) function is used whenever the primarydevice
hassomething to send. Primary must alert the secondary to
upcoming transmission.
 Poll function is used by primary device to ask for
transmission from the secondarydevices.
 When primary is ready to receive data, it must ask(poll) each
station if it has something to send?
Contention FreeMAC – Polling
A B A B
Contention FreeMAC – Polling
 Polling Limitations
 Polling overhead
 Latency
 Single point of failure(Master)
FDMA – Frequency Division Multiple Access
 In an area, multiple users or wireless subscribersare
served by asingle BS
 In FDMA,frequency band divided into sub-bands, called
channels
 FDMA isused in all 1Gcellular systems
User 1
User 2
User n
…
Time
Frequency
Frequency1
User1
User2
…
Usern
Frequency2
…
Frequencyn
Mobile Stations BaseStation
TDMA – TimeDivision Multiple Access
Time
1
Time
2 …
…
User1
User2
…
User n
Time
n
Mobile Stations Base Station
 In TDMA, one channel used by several users
 Time slots
 Round-robin
 TDMAused in most 2Gcellular systems
CDMA – Code Division Multiple Access
 CDMAused in some 2Gand most 3Gcellular systems
 The frequency of the transmitted signal is varied according to a defined pattern (code), so it
can be interpreted only by a receiver
User
2
User
1
User
n
Frequency
.. .
Time
Code
Multiple UserPerspective
Classification of MAC LayerSchemes
Random Access -Aloha
 Earliest RandomAccessMethod for Wireless LANs.
 Eachstation sendsaframe whenever it hasframe to send
 However, there is one channel to share, collisioncan
occur between frames from differentstations
Random Access – Slotted Aloha
 Slotted ALOHAdivides time into discrete intervalsand each
interval corresponds to aframe ofdata.
 It requires users to agree on slot boundaries.
 It does not allow a systemto transmit any time. Instead the
systemhasto wait for the beginning of the next slot
 Packetscompletely overlap or no overlapping. No
partial overlapping
ALOHA vs SlottedALOHA
Multiple UserPerspective
Classification of MAC LayerSchemes
CSMA – Persistence Methods
 What should astation do if the channel isbusy?
 What should astation do if the channel isidle?
 1-Persistence
 Non-Persistence
 p-Persistence
CSMA – Persistence Methods
 1-persistent CSMA Protocol:
 Step 1: If the medium is idle, transmit immediately
 Step 2:If the medium is busy, continue to listen until medium
becomes idle, and then transmitimmediately
 There will always be acollision if two nodes want to retransmit
(usually you stop transmission attempts after few tries)
 Theprotocol is called 1-persistent because the stationtransmits
with aprobability of 1 when it finds the channel idle
 Non-persistent CSMA Protocol:
 Step 1: If the medium is idle, transmit immediately
 Step 2: If the medium is busy, wait arandom amount of time
and repeat Step1
 Random backoff reduces probability of collisions
 Waste idle time if the backoff time is too long
CSMA – Persistence Methods
 p-persistent CSMA Protocol:
 It applies toslotted channels
 Step 1: If the medium is idle, check probability outcome if
p<=1 station can transmit. If >1 then wait atime slot
 Step 2: If the medium is busy, continue to listen until medium
becomes idle, then go to Step1
 Step 3: If transmission is delayed by one timeslot, continue
with Step1
Multiple UserPerspective
Classification of MAC LayerSchemes
Contention-Based MAC Protocols
with ReservationMechanisms
 Motivation
 Tosolve the hidden and exposed-terminal problems inwireless
 usethe request-to-send/clear-to-send (RTS/CTS)control
packets to preventcollisions
 Dynamic Reservation
 Thedynamic reservation approach involves setting upsome
sort of areservation prior todata transmission
 sender-initiatedprotocol:anode that wants to send datatakes
the initiative of setting up this reservation
 receiver-initiated protocol: the receiving node polls apotential
transmitting node for data
Multiple Access Collision Avoidance(MACA)
 MACA (Multiple Access Collision Avoidance)
 When node Awants to send apacket to node B,node Afirst
sendsaRequest-to-Send (RTS)to B
 Onreceiving RTS,node Bresponds by sending Clear-to-Send
(CTS),provided node Bis able to receive the packet
 When anode (such asC)overhears aCTS,it keeps quiet for
the duration of thetransfer
 Transfer duration is included in CTS
Working ofMACA
 If Calso transmits RTS,collision atB
A B C
RTS
Working ofMACA
 Cknows the expected DATAlength fromCTS
A B C
CTS
Defers untilDATA
completion
CTS
Working ofMACA
 Avoids the hidden terminalproblem
A B C
DA
T
A
RemainsSilent
Working ofMACA
 B want to communicate withA
A B C D
RTS RTS
Working ofMACA
 Cdoes not hear aCTS
A B C D
CTS
Working ofMACA
 Is Creally free to send toD?
A C D
RTS
B
DA
T
A DA
T
A
Working ofMACA
 In MACA, Cincreases its backoff counter in caseof
any collision
A B C D
DA
T
A CTS
DA
T
A
Limitations ofMACA
 RTS-CTSapproach does not always solve the hidden-terminal
problem completely and collision can occur when different
nodes send the RTSand CTSpackets
Working ofMACAW (Multiple Access with
Collision Avoidance for Wireless)
heard fromA. Hence my
transmission isdeferred
D
B A F
E
G
1.RTS
3.CTS
4.I heard CTSfrom B hencemy
transmission isdeferred till data
is to bereceived
4.Iheard CTSfrom B
hence my transmission
is deferred till data is to
be received
3.CTS
5.DS
2.(From both Eand F)RTSand RTS/CTS is a
success. Hence Idefer
my transmissiontill
till CTSshould be received dataends
7.Data
9.Ican not listen any
thing anymore
6.DS tells me that
what is datalength
10. Fis not replying.
Congestion may be?
I Backoff
11.ACK
10.Cis not replying.Congestion
may be? Ibackoff
C
1.RTS
12.Now I can replyto D
for old RTS withRRTS
11.ACK
7.Data
9.ReceivesRTS
Disadvantages ofMACAW
 MACAWdoes not solve the exposed terminalproblem
 Assume that node Ghas data to send to node Fin example explained
previously. It initiates the process by sending an RTSsignal to node F.
Node Fis in the transmission range of node Aand cannot hear the RTS
from node G, since it is exposed to co-channel interference. Node G
assumes that its RTSwas not successful because of collision and hence
backsoff before it triesagain.
IEEE 802.11Standard Wireless MAC
(CSMA/CA)
IEEE 802.11Standard – Network Configuration
 Wireless networking mainly can be viewed asadistributed
function among afew stations in aBasicServiceArea (BSA).
 Thegroup in aBSAis called aBasicServiceSet(BSS).Stations in a
BSSare connected via acommon central point
 More than one BSScould be grouped through aDistribution
System(DS)to form an extendedserviceset (ESS).
 E
S
Sis defined only for the infrastructure topology. For ad hocor
independenttopology, the BSSis called Independent BSSorIBSS.
Distribution System
Portal
802.xLAN
Access
Point
802.11 LAN
BSS2
802.11 LAN
BSS1
Access
Point
ST
A1
ST
A2 ST
A3
ESS
IEEE 802.11standard – Network Configuration
IEEE 802.11Standard – Modes of Operation
 Infrastructure-based
 Themain most mature technology for WLANs
 Most commonly used to construct Wi-Fihotspots
 Costly for dynamicenvironments
 Infrastructureless
 Also calledAd Hoc mode
 Stations form an Independent BasicService Set(IBSS)
 Any stations within the sametransmission range cancommunicate
IEEE 802.11Standard – Basic Services
 Thebasic services supported are the mandatory
data serviceand an optional real-time service
 Real-time service is supported only in infrastructure-
based networks where APscontrol accessto shared
medium
Distributed Foundation Wireless MAC (DFWMAC)
 Theprimary accessmethodof IEEE802.11 is by meansof a
distributed coordination function(DCF),also known as
DFWMAC
 DCFis basedon CSMA/CA
 Thesecondaryaccessmethodis point coordinationfunction
(PCF)implemented to provide real-timeservices
 When the PCFis in operation, APcontrols medium accessand
avoids simultaneous transmissions by thenodes
Components of IEEE 802.11MAC
1.Useof RTS/CTS to avoid hidden stationproblem
(Optional)
2.ChannelSensing:Physical carrier sense,and Virtual
carrier sense
3.Backoffintervals used to reduce collisionprobability
4.UseInterframe Spacing(IFS)to prioritize accessibility
5.ACK to achievereliability
1.Use of RTS/CTS – Avoid Hidden Node Problem
 Idea: allow senderto “reserve”channelrather than random
access of dataframes:avoid collisions
 Sender first transmits small request-to-send (RTS)packetsto
receiver usingCSMA
 RTSmay still collide with each other (but they’re short)
 Receiver broadcasts clear-to-send CTSin response to RTS
 CTSheard by all nodes
 sender transmits dataframe
 other stations defertransmissions
Avoiddata frame collisionscompletely
usingsmallreservation packets!
AP
A B
Time
DATA(A)
reservation collision
defer
1.Use of RTS/CTS – Avoid Hidden Node Problem
2.Channel Sensing
 Channel sensing is carried out
 by either sensing the presence of acarrier signal in the wireless
medium
 or by checking the value of aparameter,called Network
AllocationVector (NAV).
 TheMAClayer gets help from the physical layer electronicsto
check carrier signal presence. ThePHYfunction to sense
channel is called ClearChannelAssessment(CCA).
 NAVresults in what is termed virtual sensing, asit does not
involve aphysical signal-detection mechanism.
Virtual ChannelSensing
 In virtual sensing,NAVvalueischeckedthat wassetbythe
sending station ondetecting shortpacketexchange(called
handshake) between the intendedtransmitter andreceiver.
 Thetransmitter neighbors set the NAVparameter value on
detecting aRequest to Send(RTS)type of MACpacket. RTSis
sent by the transmitter to inform the intended receiver
about the reservation request and to askitspermission.
 Onreceiving RTS,the receiver responds with Clearto Send
(CTS),indicating its permission, aswell asinforming its
neighbors of the transmission. Ondetecting CTS,the stationsin
the neighborhood of the receiver set their NAVvalue.
Virtual CarrierSensing
C F
A E
D
RTS
B
NAV =10
RTS=Request-to-Send
Pretending a circularrange
NAV =NetworkAllocationVector,
remaining duration to keepquiet
Virtual CarrierSensing
C F
A B E
D
CTS
NAV =8
CTS=Clear-to-Send
Virtual CarrierSensing
DATApacket follows CTS.
C F
A B E
D
DA
T
A
Virtual CarrierSensing
Successful data receptionacknowledged
usingACK.
C F
A B E
ACK
D
Virtual CarrierSensing
C F
A B E
D
ACK
Reservedarea
Virtual CarrierSensing
when carrier sensed
 Nodes stay silent
(physical/virtual).
 NAV is updated
RTS/CTS/DATA/ACK
based
packets,
on overheard
each of which
specified duration of apendingtransmission
3.Random Backoff
 In the caseof astation finding achannel busy, it hasto
wait for some time before it can restart sensing.This
time is called backofftime.
 Thebackoff time is selected randomly in IEEE802.11.
Thisensures that two stations should not start andfinish
to sensethe channel togetheragain
 Thetime is generated from arandom numbergenerator
every time astation hasto backoff.
4.Inter-Frame Spacing (IFS)
 DCFincludes delays (Inter-frame spacing) that act asapriority
schemes
 Inter-frame spacingrefersto the time-interval between the
transmissionof two successiveframesbyanystation
 Four types of IFS
 SIFS(Short Inter-FrameSpacing)
 PIFS(PCFInter-FrameSpacing)
 DIFS(DCFInter-Frame Spacing)
 EIFS(Extended Inter-FrameSpacing)
Inter-Frame Spacing
 SIFS
highest priority, for ACK,CTS,pollingresponse
 PIFS
medium priority, for time-bounded service usingPCF
 DIFS
Lower priority than PIFS,for RTS
 EIFS
 Longest IFSand denotes the least priority to accessthe
medium. Usedfor resending an RTS packet whenever
physical layer detects incorrect MACframereception
Data Transmission in802.11
 Asender transmits an RTSframe to the receiver. set the NAVtimer
by the other stations.
 The receiver responds with a CTS frame containing a shorter
duration field. Setthe NAVtimer by the other stations.
 After this exchange all clients in the BSSthen contend based upon
the contention window after the DIFS.
5.Uses ACK to achievereliability
 Wireless links are prone to errors.
 Mechanisms are needed to reduce packet loss rate
 When node Breceives adata packet from nodeA, node Bsends
anAcknowledgement (Ack). Thisapproach adopted in many
protocols
 If nodeAfails to receive anAck, it will retransmit the packet
A B C
THANK YOU

More Related Content

Similar to Chapter_03_Data Link Layer and its protocols.pptx

Wierless networks ch3 (1)
Wierless networks ch3 (1)Wierless networks ch3 (1)
Wierless networks ch3 (1)bheemsain
 
Carrier-sense multiple access with collision avoidance CSMA/CA
Carrier-sense multiple access with collision avoidance CSMA/CACarrier-sense multiple access with collision avoidance CSMA/CA
Carrier-sense multiple access with collision avoidance CSMA/CASoumen Santra
 
Network Topologies
Network TopologiesNetwork Topologies
Network TopologiesJason Hando
 
Some Ccna basic detail
Some Ccna basic detailSome Ccna basic detail
Some Ccna basic detailmuneebalisyed
 
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...Soumen Santra
 
Direct Link Lan
Direct Link LanDirect Link Lan
Direct Link Lanyanhul
 
Habibullah cdmabased
Habibullah cdmabasedHabibullah cdmabased
Habibullah cdmabasedhinalala
 
Mobile Computing (Part-2)
Mobile Computing (Part-2)Mobile Computing (Part-2)
Mobile Computing (Part-2)Ankur Kumar
 
Swayambhoo Presentation (2)
Swayambhoo Presentation (2)Swayambhoo Presentation (2)
Swayambhoo Presentation (2)swayambhoo
 

Similar to Chapter_03_Data Link Layer and its protocols.pptx (20)

Wierless networks ch3 (1)
Wierless networks ch3 (1)Wierless networks ch3 (1)
Wierless networks ch3 (1)
 
Carrier-sense multiple access with collision avoidance CSMA/CA
Carrier-sense multiple access with collision avoidance CSMA/CACarrier-sense multiple access with collision avoidance CSMA/CA
Carrier-sense multiple access with collision avoidance CSMA/CA
 
Network Topologies
Network TopologiesNetwork Topologies
Network Topologies
 
Manet
ManetManet
Manet
 
Manet
ManetManet
Manet
 
Manet
ManetManet
Manet
 
manet.ppt
manet.pptmanet.ppt
manet.ppt
 
Technical seminar
Technical seminarTechnical seminar
Technical seminar
 
Some Ccna basic detail
Some Ccna basic detailSome Ccna basic detail
Some Ccna basic detail
 
Unit_3_WSN.pptx
Unit_3_WSN.pptxUnit_3_WSN.pptx
Unit_3_WSN.pptx
 
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
 
10 high speedla-ns
10 high speedla-ns10 high speedla-ns
10 high speedla-ns
 
Cdma
CdmaCdma
Cdma
 
Direct Link Lan
Direct Link LanDirect Link Lan
Direct Link Lan
 
Ad-Hoc Networks
Ad-Hoc NetworksAd-Hoc Networks
Ad-Hoc Networks
 
Habibullah cdmabased
Habibullah cdmabasedHabibullah cdmabased
Habibullah cdmabased
 
802.11[1]
802.11[1]802.11[1]
802.11[1]
 
Mobile Computing (Part-2)
Mobile Computing (Part-2)Mobile Computing (Part-2)
Mobile Computing (Part-2)
 
Swayambhoo Presentation (2)
Swayambhoo Presentation (2)Swayambhoo Presentation (2)
Swayambhoo Presentation (2)
 
Mac
MacMac
Mac
 

Recently uploaded

Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 

Recently uploaded (20)

Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 

Chapter_03_Data Link Layer and its protocols.pptx

  • 1. DISCLAIMER STATEMENT In preparation of these slides, materials have been taken from different online sources in the shape of books, websites, research papers and presentations etc. However, the author does not have any intention to take any benefit of these in her/his own name. This lecture (audio, video, slides etc) is prepared and delivered only for educational purposes and is not intended to infringe upon the copyrighted material. Sources have been acknowledged where applicable. The views expressed are presenter’s alone and do not necessarily represent actual author(s) or the institution. 1
  • 3. Typical LayeringArchitecture and Wireless Networks (Data LinkLayer)
  • 4. Layering in WirelessNetworks ApplicationLayer Transport Layer Network Layer Data linklayer Physical Layer  Modulation and Demodulation  Analog Modulations: AM, FM,PM  Digital Modulations: ASK,FSK,PSK  Spread Spectrum  FHSS  DSSS
  • 6. Data LinkLayer Issues in WirelessNetworks  Framesizeand overhead  Frame error  Error recovery(ARQ)  Forward error correction  Multiple access (Wireless ChannelAccessMechanism) Application Layer TransportLayer Network Layer Data LinkLayer Physical Layer
  • 7. MACLayer Issues and Wireless Networks Application Layer TransportLayer Network Layer Data LinkLayer Physical Layer  Multiple UserPerspective  MACLayerIssuesin Wireless Networks Hidden/Exposed Station Problem Multiple AccessSchemes Logical LinkControl Medium AccessControl
  • 8. Wired/Ethernet MAC – CSMA/CD Carrier sense  Nodes can distinguish between an idle and busy link Multiple access  Nodes send and receive frames over a shared link Collision detection  A node listens as it transmits to detect collision
  • 9. CSMA/CD MAC Algorithm  If line is idle (no carriersensed)  Sendimmediately  Must wait between back-to-backframes  If line is busy (carriersensed)  Wait until the line becomes idle (continuously sensemedium) and then transmit immediately  If collisiondetected  Stop sending data  Try again later
  • 11. Reason for not using CSMA/CD in Wireless LANs  Wireless LANscannot implement CSMA/CDfor three reasons  For Collision Detection, Voltagelevelcheckinginwireless networksisexpensiveoperation.  Collision may not be detected because of Hiddenstation problem  Thedistance between stations can be great. Signalfading could prevent astation at one end from hearing acollisionat the other
  • 12. Multiple User Perspective/MAC LayerIssuesin Wireless Networks  How to share the broadcast wirelesschannel efficiently among multiple users? How to separate transmissions from differentusers? How to avoid interference andcollisions? How to achieve flexible, efficient and fairshare of bandwidth?  How to addressHidden/ExposedstationProblems?
  • 13. Hidden/Exposed StationProblem  Hidden nodes in a wireless network refer to nodes that are out of range of other nodes or a collection of nodes  In wireless networks, the exposed nodeproblem occurs when anode is prevented from sending packets to other nodes due to aneighboring transmitter
  • 14. Hidden StationProblem  NodeAcancommunicate with Band Cboth  Band C cannot hear each other  When B transmits to A, Ccannot detect the transmission using the carrier sensemechanism  If C also transmits, collision willoccur at nodeA
  • 15. Exposed StationProblem  Nodes Band D are out of range of eachother  NodesAand Care in range of eachother  If Ais transmitting to B,Node Cis prevented from transmitting to D  Cconcludes after carrier sense that it will interfere with the transmission by its neighborA  However, Dcould still receive the transmission of C withoutinterference becauseitis out of range of theongoingcommunicationbetweenAandB Node Cprevented to Transmit toD
  • 17. Contention FreeMAC – Polling  Works with topologies in which one device isdesignated as a primary station and other devices are secondary devices and all data exchangesmust be made through primarydestination  Theselect (SEL) function is used whenever the primarydevice hassomething to send. Primary must alert the secondary to upcoming transmission.  Poll function is used by primary device to ask for transmission from the secondarydevices.  When primary is ready to receive data, it must ask(poll) each station if it has something to send?
  • 18. Contention FreeMAC – Polling A B A B
  • 19. Contention FreeMAC – Polling  Polling Limitations  Polling overhead  Latency  Single point of failure(Master)
  • 20. FDMA – Frequency Division Multiple Access  In an area, multiple users or wireless subscribersare served by asingle BS  In FDMA,frequency band divided into sub-bands, called channels  FDMA isused in all 1Gcellular systems User 1 User 2 User n … Time Frequency Frequency1 User1 User2 … Usern Frequency2 … Frequencyn Mobile Stations BaseStation
  • 21. TDMA – TimeDivision Multiple Access Time 1 Time 2 … … User1 User2 … User n Time n Mobile Stations Base Station  In TDMA, one channel used by several users  Time slots  Round-robin  TDMAused in most 2Gcellular systems
  • 22. CDMA – Code Division Multiple Access  CDMAused in some 2Gand most 3Gcellular systems  The frequency of the transmitted signal is varied according to a defined pattern (code), so it can be interpreted only by a receiver User 2 User 1 User n Frequency .. . Time Code
  • 24. Random Access -Aloha  Earliest RandomAccessMethod for Wireless LANs.  Eachstation sendsaframe whenever it hasframe to send  However, there is one channel to share, collisioncan occur between frames from differentstations
  • 25. Random Access – Slotted Aloha  Slotted ALOHAdivides time into discrete intervalsand each interval corresponds to aframe ofdata.  It requires users to agree on slot boundaries.  It does not allow a systemto transmit any time. Instead the systemhasto wait for the beginning of the next slot  Packetscompletely overlap or no overlapping. No partial overlapping
  • 28. CSMA – Persistence Methods  What should astation do if the channel isbusy?  What should astation do if the channel isidle?  1-Persistence  Non-Persistence  p-Persistence
  • 29. CSMA – Persistence Methods  1-persistent CSMA Protocol:  Step 1: If the medium is idle, transmit immediately  Step 2:If the medium is busy, continue to listen until medium becomes idle, and then transmitimmediately  There will always be acollision if two nodes want to retransmit (usually you stop transmission attempts after few tries)  Theprotocol is called 1-persistent because the stationtransmits with aprobability of 1 when it finds the channel idle  Non-persistent CSMA Protocol:  Step 1: If the medium is idle, transmit immediately  Step 2: If the medium is busy, wait arandom amount of time and repeat Step1  Random backoff reduces probability of collisions  Waste idle time if the backoff time is too long
  • 30. CSMA – Persistence Methods  p-persistent CSMA Protocol:  It applies toslotted channels  Step 1: If the medium is idle, check probability outcome if p<=1 station can transmit. If >1 then wait atime slot  Step 2: If the medium is busy, continue to listen until medium becomes idle, then go to Step1  Step 3: If transmission is delayed by one timeslot, continue with Step1
  • 32. Contention-Based MAC Protocols with ReservationMechanisms  Motivation  Tosolve the hidden and exposed-terminal problems inwireless  usethe request-to-send/clear-to-send (RTS/CTS)control packets to preventcollisions  Dynamic Reservation  Thedynamic reservation approach involves setting upsome sort of areservation prior todata transmission  sender-initiatedprotocol:anode that wants to send datatakes the initiative of setting up this reservation  receiver-initiated protocol: the receiving node polls apotential transmitting node for data
  • 33. Multiple Access Collision Avoidance(MACA)  MACA (Multiple Access Collision Avoidance)  When node Awants to send apacket to node B,node Afirst sendsaRequest-to-Send (RTS)to B  Onreceiving RTS,node Bresponds by sending Clear-to-Send (CTS),provided node Bis able to receive the packet  When anode (such asC)overhears aCTS,it keeps quiet for the duration of thetransfer  Transfer duration is included in CTS
  • 34. Working ofMACA  If Calso transmits RTS,collision atB A B C RTS
  • 35. Working ofMACA  Cknows the expected DATAlength fromCTS A B C CTS Defers untilDATA completion CTS
  • 36. Working ofMACA  Avoids the hidden terminalproblem A B C DA T A RemainsSilent
  • 37. Working ofMACA  B want to communicate withA A B C D RTS RTS
  • 38. Working ofMACA  Cdoes not hear aCTS A B C D CTS
  • 39. Working ofMACA  Is Creally free to send toD? A C D RTS B DA T A DA T A
  • 40. Working ofMACA  In MACA, Cincreases its backoff counter in caseof any collision A B C D DA T A CTS DA T A
  • 41. Limitations ofMACA  RTS-CTSapproach does not always solve the hidden-terminal problem completely and collision can occur when different nodes send the RTSand CTSpackets
  • 42. Working ofMACAW (Multiple Access with Collision Avoidance for Wireless) heard fromA. Hence my transmission isdeferred D B A F E G 1.RTS 3.CTS 4.I heard CTSfrom B hencemy transmission isdeferred till data is to bereceived 4.Iheard CTSfrom B hence my transmission is deferred till data is to be received 3.CTS 5.DS 2.(From both Eand F)RTSand RTS/CTS is a success. Hence Idefer my transmissiontill till CTSshould be received dataends 7.Data 9.Ican not listen any thing anymore 6.DS tells me that what is datalength 10. Fis not replying. Congestion may be? I Backoff 11.ACK 10.Cis not replying.Congestion may be? Ibackoff C 1.RTS 12.Now I can replyto D for old RTS withRRTS 11.ACK 7.Data 9.ReceivesRTS
  • 43. Disadvantages ofMACAW  MACAWdoes not solve the exposed terminalproblem  Assume that node Ghas data to send to node Fin example explained previously. It initiates the process by sending an RTSsignal to node F. Node Fis in the transmission range of node Aand cannot hear the RTS from node G, since it is exposed to co-channel interference. Node G assumes that its RTSwas not successful because of collision and hence backsoff before it triesagain.
  • 45. IEEE 802.11Standard – Network Configuration  Wireless networking mainly can be viewed asadistributed function among afew stations in aBasicServiceArea (BSA).  Thegroup in aBSAis called aBasicServiceSet(BSS).Stations in a BSSare connected via acommon central point  More than one BSScould be grouped through aDistribution System(DS)to form an extendedserviceset (ESS).  E S Sis defined only for the infrastructure topology. For ad hocor independenttopology, the BSSis called Independent BSSorIBSS.
  • 46. Distribution System Portal 802.xLAN Access Point 802.11 LAN BSS2 802.11 LAN BSS1 Access Point ST A1 ST A2 ST A3 ESS IEEE 802.11standard – Network Configuration
  • 47. IEEE 802.11Standard – Modes of Operation  Infrastructure-based  Themain most mature technology for WLANs  Most commonly used to construct Wi-Fihotspots  Costly for dynamicenvironments  Infrastructureless  Also calledAd Hoc mode  Stations form an Independent BasicService Set(IBSS)  Any stations within the sametransmission range cancommunicate
  • 48. IEEE 802.11Standard – Basic Services  Thebasic services supported are the mandatory data serviceand an optional real-time service  Real-time service is supported only in infrastructure- based networks where APscontrol accessto shared medium
  • 49. Distributed Foundation Wireless MAC (DFWMAC)  Theprimary accessmethodof IEEE802.11 is by meansof a distributed coordination function(DCF),also known as DFWMAC  DCFis basedon CSMA/CA  Thesecondaryaccessmethodis point coordinationfunction (PCF)implemented to provide real-timeservices  When the PCFis in operation, APcontrols medium accessand avoids simultaneous transmissions by thenodes
  • 50. Components of IEEE 802.11MAC 1.Useof RTS/CTS to avoid hidden stationproblem (Optional) 2.ChannelSensing:Physical carrier sense,and Virtual carrier sense 3.Backoffintervals used to reduce collisionprobability 4.UseInterframe Spacing(IFS)to prioritize accessibility 5.ACK to achievereliability
  • 51. 1.Use of RTS/CTS – Avoid Hidden Node Problem  Idea: allow senderto “reserve”channelrather than random access of dataframes:avoid collisions  Sender first transmits small request-to-send (RTS)packetsto receiver usingCSMA  RTSmay still collide with each other (but they’re short)  Receiver broadcasts clear-to-send CTSin response to RTS  CTSheard by all nodes  sender transmits dataframe  other stations defertransmissions Avoiddata frame collisionscompletely usingsmallreservation packets!
  • 52. AP A B Time DATA(A) reservation collision defer 1.Use of RTS/CTS – Avoid Hidden Node Problem
  • 53. 2.Channel Sensing  Channel sensing is carried out  by either sensing the presence of acarrier signal in the wireless medium  or by checking the value of aparameter,called Network AllocationVector (NAV).  TheMAClayer gets help from the physical layer electronicsto check carrier signal presence. ThePHYfunction to sense channel is called ClearChannelAssessment(CCA).  NAVresults in what is termed virtual sensing, asit does not involve aphysical signal-detection mechanism.
  • 54. Virtual ChannelSensing  In virtual sensing,NAVvalueischeckedthat wassetbythe sending station ondetecting shortpacketexchange(called handshake) between the intendedtransmitter andreceiver.  Thetransmitter neighbors set the NAVparameter value on detecting aRequest to Send(RTS)type of MACpacket. RTSis sent by the transmitter to inform the intended receiver about the reservation request and to askitspermission.  Onreceiving RTS,the receiver responds with Clearto Send (CTS),indicating its permission, aswell asinforming its neighbors of the transmission. Ondetecting CTS,the stationsin the neighborhood of the receiver set their NAVvalue.
  • 55. Virtual CarrierSensing C F A E D RTS B NAV =10 RTS=Request-to-Send Pretending a circularrange NAV =NetworkAllocationVector, remaining duration to keepquiet
  • 56. Virtual CarrierSensing C F A B E D CTS NAV =8 CTS=Clear-to-Send
  • 57. Virtual CarrierSensing DATApacket follows CTS. C F A B E D DA T A
  • 58. Virtual CarrierSensing Successful data receptionacknowledged usingACK. C F A B E ACK D
  • 59. Virtual CarrierSensing C F A B E D ACK Reservedarea
  • 60. Virtual CarrierSensing when carrier sensed  Nodes stay silent (physical/virtual).  NAV is updated RTS/CTS/DATA/ACK based packets, on overheard each of which specified duration of apendingtransmission
  • 61. 3.Random Backoff  In the caseof astation finding achannel busy, it hasto wait for some time before it can restart sensing.This time is called backofftime.  Thebackoff time is selected randomly in IEEE802.11. Thisensures that two stations should not start andfinish to sensethe channel togetheragain  Thetime is generated from arandom numbergenerator every time astation hasto backoff.
  • 62. 4.Inter-Frame Spacing (IFS)  DCFincludes delays (Inter-frame spacing) that act asapriority schemes  Inter-frame spacingrefersto the time-interval between the transmissionof two successiveframesbyanystation  Four types of IFS  SIFS(Short Inter-FrameSpacing)  PIFS(PCFInter-FrameSpacing)  DIFS(DCFInter-Frame Spacing)  EIFS(Extended Inter-FrameSpacing)
  • 63. Inter-Frame Spacing  SIFS highest priority, for ACK,CTS,pollingresponse  PIFS medium priority, for time-bounded service usingPCF  DIFS Lower priority than PIFS,for RTS  EIFS  Longest IFSand denotes the least priority to accessthe medium. Usedfor resending an RTS packet whenever physical layer detects incorrect MACframereception
  • 64. Data Transmission in802.11  Asender transmits an RTSframe to the receiver. set the NAVtimer by the other stations.  The receiver responds with a CTS frame containing a shorter duration field. Setthe NAVtimer by the other stations.  After this exchange all clients in the BSSthen contend based upon the contention window after the DIFS.
  • 65. 5.Uses ACK to achievereliability  Wireless links are prone to errors.  Mechanisms are needed to reduce packet loss rate  When node Breceives adata packet from nodeA, node Bsends anAcknowledgement (Ack). Thisapproach adopted in many protocols  If nodeAfails to receive anAck, it will retransmit the packet A B C