SlideShare a Scribd company logo
Eighth Edition
by William Stallings
Chapter 7 – Data Link Control Protocols
Data Link Control Protocols
• need layer of logic above Physical
• to manage exchange of data over a link
– frame synchronization
– flow control
– error control
– addressing
– control and data
– link management
11-1 FRAMING
The data link layer needs to pack bits into frames, so that each
frame is distinguishable from another. Our postal system
practices a type of framing. The simple act of inserting a letter
into an envelope separates one piece of information from
another; the envelope serves as the delimiter.
Figure 11.1 A frame in a character-oriented protocol
Figure 11.2 Byte stuffing and unstuffing
Byte stuffing is the process of adding 1 extra byte
whenever there is a flag or escape character in the text.
Figure 11.3 A frame in a bit-oriented protocol
Bit stuffing is the
process of adding
one extra 0
whenever five
consecutive 1s
follow a 0 in the
data, so that the
receiver does not
mistake the pattern
0111110 for a flag.
Figure 11.4 Bit stuffing and unstuffing
FLOW AND
ERROR
CONTROL
Flow control refers to a
set of procedures used
to restrict the amount
of data that the sender
can send before
waiting for
acknowledgment.
Error control in the
data link layer is
based on automatic
repeat request, which
is the retransmission
of data.
• ensure sending entity does not
overwhelm receiving entity
– by preventing buffer overflow
• influenced by:
– transmission time
• time taken to emit all bits into
medium
– propagation time
• time for a bit to traverse the
link
• assume here no errors but varying
delays
Flow Control
The most important responsibilities of the
data link layer are flow control and error
control. Collectively, these functions are
known as data link control.
Error Control
• Detection and correction of errors such as:
– lost frames
– damaged frames
• common techniques use:
– error detection
– positive acknowledgment
– retransmission after timeout
– negative acknowledgement & retransmission
Automatic Repeat Request (ARQ)
• collective name for such error control mechanisms,
including:
• Stop and Wait
• Sliding Window
– go back N
– selective reject (selective retransmission)
11-3 PROTOCOLS
Now let us see how the data link layer can combine framing, flow
control, and error control to achieve the delivery of data from one node
to another. The protocols are normally implemented in software by
using one of the common programming languages.
11-4 NOISELESS CHANNELS
Let us first assume we have an ideal channel in which no frames are
lost, duplicated, or corrupted. We introduce two protocols for this type
of channel.
Model of
Frame
Transmiss
ion
Stop and Wait
• source transmits frame
• destination receives
frame and replies with
acknowledgement (ACK)
• source waits for ACK
before sending next
• destination can stop flow
by not send ACK
• works well for a few large
frames
• Stop and wait becomes
inadequate if large block
of data is split into small
frames
Stop and Wait
• pros and cons
– simple
– inefficient
• source transmits single
frame
• wait for ACK
• if received frame
damaged, discard it
– transmitter has timeout
– if no ACK within timeout,
retransmit
• if ACK
damaged,transmitter will
not recognize it
– transmitter will retransmit
– receive gets two copies of
frame
– use alternate numbering
and ACK0 / ACK1
Sliding Windows Flow Control
• allows multiple numbered frames to be in transit
• receiver has buffer W long
• transmitter sends up to W frames without ACK
• ACK includes number of next frame expected
• sequence number is bounded by size of field (k)
– frames are numbered modulo 2k
– giving max window size of up to 2k - 1
• receiver can ack frames without permitting
further transmission (Receive Not Ready)
• must send a normal acknowledge to resume
• if have full-duplex link, can piggyback ACks
Sliding Window Diagram
Sliding Window Example
Go Back N
• based on sliding window
• if no error, ACK as usual
• use window to control number of outstanding frames
• if error, reply with rejection
– discard that frame and all future frames until error frame received
correctly
– transmitter must go back and retransmit that frame and all
subsequent frames
• Damaged Frame
– error in frame i so receiver rejects frame i
– transmitter retransmits frames from i
• Lost Frame
– frame i lost and either
• transmitter sends i+1 and receiver gets frame i+1 out of seq and
rejects frame i
• or transmitter times out and send ACK with P bit set which receiver
responds to with ACK i
– transmitter then retransmits frames from i
Go Back
N
Diagram
Go Back N - Handling
• Damaged Acknowledgement
– receiver gets frame i, sends ack (i+1) which is lost
– acks are cumulative, so next ack (i+n) may arrive
before transmitter times out on frame i
– if transmitter times out, it sends ack with P bit set
– can be repeated a number of times before a reset
procedure is initiated
• Damaged Rejection
– reject for damaged frame is lost
– handled as for lost frame when transmitter times out
Selective Reject
• also called selective retransmission
• only rejected frames are retransmitted
• subsequent frames are accepted by the receiver
and buffered
• minimizes retransmission
• receiver must maintain large enough buffer
• more complex logic in transmitter
• hence less widely used
• useful for satellite links with long propagation
delays
Selective
-Reject
Diagram
Utilization under SW Flow Control
• Utilization = U = frame time / total time
• U = 1/1+2a
• a = Propagation Time / Transmission Time
• a = Medium length in bits / Frame length in
bits Station s1 sends f1
Station s2 sends an acknowledgment
Station s1 sends f2
Station s2 sends an acknowledgment
.
.
.
Station s1 sends fn
Station s2 sends an acknowledgment
CALCULATION OF U
• Total time to send the data=T=nTf
• Tf=time to send and receive an acknowledgment
– Tf=Tframe+Tprop+Tproc+ Tack + Tprop+Tproc
• Tprop=propagation time from s1 to s2
• Tframe=time to transmit a frame
• Tproc=processing time (negligible)
• Tack=time to transmit an acknowledgment(very small as
compared to data frame)
• T=2Tprop+Tframe
• For n frames T=n(2Tprop+Tframe)
• Of that time only n x Tframe is actually spent transmitting data
and the rest is overhead,therefore the utilization or efficiency
of the line is
• U= (n x Tframe )/n(2Tprop+Tframe)
= Tframe/(2Tprop+Tframe)
• If a=Tprop/Tframe then
• U=1/(1+2a)
CALCULATION OF U
Utilization with Sliding Window Flow Control
• N > 2a + 1
for
• N < 2a + 1
for
N
2a + 1
U =
U = 1

More Related Content

What's hot

Chapter 11: Data Link Control
Chapter 11: Data Link ControlChapter 11: Data Link Control
Chapter 11: Data Link Control
JeoffnaRuth
 
Data link control
Data link controlData link control
Data link control
Iffat Anjum
 
Data link control protocol(3)
Data link control protocol(3)Data link control protocol(3)
Data link control protocol(3)
Jeffrey Des Binwag
 
Importance of sliding window protocol
Importance of sliding window protocolImportance of sliding window protocol
Importance of sliding window protocol
eSAT Journals
 
Protocols of noiseless
Protocols of noiselessProtocols of noiseless
Protocols of noiseless
Basit Hussain
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocal
tes31
 
HDLC(high level data link control)
HDLC(high level data link control)HDLC(high level data link control)
HDLC(high level data link control)Anand Biradar
 
Importance of sliding window protocol
Importance of sliding window protocolImportance of sliding window protocol
Importance of sliding window protocol
eSAT Publishing House
 
Different protocols for data communication networks
Different protocols for data communication networks Different protocols for data communication networks
Different protocols for data communication networks
Nt Arvind
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
JAIGANESH SEKAR
 
Framing
FramingFraming
Chapter 11
Chapter 11Chapter 11
Chapter 11
Faisal Mehmood
 
Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)
shilpa patel
 
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTANMedium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
irfan sami
 
Data Link Control
Data Link ControlData Link Control
Data Link Control
Sonia Pahuja
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocolRishu Seth
 
Controlled Access Protocols
Controlled Access ProtocolsControlled Access Protocols
Controlled Access Protocols
Pruthviraj Konu
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
anuragjagetiya
 

What's hot (20)

Chapter 11: Data Link Control
Chapter 11: Data Link ControlChapter 11: Data Link Control
Chapter 11: Data Link Control
 
Hdlc
HdlcHdlc
Hdlc
 
Data link control
Data link controlData link control
Data link control
 
Data link control protocol(3)
Data link control protocol(3)Data link control protocol(3)
Data link control protocol(3)
 
Importance of sliding window protocol
Importance of sliding window protocolImportance of sliding window protocol
Importance of sliding window protocol
 
Protocols of noiseless
Protocols of noiselessProtocols of noiseless
Protocols of noiseless
 
Mac sub layer
Mac sub layerMac sub layer
Mac sub layer
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocal
 
HDLC(high level data link control)
HDLC(high level data link control)HDLC(high level data link control)
HDLC(high level data link control)
 
Importance of sliding window protocol
Importance of sliding window protocolImportance of sliding window protocol
Importance of sliding window protocol
 
Different protocols for data communication networks
Different protocols for data communication networks Different protocols for data communication networks
Different protocols for data communication networks
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
 
Framing
FramingFraming
Framing
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)
 
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTANMedium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
 
Data Link Control
Data Link ControlData Link Control
Data Link Control
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
 
Controlled Access Protocols
Controlled Access ProtocolsControlled Access Protocols
Controlled Access Protocols
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
 

Viewers also liked

Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22koolkampus
 
Data link control protocol(1)
Data link control protocol(1)Data link control protocol(1)
Data link control protocol(1)
Jeffrey Des Binwag
 
LiveAction Spanning Tree Protocol (STP) Application Note
LiveAction Spanning Tree Protocol (STP) Application NoteLiveAction Spanning Tree Protocol (STP) Application Note
LiveAction Spanning Tree Protocol (STP) Application Note
ActionPacked Networks
 
Link layer
Link layerLink layer
Link layer
Belete Kidane
 
Dcn data link_layer
Dcn data link_layerDcn data link_layer
Dcn data link_layer
mangal das
 
Data Link Layer
Data Link LayerData Link Layer
Data Link Layer
Kamal Acharya
 
Link Layer Protocols for WSN-based IoT
Link Layer Protocols for WSN-based IoTLink Layer Protocols for WSN-based IoT
Link Layer Protocols for WSN-based IoT
Prasant Misra
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layermekind
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Controltameemyousaf
 
Data link layer
Data link layer Data link layer
Data link layer
Mukesh Chinta
 
GO BACK N PROTOCOL
GO BACK N PROTOCOLGO BACK N PROTOCOL
GO BACK N PROTOCOL
shayan singla
 

Viewers also liked (18)

Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22
 
Data link control protocol(1)
Data link control protocol(1)Data link control protocol(1)
Data link control protocol(1)
 
Go Back N ARQ
Go  Back N ARQGo  Back N ARQ
Go Back N ARQ
 
LiveAction Spanning Tree Protocol (STP) Application Note
LiveAction Spanning Tree Protocol (STP) Application NoteLiveAction Spanning Tree Protocol (STP) Application Note
LiveAction Spanning Tree Protocol (STP) Application Note
 
Link layer
Link layerLink layer
Link layer
 
Dcn data link_layer
Dcn data link_layerDcn data link_layer
Dcn data link_layer
 
Chapter7 l1
Chapter7 l1Chapter7 l1
Chapter7 l1
 
Protocolo Spanning Tree
Protocolo Spanning TreeProtocolo Spanning Tree
Protocolo Spanning Tree
 
Data Link Layer
Data Link LayerData Link Layer
Data Link Layer
 
Link Layer Protocols for WSN-based IoT
Link Layer Protocols for WSN-based IoTLink Layer Protocols for WSN-based IoT
Link Layer Protocols for WSN-based IoT
 
6 data linkcontrol
6  data linkcontrol6  data linkcontrol
6 data linkcontrol
 
Ch 11
Ch 11Ch 11
Ch 11
 
Forouzan isdn
Forouzan isdnForouzan isdn
Forouzan isdn
 
Broadband isdn
Broadband isdnBroadband isdn
Broadband isdn
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
 
Data link layer
Data link layer Data link layer
Data link layer
 
GO BACK N PROTOCOL
GO BACK N PROTOCOLGO BACK N PROTOCOL
GO BACK N PROTOCOL
 

Similar to Data Link Control Protocols

a_presentation_on_hdlc_and_dlc_computer.ppt
a_presentation_on_hdlc_and_dlc_computer.ppta_presentation_on_hdlc_and_dlc_computer.ppt
a_presentation_on_hdlc_and_dlc_computer.ppt
BlackHat41
 
Unit IV_Flow.pptx
Unit IV_Flow.pptxUnit IV_Flow.pptx
Unit IV_Flow.pptx
TejasRao8
 
Data Link Control.ppt
Data Link Control.pptData Link Control.ppt
Data Link Control.ppt
Teshome48
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
boraroma
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
roma bora
 
DATA LINK LAYER.pdf
DATA LINK LAYER.pdfDATA LINK LAYER.pdf
DATA LINK LAYER.pdf
electricalengineerin42
 
Data link layer elementry protocols
Data link layer elementry protocolsData link layer elementry protocols
Data link layer elementry protocols
sabitha sairam
 
Flow Control (1).ppt
Flow Control (1).pptFlow Control (1).ppt
Flow Control (1).ppt
sarthakgithub
 
Data link layer
Data link layerData link layer
Data link layer
sbkbca
 
DataLinkControl.ppt
DataLinkControl.pptDataLinkControl.ppt
DataLinkControl.ppt
MaddalaSeshu
 
09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt
ShaliniKumariGupta1
 
Transport layer
Transport layerTransport layer
Transport layer
arvind pandey
 
3a data link layer
3a data link layer 3a data link layer
3a data link layer
kavish dani
 
stop and wait
stop and waitstop and wait
stop and wait
swati463221
 
Data linkcontrol
Data linkcontrolData linkcontrol
Data linkcontrol
Bablu Shofi
 
Flow control &amp; error control
Flow control &amp; error controlFlow control &amp; error control
Flow control &amp; error control
ManishTadhiyal
 
Datalink control(framing,protocols)
Datalink control(framing,protocols)Datalink control(framing,protocols)
Datalink control(framing,protocols)
Hira Awan
 

Similar to Data Link Control Protocols (20)

a_presentation_on_hdlc_and_dlc_computer.ppt
a_presentation_on_hdlc_and_dlc_computer.ppta_presentation_on_hdlc_and_dlc_computer.ppt
a_presentation_on_hdlc_and_dlc_computer.ppt
 
Unit IV_Flow.pptx
Unit IV_Flow.pptxUnit IV_Flow.pptx
Unit IV_Flow.pptx
 
Data Link Control.ppt
Data Link Control.pptData Link Control.ppt
Data Link Control.ppt
 
07 data linkcontrol
07 data linkcontrol07 data linkcontrol
07 data linkcontrol
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
 
DATA LINK LAYER.pdf
DATA LINK LAYER.pdfDATA LINK LAYER.pdf
DATA LINK LAYER.pdf
 
Data link layer elementry protocols
Data link layer elementry protocolsData link layer elementry protocols
Data link layer elementry protocols
 
Flow Control (1).ppt
Flow Control (1).pptFlow Control (1).ppt
Flow Control (1).ppt
 
Data link layer
Data link layerData link layer
Data link layer
 
DataLinkControl.ppt
DataLinkControl.pptDataLinkControl.ppt
DataLinkControl.ppt
 
09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt
 
Transport layer
Transport layerTransport layer
Transport layer
 
3a data link layer
3a data link layer 3a data link layer
3a data link layer
 
stop and wait
stop and waitstop and wait
stop and wait
 
Data linkcontrol
Data linkcontrolData linkcontrol
Data linkcontrol
 
Ntdd
NtddNtdd
Ntdd
 
Ntdd
NtddNtdd
Ntdd
 
Flow control &amp; error control
Flow control &amp; error controlFlow control &amp; error control
Flow control &amp; error control
 
Datalink control(framing,protocols)
Datalink control(framing,protocols)Datalink control(framing,protocols)
Datalink control(framing,protocols)
 

More from TechiNerd

Dc chapter 13
Dc chapter   13Dc chapter   13
Dc chapter 13TechiNerd
 
Error Detection and Correction
Error Detection and CorrectionError Detection and Correction
Error Detection and CorrectionTechiNerd
 
Analog Transmissions
Analog TransmissionsAnalog Transmissions
Analog TransmissionsTechiNerd
 
Digital Transmission
Digital TransmissionDigital Transmission
Digital TransmissionTechiNerd
 
Data and Signals
Data and SignalsData and Signals
Data and SignalsTechiNerd
 
Network Models
Network ModelsNetwork Models
Network ModelsTechiNerd
 
Overview of Data Communications and Networking
Overview of Data Communications and NetworkingOverview of Data Communications and Networking
Overview of Data Communications and NetworkingTechiNerd
 
Java Programming For Android
Java Programming For AndroidJava Programming For Android
Java Programming For Android
TechiNerd
 

More from TechiNerd (9)

Dc chapter 13
Dc chapter   13Dc chapter   13
Dc chapter 13
 
Error Detection and Correction
Error Detection and CorrectionError Detection and Correction
Error Detection and Correction
 
Analog Transmissions
Analog TransmissionsAnalog Transmissions
Analog Transmissions
 
Digital Transmission
Digital TransmissionDigital Transmission
Digital Transmission
 
Data and Signals
Data and SignalsData and Signals
Data and Signals
 
Network Models
Network ModelsNetwork Models
Network Models
 
Overview of Data Communications and Networking
Overview of Data Communications and NetworkingOverview of Data Communications and Networking
Overview of Data Communications and Networking
 
HDLC
HDLCHDLC
HDLC
 
Java Programming For Android
Java Programming For AndroidJava Programming For Android
Java Programming For Android
 

Recently uploaded

COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 

Recently uploaded (20)

COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 

Data Link Control Protocols

  • 1. Eighth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data Link Control Protocols • need layer of logic above Physical • to manage exchange of data over a link – frame synchronization – flow control – error control – addressing – control and data – link management
  • 2. 11-1 FRAMING The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. Our postal system practices a type of framing. The simple act of inserting a letter into an envelope separates one piece of information from another; the envelope serves as the delimiter. Figure 11.1 A frame in a character-oriented protocol
  • 3. Figure 11.2 Byte stuffing and unstuffing Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape character in the text.
  • 4. Figure 11.3 A frame in a bit-oriented protocol Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data, so that the receiver does not mistake the pattern 0111110 for a flag. Figure 11.4 Bit stuffing and unstuffing
  • 5. FLOW AND ERROR CONTROL Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Error control in the data link layer is based on automatic repeat request, which is the retransmission of data. • ensure sending entity does not overwhelm receiving entity – by preventing buffer overflow • influenced by: – transmission time • time taken to emit all bits into medium – propagation time • time for a bit to traverse the link • assume here no errors but varying delays Flow Control The most important responsibilities of the data link layer are flow control and error control. Collectively, these functions are known as data link control.
  • 6. Error Control • Detection and correction of errors such as: – lost frames – damaged frames • common techniques use: – error detection – positive acknowledgment – retransmission after timeout – negative acknowledgement & retransmission Automatic Repeat Request (ARQ) • collective name for such error control mechanisms, including: • Stop and Wait • Sliding Window – go back N – selective reject (selective retransmission)
  • 7. 11-3 PROTOCOLS Now let us see how the data link layer can combine framing, flow control, and error control to achieve the delivery of data from one node to another. The protocols are normally implemented in software by using one of the common programming languages.
  • 8. 11-4 NOISELESS CHANNELS Let us first assume we have an ideal channel in which no frames are lost, duplicated, or corrupted. We introduce two protocols for this type of channel.
  • 10. Stop and Wait • source transmits frame • destination receives frame and replies with acknowledgement (ACK) • source waits for ACK before sending next • destination can stop flow by not send ACK • works well for a few large frames • Stop and wait becomes inadequate if large block of data is split into small frames
  • 11. Stop and Wait • pros and cons – simple – inefficient • source transmits single frame • wait for ACK • if received frame damaged, discard it – transmitter has timeout – if no ACK within timeout, retransmit • if ACK damaged,transmitter will not recognize it – transmitter will retransmit – receive gets two copies of frame – use alternate numbering and ACK0 / ACK1
  • 12. Sliding Windows Flow Control • allows multiple numbered frames to be in transit • receiver has buffer W long • transmitter sends up to W frames without ACK • ACK includes number of next frame expected • sequence number is bounded by size of field (k) – frames are numbered modulo 2k – giving max window size of up to 2k - 1 • receiver can ack frames without permitting further transmission (Receive Not Ready) • must send a normal acknowledge to resume • if have full-duplex link, can piggyback ACks
  • 15. Go Back N • based on sliding window • if no error, ACK as usual • use window to control number of outstanding frames • if error, reply with rejection – discard that frame and all future frames until error frame received correctly – transmitter must go back and retransmit that frame and all subsequent frames • Damaged Frame – error in frame i so receiver rejects frame i – transmitter retransmits frames from i • Lost Frame – frame i lost and either • transmitter sends i+1 and receiver gets frame i+1 out of seq and rejects frame i • or transmitter times out and send ACK with P bit set which receiver responds to with ACK i – transmitter then retransmits frames from i
  • 17. Go Back N - Handling • Damaged Acknowledgement – receiver gets frame i, sends ack (i+1) which is lost – acks are cumulative, so next ack (i+n) may arrive before transmitter times out on frame i – if transmitter times out, it sends ack with P bit set – can be repeated a number of times before a reset procedure is initiated • Damaged Rejection – reject for damaged frame is lost – handled as for lost frame when transmitter times out
  • 18. Selective Reject • also called selective retransmission • only rejected frames are retransmitted • subsequent frames are accepted by the receiver and buffered • minimizes retransmission • receiver must maintain large enough buffer • more complex logic in transmitter • hence less widely used • useful for satellite links with long propagation delays
  • 20. Utilization under SW Flow Control • Utilization = U = frame time / total time • U = 1/1+2a • a = Propagation Time / Transmission Time • a = Medium length in bits / Frame length in bits Station s1 sends f1 Station s2 sends an acknowledgment Station s1 sends f2 Station s2 sends an acknowledgment . . . Station s1 sends fn Station s2 sends an acknowledgment CALCULATION OF U
  • 21. • Total time to send the data=T=nTf • Tf=time to send and receive an acknowledgment – Tf=Tframe+Tprop+Tproc+ Tack + Tprop+Tproc • Tprop=propagation time from s1 to s2 • Tframe=time to transmit a frame • Tproc=processing time (negligible) • Tack=time to transmit an acknowledgment(very small as compared to data frame) • T=2Tprop+Tframe • For n frames T=n(2Tprop+Tframe) • Of that time only n x Tframe is actually spent transmitting data and the rest is overhead,therefore the utilization or efficiency of the line is • U= (n x Tframe )/n(2Tprop+Tframe) = Tframe/(2Tprop+Tframe) • If a=Tprop/Tframe then • U=1/(1+2a) CALCULATION OF U
  • 22. Utilization with Sliding Window Flow Control • N > 2a + 1 for • N < 2a + 1 for N 2a + 1 U = U = 1