SlideShare a Scribd company logo
1 of 66
Unit 2 
Data Link Control
Topics to be covered in this unit . . . . . . . . . 
๏ƒ˜ Framing 
๏ƒ˜ Flow Control 
๏ƒ˜ Error Control 
๏ƒ˜ Protocols 
~ for Noiseless ( ideal ) Channels 
~ for Noisy (practical or real ) Channels 
๏ƒ˜ HDLC Protocol
2-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. 
Topics discussed in this section: 
a) Fixed-Size Framing 
[ The size itself acts as delimiter or frame boundary ] 
b) Variable-Size Framing 
[ special character or bit pattern called flag is used as delimiter ]
A frame in a character-oriented protocol 
A frame in a bit-oriented protocol
Byte stuffing and unstuffing 
Note 
Byte stuffing is the process of adding 1 extra byte 
whenever there is a flag or escape character in the text.
Bit stuffing and unstuffing 
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 01111110 for a flag. 
Note
2-2 FLOW AND ERROR 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. 
Topics discussed in this section: 
a) Flow Control 
b) 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 (ARQ), 
which is the retransmission of data.
2-3 PROTOCOLS 
๏ƒ˜ The protocols are normally implemented in software by using one 
of the common programming languages. 
๏ƒ˜To make our discussions language-free, we have written in 
pseudo code a version of each protocol that concentrates mostly on 
the procedure instead of delving into the details of language rules.
2-3 a) NOISELESS CHANNELS 
๏ƒ˜ Let us first assume we have an ideal channel in 
which no frames are lost, duplicated, or corrupted. 
๏ƒ˜ In other words, the channel is error free and as a 
result we donโ€™t require any error control 
mechanism in the corresponding protocols. 
๏ƒ˜ We introduce two protocols for this type of channel. 
Topics discussed in this section: 
a) Simplest Protocol 
b) Stop-and-Wait Protocol
1. Simplest Protocol 
๏ƒ˜We assume that the receiver can immediately handle any frame 
it receives with a processing time that is small enough to be 
negligible. 
๏ƒ˜ In other words, the receiver can never be overwhelmed with 
incoming frames. 
๏ƒ˜ Hence there is no need for flow control in this scheme.
a) Design
b) Algorithms 
Reciever Site Sender Site
c) Flow Diagram [ for Simplest Protocol ]
2. Stop-and-Wait Protocol 
๏ƒ˜ If the data frames arrives at the receiver site faster than they can 
processed, the frames must be stored until their use. 
๏ƒ˜ Normally, the receiver does not have enough storage space, especially 
if it is receiving data from many sources. 
๏ƒ˜ Hence to prevent the receiver from becoming overwhelmed with 
incoming frames, we somehow need to tell the sender to slow down. As 
such there must be feedback from the receiver to the sender. In other 
words we need to employ a flow control mechanism in the protocol. 
๏ƒ˜ Acknowledgement (ACK) frames that are auxiliary frames help in this 
regard. 
๏ƒ˜ The protocol is called Stop-and-Wait protocol because the sender 
sends one frame, stops until it receives confirmation from the receiver 
(okay to go ahead ) and then sends the next frame.
a) Design 
Note :The regions highlighted with red shade indicate additions to the previous protocol.
b) Algorithms 
Sender Site
Receiver Site
c) Flow Diagram [ for Stop & Wait Protocol ]
2-3 b) NOISY CHANNELS 
Although the Stop-and-Wait Protocol gives us an idea 
of how to add flow control to its predecessor, noiseless 
channels are nonexistent. We discuss three protocols 
in this section that use error control. 
Topics discussed in this section: 
a) Stop-and-Wait Automatic Repeat Request 
b) Go-Back-N Automatic Repeat Request 
c) Selective Repeat Automatic Repeat Request
3. Stop-and-Wait ARQ Protocol 
๏ƒ˜ Error correction in Stop-and-Wait ARQ is done by 
keeping a copy of the sent frame and retransmitting of 
the frame when the timer expires. 
๏ƒ˜ In Stop-and-Wait ARQ, we use sequence numbers to 
number the frames. The sequence numbers are based 
on modulo-2 arithmetic. 
๏ƒ˜ In Stop-and-Wait ARQ, the acknowledgment number 
always announces in modulo-2 arithmetic the sequence 
number of the next frame expected.
a) Design
(continued) . . . . . 
b) Algorithm 
Sender Site
(continued) . . . . . .
Receiver Site
c) Flow Diagram 
Data Frame lost in the 
middle of transmission. 
Acknowledgement Frame lost 
in the middle of transmission.
Efficiency & Pipelining 
๏ƒ˜ The Stop & Wait ARQ discussed in the previous section is 
very inefficient if our channel is thick and long. By thick it is 
meant that the channel has a large bandwidth; by long, we 
mean the round-trip delay is long. 
๏ƒ˜ The product of these two is called the bandwidth-delay 
product. The bandwidth-delay product is a measure of the 
number of bits we can send out of our system while waiting 
for news from the receiver. 
๏ƒ˜ Pipelining is a technique in which a task is often begun before 
the previous task has ended. This is known as pipelining. 
๏ƒ˜ If we employ pipelining concept then several frames can be 
sent before we receive news about the previous frames. 
๏ƒ˜ Pipelining improves efficiency of the transmission if the 
number of bits in transition is large with respect to the 
bandwidth-delay product.
Efficiency : 1st Numerical 
1) Assume that, in a Stop-and-Wait ARQ system, the bandwidth of 
the line is 1 Mbps, and 1 bit takes 20 ms to make a round trip. What 
is the bandwidth-delay product? If the system data frames are 1000 
bits in length, what is the utilization percentage of the link? 
Solution 
The bandwidth-delay product is 
The system can send 20,000 bits during the time it takes for the 
data to go from the sender to the receiver and then back again. 
However, the system sends only 1000 bits. We can say that the link 
utilization is only 1000/20,000, or 5 percent. For this reason, for a 
link with a high bandwidth or long delay, the use of Stop-and-Wait 
ARQ wastes the capacity of the link.
Efficiency : 2nd Numerical 
What is the utilization percentage of the link in 
previous numerical example, if we have a protocol that 
can send up to 15 frames before stopping and 
worrying about the acknowledgments? 
Solution 
The bandwidth-delay product is still 20,000 bits. The 
system can send up to 15 frames or 15,000 bits during a 
round trip. This means the utilization is 15,000/20,000, or 
75 percent. Of course, if there are damaged frames, the 
utilization percentage is much less because frames have 
to be resent.
4. Go-Back-N ARQ Protocol 
๏ƒ˜ To improve efficiency of transmission, we should have a 
protocol in which multiple frames must be in transition 
while waiting for acknowledgement. 
๏ƒ˜ In other words, we need to let more than one frame be 
outstanding to keep the channel busy while the sender is 
waiting for acknowledgement. 
๏ƒ˜ Go-Back-N is one such protocol. In this protocol 
we can send several frames before receiving 
acknowledgements; we keep a copy of these frames 
until the acknowledgements arrive.
i) Sequence Numbers 
In the Go-Back-N Protocol, the sequence 
numbers are modulo 2m, where m is the 
size of the sequence number field in bits. 
For example, 
~ if m=2 then the sequence numbers will range from 0 to 3. 
( 0, 1, 2, 3 ) 
~ If m=4 then the sequence numbers will range from 0 to 15. 
( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 )
ii) Windows : 
a) Send Window :
The send window is an abstract concept 
defining an imaginary box of size 2m โˆ’ 1 
with three variables: Sf, Sn, and Ssize. 
The send window can slide one 
or more slots when a valid 
acknowledgment arrives.
b) Receive Window :
The receive window is an abstract concept defining an 
imaginary box of size 1 with one single variable Rn. 
The window slides when a correct frame has arrived; 
sliding occurs one slot at a time.
a) Design 
Multiple Frames
Window size for Go-Back-N ARQ 
Note 
Will work correctly 
Will work erroneously 
In Go-Back-N ARQ, the size of the send window must be less than 2m; 
the size of the receiver window is always 1.
(continued . . . . . . . . ) 
b) Algorithm 
Sender Site
(continued . . . . . . . . . )
Receiver Site 
No significant changes here compared to previous protocol
c) Flow Diagram [ for Example 1 ] 
Acknowledgement Frame-2 lost. 
Note : ACK3 acts as cumulative acknowledgement for both Frames 1 & 2.
Flow Diagram [ for Example 2 ] 
Data Frame lost in the 
middle of transmission. 
Retransmission of 
Frames 1, 2 and 3.
Stop-and-Wait ARQ is a special case of 
Go-Back-N ARQ in which the size of the 
send window is 1. 
Note
5. Selective Repeat ARQ Protocol 
๏ƒ˜ Go-Back-N ARQ simplifies the process at the receiver 
site. The receiver keeps track of only one variable, and 
there is no need to buffer out-of-order frames; they are 
simply discarded. 
๏ƒ˜ However, this protocol is very inefficient for a noisy link. 
In a noisy link a frame has higher probability of damage, 
which means the resending of multiple frames. This 
resending uses up the bandwidth and slows down the 
transmission. 
๏ƒ˜ For noisy links, there is another mechanism that does 
not resend N frames when just one frame is damaged; 
only the damaged frame is resent. This mechanism is 
called Selective Repeat ARQ. It is more efficient for noisy 
links, but processing at the receiver is more complex.
Windows 
a) Send window for Selective Repeat ARQ 
b) Receive window for Selective Repeat ARQ
a) Design
Selective Repeat ARQ, window size 
Will work erroneously 
Will work correctly 
Note : In Selective Repeat ARQ, the size of the sender and 
receiver window must be at most one-half of 2m.
b) Algorithms 
Sender Site 
(continued . . . . . . . . . )
(continued . . . . . . . . . )
Receiver Site 
(continued . . . . . . . . . )
(continued . . . . . . . . . )
Delivery of data in Selective Repeat ARQ
c) Flow diagram 
Data Frame lost in the 
middle of transmission. 
Frame 2 is received and 
NAK is sent for Frame 1 
Note : ACK4 acts as cumulative acknowledgement for Frames 1, 2 and 3.
Design of piggybacking in Go-Back-N ARQ
11-6 HDLC 
High-level Data Link Control (HDLC) is a bit-oriented 
protocol for communication over point-to-point and 
multipoint links. It implements the ARQ mechanisms 
we discussed in this chapter. 
Topics discussed in this section: 
a) Configurations and Transfer Modes 
~ Normal Response Mode [NRM] 
~ Asynchronous Balanced Mode [ABM] 
b) Frames 
c) Control Field
i) Normal Response Mode [ NRM ]
ii) Asynchronous Balanced Mode [ ABM ]
b) HDLC Frames 
11.58
c) Control Field Format ( for the different frame types )
U-frame control command and response
Numerical 1 on connection & disconnection in HDLC 
Figure in the next slide shows how U-frames can be used 
for connection establishment and connection release. 
Node A asks for a connection with a set asynchronous 
balanced mode (SABM) frame; node B gives a positive 
response with an unnumbered acknowledgment (UA) 
frame. After these two exchanges, data can be transferred 
between the two nodes (not shown in the figure). After 
data transfer, node A sends a DISC (disconnect) frame to 
release the connection; it is confirmed by node B 
responding with a UA (unnumbered acknowledgment).
Example of connection and disconnection
Numerical 2 on piggybacking without error in HDLC 
Figure in the next slide shows an exchange using piggybacking. Node 
A begins the exchange of information with an I-frame numbered 0 
followed by another I-frame numbered 1. Node B piggybacks its 
acknowledgment of both frames onto an I-frame of its own. Node Bโ€™s 
first I-frame is also numbered 0 [N(S) field] and contains a 2 in its 
N(R) field, acknowledging the receipt of Aโ€™s frames 1 and 0 and 
indicating that it expects frame 2 to arrive next. Node B transmits its 
second and third I-frames (numbered 1 and 2) before accepting 
further frames from node A. Its N(R) information, therefore, has not 
changed: B frames 1 and 2 indicate that node B is still expecting Aโ€™s 
frame 2 to arrive next. Node A has sent all its data. Therefore, it 
cannot piggyback an acknowledgment onto an I-frame and sends an 
S-frame instead. The RR code indicates that A is still ready to receive. 
The number 3 in the N(R) field tells B that frames 0, 1, and 2 have all 
been accepted and that A is now expecting frame number 3.
Example of piggybacking without error
Numerical 3 on piggybacking with error in HDLC 
Figure in the next slide shows an exchange in which a 
frame is lost. Node B sends three data frames (0, 1, and 
2), but frame 1 is lost. When node A receives frame 2, it 
discards it and sends a REJ frame for frame 1. Note that 
the protocol being used is Go-Back-N with the special use 
of an REJ frame as a NAK frame. The NAK frame does 
two things here: It confirms the receipt of frame 0 and 
declares that frame 1 and any following frames must be 
resent. Node B, after receiving the REJ frame, resends 
frames 1 and 2. Node A acknowledges the receipt by 
sending an RR frame (ACK) with acknowledgment 
number 3.
Example of piggybacking with error

More Related Content

What's hot

What's hot (20)

Network layer - design Issues
Network layer - design IssuesNetwork layer - design Issues
Network layer - design Issues
ย 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
ย 
Stop and-wait protocol
Stop and-wait protocolStop and-wait protocol
Stop and-wait protocol
ย 
Network Layer design Issues.pptx
Network Layer design Issues.pptxNetwork Layer design Issues.pptx
Network Layer design Issues.pptx
ย 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
ย 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
ย 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
ย 
Computer network switching
Computer network switchingComputer network switching
Computer network switching
ย 
ATM Networking Concept
ATM Networking ConceptATM Networking Concept
ATM Networking Concept
ย 
Flow control in Computer Network
Flow control in Computer NetworkFlow control in Computer Network
Flow control in Computer Network
ย 
HDLC
HDLCHDLC
HDLC
ย 
Error control
Error controlError control
Error control
ย 
Issues in Data Link Layer
Issues in Data Link LayerIssues in Data Link Layer
Issues in Data Link Layer
ย 
Go back-n protocol
Go back-n protocolGo back-n protocol
Go back-n protocol
ย 
ALOHA Protocol (in detail)
ALOHA Protocol (in detail)ALOHA Protocol (in detail)
ALOHA Protocol (in detail)
ย 
Congestion control
Congestion controlCongestion control
Congestion control
ย 
Guided Transmission Media
Guided Transmission MediaGuided Transmission Media
Guided Transmission Media
ย 
Multiplexing
MultiplexingMultiplexing
Multiplexing
ย 
Selective repeat protocol
Selective repeat protocolSelective repeat protocol
Selective repeat protocol
ย 
Congestion control
Congestion controlCongestion control
Congestion control
ย 

Viewers also liked

Chapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9eChapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9e
adpeer
ย 
Pulse modulation (pam)
Pulse modulation (pam)Pulse modulation (pam)
Pulse modulation (pam)
Vishal kakade
ย 
Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20
koolkampus
ย 
Go Back N ARQ
Go  Back N ARQGo  Back N ARQ
Go Back N ARQ
guesta1b35273
ย 
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
ย 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
tameemyousaf
ย 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
mekind
ย 
02 Network Models(๊ฐ•์˜์šฉ)
02 Network Models(๊ฐ•์˜์šฉ)02 Network Models(๊ฐ•์˜์šฉ)
02 Network Models(๊ฐ•์˜์šฉ)
guestafa80f
ย 

Viewers also liked (20)

Data link control protocol(1)
Data link control protocol(1)Data link control protocol(1)
Data link control protocol(1)
ย 
Data link control
Data link controlData link control
Data link control
ย 
Data link control & protocol concepts
Data link control & protocol conceptsData link control & protocol concepts
Data link control & protocol concepts
ย 
14 data link control
14 data link control14 data link control
14 data link control
ย 
Chapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9eChapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9e
ย 
Data link layer
Data link layer Data link layer
Data link layer
ย 
The Data Link Layer
The Data Link LayerThe Data Link Layer
The Data Link Layer
ย 
Pulse modulation (pam)
Pulse modulation (pam)Pulse modulation (pam)
Pulse modulation (pam)
ย 
Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20
ย 
Unit 1 network models & typical examples(part a)
Unit 1 network models & typical examples(part a)Unit 1 network models & typical examples(part a)
Unit 1 network models & typical examples(part a)
ย 
Go Back N ARQ
Go  Back N ARQGo  Back N ARQ
Go Back N ARQ
ย 
Data link control protocol(2)
Data link control protocol(2)Data link control protocol(2)
Data link control protocol(2)
ย 
Ccn(Data communication and networking) edited solution-manual suitable to be ...
Ccn(Data communication and networking) edited solution-manual suitable to be ...Ccn(Data communication and networking) edited solution-manual suitable to be ...
Ccn(Data communication and networking) edited solution-manual suitable to be ...
ย 
HDLC(high level data link control)
HDLC(high level data link control)HDLC(high level data link control)
HDLC(high level data link control)
ย 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
ย 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
ย 
Dcn unit 2 ppt
Dcn unit 2 pptDcn unit 2 ppt
Dcn unit 2 ppt
ย 
Physical Layer Numericals - Data Communication & Networking
Physical Layer  Numericals - Data Communication & NetworkingPhysical Layer  Numericals - Data Communication & Networking
Physical Layer Numericals - Data Communication & Networking
ย 
02 Network Models(๊ฐ•์˜์šฉ)
02 Network Models(๊ฐ•์˜์šฉ)02 Network Models(๊ฐ•์˜์šฉ)
02 Network Models(๊ฐ•์˜์šฉ)
ย 
Usb
UsbUsb
Usb
ย 

Similar to Unit 2 data link control

Nigga.pdf
Nigga.pdfNigga.pdf
Nigga.pdf
pdegree76
ย 
stop and wait
stop and waitstop and wait
stop and wait
swati463221
ย 
CN UNIT-3 PPT R20 computer networks .pptx
CN UNIT-3 PPT R20 computer networks .pptxCN UNIT-3 PPT R20 computer networks .pptx
CN UNIT-3 PPT R20 computer networks .pptx
SrinuM21
ย 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
NYversity
ย 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
k2w9psdb96
ย 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
Nitesh Singh
ย 

Similar to Unit 2 data link control (20)

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
ย 
Chapter 11: Data Link Control
Chapter 11: Data Link ControlChapter 11: Data Link Control
Chapter 11: Data Link Control
ย 
Datalink control(framing,protocols)
Datalink control(framing,protocols)Datalink control(framing,protocols)
Datalink control(framing,protocols)
ย 
go back n protocol
go back n protocolgo back n protocol
go back n protocol
ย 
Nigga.pdf
Nigga.pdfNigga.pdf
Nigga.pdf
ย 
Importance of sliding window protocol
Importance of sliding window protocolImportance of sliding window protocol
Importance of sliding window protocol
ย 
Importance of sliding window protocol
Importance of sliding window protocolImportance of sliding window protocol
Importance of sliding window protocol
ย 
3a data link layer
3a data link layer 3a data link layer
3a data link layer
ย 
Unit IV_Flow.pptx
Unit IV_Flow.pptxUnit IV_Flow.pptx
Unit IV_Flow.pptx
ย 
stop and wait
stop and waitstop and wait
stop and wait
ย 
CN UNIT-3 PPT R20 computer networks .pptx
CN UNIT-3 PPT R20 computer networks .pptxCN UNIT-3 PPT R20 computer networks .pptx
CN UNIT-3 PPT R20 computer networks .pptx
ย 
Transport layer
Transport layerTransport layer
Transport layer
ย 
Data link layer (Unit 2).pdf
Data link layer (Unit 2).pdfData link layer (Unit 2).pdf
Data link layer (Unit 2).pdf
ย 
Protocols
ProtocolsProtocols
Protocols
ย 
Data link layer
Data link layerData link layer
Data link layer
ย 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
ย 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
ย 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
ย 
Data link layer
Data link layerData link layer
Data link layer
ย 

More from Vishal kakade

Pulse amplitude modulation
Pulse amplitude modulationPulse amplitude modulation
Pulse amplitude modulation
Vishal kakade
ย 
Pulse amplitude modulation & demodulation
Pulse amplitude modulation & demodulationPulse amplitude modulation & demodulation
Pulse amplitude modulation & demodulation
Vishal kakade
ย 
Pulse amplitude modulation
Pulse amplitude modulationPulse amplitude modulation
Pulse amplitude modulation
Vishal kakade
ย 
Analog communications lab
Analog communications labAnalog communications lab
Analog communications lab
Vishal kakade
ย 
Analog communications lab
Analog communications labAnalog communications lab
Analog communications lab
Vishal kakade
ย 
A new precision peak detector full wave rectifier
A new precision peak detector full wave rectifierA new precision peak detector full wave rectifier
A new precision peak detector full wave rectifier
Vishal kakade
ย 
Power and authority
Power and authorityPower and authority
Power and authority
Vishal kakade
ย 
Power and authority
Power and authority Power and authority
Power and authority
Vishal kakade
ย 
Entrepreneurship
EntrepreneurshipEntrepreneurship
Entrepreneurship
Vishal kakade
ย 
Small scale industry
Small scale industrySmall scale industry
Small scale industry
Vishal kakade
ย 
Project management
Project managementProject management
Project management
Vishal kakade
ย 
Principles of management
Principles of managementPrinciples of management
Principles of management
Vishal kakade
ย 
Organization
OrganizationOrganization
Organization
Vishal kakade
ย 
Management fundamentals
Management fundamentalsManagement fundamentals
Management fundamentals
Vishal kakade
ย 
Management basics
Management basicsManagement basics
Management basics
Vishal kakade
ย 

More from Vishal kakade (20)

Unit 0 introduction
Unit 0 introductionUnit 0 introduction
Unit 0 introduction
ย 
Unit 1 network models & typical examples(part b)
Unit 1 network models & typical examples(part b)Unit 1 network models & typical examples(part b)
Unit 1 network models & typical examples(part b)
ย 
Pulse amplitude modulation
Pulse amplitude modulationPulse amplitude modulation
Pulse amplitude modulation
ย 
Pulse amplitude modulation & demodulation
Pulse amplitude modulation & demodulationPulse amplitude modulation & demodulation
Pulse amplitude modulation & demodulation
ย 
Pulse amplitude modulation
Pulse amplitude modulationPulse amplitude modulation
Pulse amplitude modulation
ย 
Analog communications lab
Analog communications labAnalog communications lab
Analog communications lab
ย 
Analog communications lab
Analog communications labAnalog communications lab
Analog communications lab
ย 
A new precision peak detector full wave rectifier
A new precision peak detector full wave rectifierA new precision peak detector full wave rectifier
A new precision peak detector full wave rectifier
ย 
VLSI subsystem design processes
VLSI  subsystem design processes VLSI  subsystem design processes
VLSI subsystem design processes
ย 
VLSI subsystem design processes and illustration
VLSI subsystem design processes and illustrationVLSI subsystem design processes and illustration
VLSI subsystem design processes and illustration
ย 
VLSI circuit design process
VLSI circuit design processVLSI circuit design process
VLSI circuit design process
ย 
Power and authority
Power and authorityPower and authority
Power and authority
ย 
Power and authority
Power and authority Power and authority
Power and authority
ย 
Entrepreneurship
EntrepreneurshipEntrepreneurship
Entrepreneurship
ย 
Small scale industry
Small scale industrySmall scale industry
Small scale industry
ย 
Project management
Project managementProject management
Project management
ย 
Principles of management
Principles of managementPrinciples of management
Principles of management
ย 
Organization
OrganizationOrganization
Organization
ย 
Management fundamentals
Management fundamentalsManagement fundamentals
Management fundamentals
ย 
Management basics
Management basicsManagement basics
Management basics
ย 

Recently uploaded

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
ย 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
sivaprakash250
ย 
Call Girls in Netaji Nagar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Netaji Nagar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Netaji Nagar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Netaji Nagar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 

Recently uploaded (20)

Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
ย 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
ย 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
ย 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
ย 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
ย 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ย 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
ย 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ย 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
ย 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
ย 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
ย 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
ย 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
ย 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
ย 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
ย 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
ย 
Call Girls in Netaji Nagar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Netaji Nagar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Netaji Nagar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Netaji Nagar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
ย 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
ย 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
ย 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
ย 

Unit 2 data link control

  • 1. Unit 2 Data Link Control
  • 2. Topics to be covered in this unit . . . . . . . . . ๏ƒ˜ Framing ๏ƒ˜ Flow Control ๏ƒ˜ Error Control ๏ƒ˜ Protocols ~ for Noiseless ( ideal ) Channels ~ for Noisy (practical or real ) Channels ๏ƒ˜ HDLC Protocol
  • 3. 2-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. Topics discussed in this section: a) Fixed-Size Framing [ The size itself acts as delimiter or frame boundary ] b) Variable-Size Framing [ special character or bit pattern called flag is used as delimiter ]
  • 4. A frame in a character-oriented protocol A frame in a bit-oriented protocol
  • 5. Byte stuffing and unstuffing Note Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape character in the text.
  • 6. Bit stuffing and unstuffing 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 01111110 for a flag. Note
  • 7. 2-2 FLOW AND ERROR 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. Topics discussed in this section: a) Flow Control b) Error Control
  • 8. 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 (ARQ), which is the retransmission of data.
  • 9. 2-3 PROTOCOLS ๏ƒ˜ The protocols are normally implemented in software by using one of the common programming languages. ๏ƒ˜To make our discussions language-free, we have written in pseudo code a version of each protocol that concentrates mostly on the procedure instead of delving into the details of language rules.
  • 10. 2-3 a) NOISELESS CHANNELS ๏ƒ˜ Let us first assume we have an ideal channel in which no frames are lost, duplicated, or corrupted. ๏ƒ˜ In other words, the channel is error free and as a result we donโ€™t require any error control mechanism in the corresponding protocols. ๏ƒ˜ We introduce two protocols for this type of channel. Topics discussed in this section: a) Simplest Protocol b) Stop-and-Wait Protocol
  • 11. 1. Simplest Protocol ๏ƒ˜We assume that the receiver can immediately handle any frame it receives with a processing time that is small enough to be negligible. ๏ƒ˜ In other words, the receiver can never be overwhelmed with incoming frames. ๏ƒ˜ Hence there is no need for flow control in this scheme.
  • 13. b) Algorithms Reciever Site Sender Site
  • 14. c) Flow Diagram [ for Simplest Protocol ]
  • 15. 2. Stop-and-Wait Protocol ๏ƒ˜ If the data frames arrives at the receiver site faster than they can processed, the frames must be stored until their use. ๏ƒ˜ Normally, the receiver does not have enough storage space, especially if it is receiving data from many sources. ๏ƒ˜ Hence to prevent the receiver from becoming overwhelmed with incoming frames, we somehow need to tell the sender to slow down. As such there must be feedback from the receiver to the sender. In other words we need to employ a flow control mechanism in the protocol. ๏ƒ˜ Acknowledgement (ACK) frames that are auxiliary frames help in this regard. ๏ƒ˜ The protocol is called Stop-and-Wait protocol because the sender sends one frame, stops until it receives confirmation from the receiver (okay to go ahead ) and then sends the next frame.
  • 16. a) Design Note :The regions highlighted with red shade indicate additions to the previous protocol.
  • 19. c) Flow Diagram [ for Stop & Wait Protocol ]
  • 20. 2-3 b) NOISY CHANNELS Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are nonexistent. We discuss three protocols in this section that use error control. Topics discussed in this section: a) Stop-and-Wait Automatic Repeat Request b) Go-Back-N Automatic Repeat Request c) Selective Repeat Automatic Repeat Request
  • 21. 3. Stop-and-Wait ARQ Protocol ๏ƒ˜ Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame and retransmitting of the frame when the timer expires. ๏ƒ˜ In Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic. ๏ƒ˜ In Stop-and-Wait ARQ, the acknowledgment number always announces in modulo-2 arithmetic the sequence number of the next frame expected.
  • 23. (continued) . . . . . b) Algorithm Sender Site
  • 24. (continued) . . . . . .
  • 26. c) Flow Diagram Data Frame lost in the middle of transmission. Acknowledgement Frame lost in the middle of transmission.
  • 27. Efficiency & Pipelining ๏ƒ˜ The Stop & Wait ARQ discussed in the previous section is very inefficient if our channel is thick and long. By thick it is meant that the channel has a large bandwidth; by long, we mean the round-trip delay is long. ๏ƒ˜ The product of these two is called the bandwidth-delay product. The bandwidth-delay product is a measure of the number of bits we can send out of our system while waiting for news from the receiver. ๏ƒ˜ Pipelining is a technique in which a task is often begun before the previous task has ended. This is known as pipelining. ๏ƒ˜ If we employ pipelining concept then several frames can be sent before we receive news about the previous frames. ๏ƒ˜ Pipelining improves efficiency of the transmission if the number of bits in transition is large with respect to the bandwidth-delay product.
  • 28. Efficiency : 1st Numerical 1) Assume that, in a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 ms to make a round trip. What is the bandwidth-delay product? If the system data frames are 1000 bits in length, what is the utilization percentage of the link? Solution The bandwidth-delay product is The system can send 20,000 bits during the time it takes for the data to go from the sender to the receiver and then back again. However, the system sends only 1000 bits. We can say that the link utilization is only 1000/20,000, or 5 percent. For this reason, for a link with a high bandwidth or long delay, the use of Stop-and-Wait ARQ wastes the capacity of the link.
  • 29. Efficiency : 2nd Numerical What is the utilization percentage of the link in previous numerical example, if we have a protocol that can send up to 15 frames before stopping and worrying about the acknowledgments? Solution The bandwidth-delay product is still 20,000 bits. The system can send up to 15 frames or 15,000 bits during a round trip. This means the utilization is 15,000/20,000, or 75 percent. Of course, if there are damaged frames, the utilization percentage is much less because frames have to be resent.
  • 30. 4. Go-Back-N ARQ Protocol ๏ƒ˜ To improve efficiency of transmission, we should have a protocol in which multiple frames must be in transition while waiting for acknowledgement. ๏ƒ˜ In other words, we need to let more than one frame be outstanding to keep the channel busy while the sender is waiting for acknowledgement. ๏ƒ˜ Go-Back-N is one such protocol. In this protocol we can send several frames before receiving acknowledgements; we keep a copy of these frames until the acknowledgements arrive.
  • 31. i) Sequence Numbers In the Go-Back-N Protocol, the sequence numbers are modulo 2m, where m is the size of the sequence number field in bits. For example, ~ if m=2 then the sequence numbers will range from 0 to 3. ( 0, 1, 2, 3 ) ~ If m=4 then the sequence numbers will range from 0 to 15. ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 )
  • 32. ii) Windows : a) Send Window :
  • 33. The send window is an abstract concept defining an imaginary box of size 2m โˆ’ 1 with three variables: Sf, Sn, and Ssize. The send window can slide one or more slots when a valid acknowledgment arrives.
  • 35. The receive window is an abstract concept defining an imaginary box of size 1 with one single variable Rn. The window slides when a correct frame has arrived; sliding occurs one slot at a time.
  • 37. Window size for Go-Back-N ARQ Note Will work correctly Will work erroneously In Go-Back-N ARQ, the size of the send window must be less than 2m; the size of the receiver window is always 1.
  • 38. (continued . . . . . . . . ) b) Algorithm Sender Site
  • 39. (continued . . . . . . . . . )
  • 40. Receiver Site No significant changes here compared to previous protocol
  • 41. c) Flow Diagram [ for Example 1 ] Acknowledgement Frame-2 lost. Note : ACK3 acts as cumulative acknowledgement for both Frames 1 & 2.
  • 42. Flow Diagram [ for Example 2 ] Data Frame lost in the middle of transmission. Retransmission of Frames 1, 2 and 3.
  • 43. Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in which the size of the send window is 1. Note
  • 44. 5. Selective Repeat ARQ Protocol ๏ƒ˜ Go-Back-N ARQ simplifies the process at the receiver site. The receiver keeps track of only one variable, and there is no need to buffer out-of-order frames; they are simply discarded. ๏ƒ˜ However, this protocol is very inefficient for a noisy link. In a noisy link a frame has higher probability of damage, which means the resending of multiple frames. This resending uses up the bandwidth and slows down the transmission. ๏ƒ˜ For noisy links, there is another mechanism that does not resend N frames when just one frame is damaged; only the damaged frame is resent. This mechanism is called Selective Repeat ARQ. It is more efficient for noisy links, but processing at the receiver is more complex.
  • 45. Windows a) Send window for Selective Repeat ARQ b) Receive window for Selective Repeat ARQ
  • 47. Selective Repeat ARQ, window size Will work erroneously Will work correctly Note : In Selective Repeat ARQ, the size of the sender and receiver window must be at most one-half of 2m.
  • 48. b) Algorithms Sender Site (continued . . . . . . . . . )
  • 49. (continued . . . . . . . . . )
  • 50. Receiver Site (continued . . . . . . . . . )
  • 51. (continued . . . . . . . . . )
  • 52. Delivery of data in Selective Repeat ARQ
  • 53. c) Flow diagram Data Frame lost in the middle of transmission. Frame 2 is received and NAK is sent for Frame 1 Note : ACK4 acts as cumulative acknowledgement for Frames 1, 2 and 3.
  • 54. Design of piggybacking in Go-Back-N ARQ
  • 55. 11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the ARQ mechanisms we discussed in this chapter. Topics discussed in this section: a) Configurations and Transfer Modes ~ Normal Response Mode [NRM] ~ Asynchronous Balanced Mode [ABM] b) Frames c) Control Field
  • 56. i) Normal Response Mode [ NRM ]
  • 58. b) HDLC Frames 11.58
  • 59. c) Control Field Format ( for the different frame types )
  • 60. U-frame control command and response
  • 61. Numerical 1 on connection & disconnection in HDLC Figure in the next slide shows how U-frames can be used for connection establishment and connection release. Node A asks for a connection with a set asynchronous balanced mode (SABM) frame; node B gives a positive response with an unnumbered acknowledgment (UA) frame. After these two exchanges, data can be transferred between the two nodes (not shown in the figure). After data transfer, node A sends a DISC (disconnect) frame to release the connection; it is confirmed by node B responding with a UA (unnumbered acknowledgment).
  • 62. Example of connection and disconnection
  • 63. Numerical 2 on piggybacking without error in HDLC Figure in the next slide shows an exchange using piggybacking. Node A begins the exchange of information with an I-frame numbered 0 followed by another I-frame numbered 1. Node B piggybacks its acknowledgment of both frames onto an I-frame of its own. Node Bโ€™s first I-frame is also numbered 0 [N(S) field] and contains a 2 in its N(R) field, acknowledging the receipt of Aโ€™s frames 1 and 0 and indicating that it expects frame 2 to arrive next. Node B transmits its second and third I-frames (numbered 1 and 2) before accepting further frames from node A. Its N(R) information, therefore, has not changed: B frames 1 and 2 indicate that node B is still expecting Aโ€™s frame 2 to arrive next. Node A has sent all its data. Therefore, it cannot piggyback an acknowledgment onto an I-frame and sends an S-frame instead. The RR code indicates that A is still ready to receive. The number 3 in the N(R) field tells B that frames 0, 1, and 2 have all been accepted and that A is now expecting frame number 3.
  • 64. Example of piggybacking without error
  • 65. Numerical 3 on piggybacking with error in HDLC Figure in the next slide shows an exchange in which a frame is lost. Node B sends three data frames (0, 1, and 2), but frame 1 is lost. When node A receives frame 2, it discards it and sends a REJ frame for frame 1. Note that the protocol being used is Go-Back-N with the special use of an REJ frame as a NAK frame. The NAK frame does two things here: It confirms the receipt of frame 0 and declares that frame 1 and any following frames must be resent. Node B, after receiving the REJ frame, resends frames 1 and 2. Node A acknowledges the receipt by sending an RR frame (ACK) with acknowledgment number 3.