SlideShare a Scribd company logo
Unit III - Data Link Layer
Computer Network
Dr. S.Murugan
Associate Professor, Department of Computer Science.
Alagappa Government Arts College,
(Affiliated by Alagappa University)
Karaikudi.
Email: muruganjit@gmail.com
1
This slides compiled from
Computer Network by
Andrew S. Tenenbaum 4th Ed.
Ch.3 The Data Link Layer
➢ This study deals with the algorithms for
achieving reliable, efficient communication
between two adjacent machines at the data link
layer.
➢ The essential property of a channel that makes
it ''wirelike'' is that the bits are delivered in
exactly the same order in which they are sent
3.1 Data Link Layer Design Issues
➢ The data link layer has a number of specific
functions, it can carry out. These functions include
1. Providing a well-defined service interface
to the network layer.
2. Dealing with transmission errors.
3. Regulating the flow of data so that slow
receivers are not swamped by fast senders.
Data Link Layer Design Issues
➢ To accomplish these goals, the data link layer takes
the packets it gets from the network layer and
encapsulates them into frames for transmission.
➢ Each frame contains a frame header, a payload field
for holding the packet, and a frame trailer, as
illustrated in Fig. 3-1.
Services Provided to the Network Layer
➢ The function of the data link layer is to provide
services to the network layer.
➢ The principal service is transferring data from the
network layer on the source machine to the network
layer on the destination machine as shown in
Fig. 3-2(a).
➢ The actual transmission follows the path of Fig. 3-2(b).
Services Provided to the Network Layer
Services Provided to the Network Layer
➢ The data link layer can be designed to offer various
services.
➢ Three reasonable possibilities that are commonly
provided are
1. Unacknowledged connectionless service.
2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service.
➢ The source machine send independent frames to the
destination machine without having the destination
machine acknowledgement.
Services Provided to the Network Layer
➢ The acknowledged connectionless service is offered,
there are still no logical connections used, but each
frame sent is individually acknowledged.
➢ In this way, the sender knows whether a frame has
arrived correctly.
➢ If it has not arrived within a specified time interval,
it can be sent again.
Services Provided to the Network Layer
➢ When connection-oriented service is used, transfers
go through three distinct phases.
➢ In the first phase, the connection is established by
having both sides initialize variables and counters
needed to keep track of which frames have been
received and which ones have not.
➢ the second phase, one or more frames are actually
transmitted.
➢ In the third and final phase, the connection is released,
freeing up the variables, buffers, and other resources
used to maintain the connection.
Framing
➢ To provide service to the network layer, the data link
layer must use the service provided to it by the
physical layer.
➢ The data link layer to break the bit stream up into
discrete frames and compute the checksum for each
frame.
➢ If the newly-computed checksum is different from the
one contained in the frame, the data link layer knows
that an error has occurred and takes steps to deal with
it.
Framing
➢ The following four methods used to compute
checksum error.
1. Character count.
2. Flag bytes with byte stuffing.
3. Starting and ending flags, with bit stuffing.
4. Physical layer coding violations.
Framing - Character count
➢ The first framing method uses a field in the header to
specify the number of characters in the frame.
➢ When the data link layer at the destination sees the
character count, it knows how many characters follow
and hence where the end of the frame is.
➢ This technique is shown in Fig. 3-4(a) for four frames
of sizes 5, 5, 8, and 8 characters, respectively.
Framing - Character count
➢ In Fig 3-4 (b) character count of 5 in the second frame
becomes a 7. It is considered as an error.
➢ The destination will get out of synchronization and will be
unable to locate the start of the next frame.
Framing - Byte stuffing or character stuffing
➢ The second framing method, each frame contains start and
end with a flag byte as shown in Fig. 3-5(a).
Framing - Byte stuffing or character stuffing
➢ A serious problem occurs with this method when
binary data, such as object programs or floating-
point numbers, are being transmitted.
➢ To solve this problem, the sender's data link layer
insert a special escape byte (ESC) just before each
''accidental'' flag byte in the data.
➢ The data link layer on the receiving end removes
the escape byte before the data are given to the
network layer.
➢ This technique is called byte stuffing or character
stuffing. Some examples are shown in Fig. 3-5(b).
Framing - Byte stuffing or character stuffing
Framing - Bit stuffing
➢ Each frame begins and ends with a special bit
pattern, 01111110 (in fact, a flag byte).
➢ Whenever the sender's data link layer encounters
five consecutive 1s in the data, it automatically
stuffs a 0 bit into the outgoing bit stream.
➢ When the receiver sees five consecutive incoming 1
bits, followed by a 0 bit, it automatically destuffs
(i.e.,deletes) the 0 bit.
➢ This techniques is called bit stuffing.
➢ For example, If the user data contain the flag
pattern, 01111110, this flag is transmitted as
011111010 but stored in the receiver's memory as
01111110. Figure 3-6 gives an example of bit
stuffing.
Framing - Bit stuffing
Framing - Physical layer coding violations
➢ The last method of framing is only applicable to
networks in which the encoding on the physical
medium contains some redundancy.
➢ For example, some LANs encode 1 bit of data by
using 2 physical bits.
➢ Normally, a 1 bit is a high-low pair and a 0 bit is a
low-high pair.
➢ The combinations high-high and low-low are not
used for data, but are used for delimiting frames in
some protocols.
Error Control
➢ Error control determines how to make sure all
frames are eventually delivered to the network layer
at the destination and in the proper order.
➢ In connection oriented service, If the sender
receives a positive acknowledgement about a frame,
it knows the frame has arrived safely.
➢ On the other hand, a negative acknowledgement
means that something has gone wrong, and the
frame must be transmitted again.
Error Control
➢ When the sender transmits a frame, it generally also
starts a timer.
➢ If either the frame or the acknowledgement is lost,
the timer will go off, alerting the sender to a
potential problem. The solution is to just transmit
the frame again.
➢ When frames may be transmitted multiple times
there is a danger that the receiver will accept the
same frame two or more times and pass it to the
network layer more than once.
➢ To prevent this from happening, it is generally
necessary to assign sequence numbers to outgoing
frames, so that the receiver can distinguish
retransmissions from originals.
Flow Control
➢ Another important design issue in the data link
layer is, sender that systematically wants to transmit
frames faster than the receiver can accept them.
➢ This situation can easily occur when the sender is
running on a fast (or lightly loaded) computer and
the receiver is running on a slow (or heavily loaded)
machine.
➢ Two approaches are commonly used to solve the
above issue.
Flow Control
➢ In the first one, feedback-based flow control, the
receiver sends back information to the sender
giving it permission to send more data.
➢ In the second one, rate-based flow control, the
protocol has a automatic built-in mechanism that
limits the rate at which senders may transmit data,
without using feedback from the receiver.
3.2 Error Detection and Correction
➢ Error is a condition when the output information
does not match with the input information.
➢ During transmission, digital signals suffer from
noise that can introduce errors in the binary bits
travelling from one system to another.
➢ That means a 0 bit may change to 1 or a 1 bit may
change to 0.
3.2.1 Error Detecting Codes - Simple Parity check
➢ Whenever a message is transmitted, it may get
scrambled by noise or data may get corrupted.
➢ To avoid this, we use error-detecting codes which are
additional data added to a given digital message to
help us detect if any error has occurred during
transmission of the message.
3.2.1 Error Detecting Codes - Simple Parity check
➢ Blocks of data from the source are subject to a check
bit or parity bit generator form, where a parity of :
➢ 1 is added to the block if it contains odd number of
1’s, and
➢ 0 is added if it contains even number of 1’s
3.2.1 Error Detecting Codes - Simple Parity check
➢ It is a simple error-checking method used in data communication. Parity
checking helps detect errors in data transmission. If the parity bit doesn't
match the expected value, it indicates an error in the received data.
1.Sender Side:
1. The sender has a binary data sequence: 100011.
2. It computes a parity bit to ensure even parity (total number of 1s is
even).
3. Since there are three 1s (odd count), an extra 1 is added to make it
even.
4. The final transmitted data: 1000111.
2.Transmission:
1. The data is sent through the communication channel.
3.Receiver Side:
1. The receiver receives 1000111.
2. It also computes the parity to check if the number of 1s is even.
3. If even → Data is accepted.
4. If odd → Data is rejected (error detected).
3.2.2 Error-Detecting Codes (Polynomial or Cyclic
Redundancy Check)
➢ In CRC (, a sequence of redundant bits, called cyclic
redundancy check bits, are appended to the end of
data unit so that the resulting data unit becomes
exactly divisible by a second predetermined binary
number.
➢ At the destination, the incoming data unit is divided
by the same number. If at this step there is no
remainder, the data unit is assumed to be correct and
is therefore accepted.
➢ A remainder indicates that the data unit has been
damaged in transmit and therefore must be rejected.
3.2.2 Error-Detecting Codes (Polynomial or Cyclic
Redundancy Check)
3.2.2 Error-Detecting Codes (Polynomial or Cyclic
Redundancy Check)
CRC Workflow (Sender and Receiver)
This image outlines the process of CRC error detection through a flowchart:
Sender Side:
1. Data Preparation:
o A data message of m bits is taken.
o n-1 zeros are appended to the message (where n is the length of the CRC
generator polynomial).
2. Division:
o The modified message (with zeros) is divided by the CRC generator (divisor),
typically a fixed binary polynomial.
o This division is performed using binary modulo-2 division (similar to XOR).
3. CRC (Remainder):
o The result of the division is the remainder (n bits), referred to as the CRC.
o This CRC is appended to the original message and transmitted.
3.2.2 Error-Detecting Codes (Polynomial or Cyclic
Redundancy Check)
Receiver Side:
1. Verification:
o Upon receiving the data, the receiver splits it into the original message
and the appended CRC.
o The entire received sequence is divided again by the same divisor.
2. Check for Errors:
o If the remainder (result of division) is zero, the data is considered error-
free and accepted.
If the remainder is non-zero, the data is rejected due to errors during
transmission.
3.2.2 Error-Detecting Codes (Polynomial or Cyclic
Redundancy Check)
3.2.2 Error-Detecting Codes (Polynomial or Cyclic Redundancy Check)
This example demonstrates the process in numbers with the following:
Given Inputs:
1. Original Message: 1010000
2. Generator Polynomial: x3+1 => 1*x3 + 0* x2*+ 0*x1x + 1 (binary: 1001)
Sender's Process:
1. Append Zeros:
o Append n-1 zeros (3 zeros for a 4-bit generator) to the original message:
1010000 → 1010000000.
2. Binary Division:
o Perform modulo-2 division of 1010000000 by 1001.
o XOR is used instead of subtraction:
▪ Step-by-step division shown in the image.
o The remainder is 011.
3. Transmit Data:
o Append the remainder (011) to the original message: 1010000 + 011 →
1010000011.
3.2.2 Error-Detecting Codes (Polynomial or Cyclic Redundancy Check)
Receiver's Process:
1. Received Data:
o Receiver gets 1010000011.
2. Verification:
o Perform modulo-2 division of 1010000011 by 1001.
o The division results in a remainder of 000.
3. Conclusion:
o A remainder of zero indicates the data is error-free and accepted.
Summary:
• CRC ensures data integrity by appending a calculated remainder (CRC) to the
transmitted data.
• At the receiver, division is repeated to verify correctness.
• Advantages:
o Efficient error detection for large datasets.
o Simple to implement with hardware or software.
• Limitation: Cannot correct errors; it only detects them.
Hamming Code
➢ Hamming code is a set of error-correction code s
that can be used to detect and correct bit errors that
can occur when computer data is moved or stored.
➢ To enable this, a transmitting station must add extra
data (called error correction bits ) to the
transmission.
3.3 Elementary Data Link Protocols
➢ Assume the following…
➢ The physical layer, data link layer, and network layer
are independent processes that communicate by
passing messages back and forth.
➢ Machine A wants to send a long stream of data to
Machine B, using a reliable, connection-oriented
service.
➢ B also wants to send data to A Simultaneously.
➢ Machines do not crash.
Elementary Data Link Protocols
3.3 Elementary Data Link Protocols
➢ Figure 3-9 shows some declarations (in C) common to
many of the protocols.
➢ Five data structures are defined: boolean, seq_nr,
packet, frame_kind, and frame.
➢ A boolean is an enumerated type and can take on the
values true and false.
➢ A seq_nr is a small integer used to number the frames.
These sequence numbers run from 0 up to and
including MAX_SEQ.
3.3 Elementary Data Link Protocols
➢ A packet is the unit of information exchanged
between the network layer and the data link layer.
➢ A frame is composed of four fields: kind, seq, ack,
and info, the first three of which contain control
information and the last of which may contain actual
data to be transferred. These control fields are
collectively called the frame header.
➢ The kind field tells whether there are any data in the
frame. The seq and ack fields are used for sequence
numbers and acknowledgements, respectively. The
info field of a data frame contains a single packet.
3.3 Elementary Data Link Protocols
➢ A number of procedures are listed in Fig. 3-9.
➢ The procedure wait_for_event waiting for something
to happen.
➢ The procedures from_physical_layer and
to_physical_layer pass frames between the data link
layer and physical layer.
3.3 Elementary Data Link Protocols
➢ The procedures to_network_layer and
from_network_layer pass packets between the data
link layer and network layer.
➢ The procedures start_ack_timer and stop_ack_timer
control an auxiliary timer used to generate
acknowledgements under certain conditions.
➢ The procedures enable_network_layer and
disable_network_layer are used in the network layer
always has packets to send.
➢ Frame sequence numbers are always in the range 0 to
MAX_SEQ.
3.3 Elementary Data Link Protocols
3.3 Elementary Data Link Protocols
3.3.1 An Unrestricted Simplex Protocol
➢ A protocol that is as simple as it can be. Data are
transmitted in one direction only.
➢ Both the transmitting and receiving network layers
are always ready.
➢ Processing time can be ignored. Infinite buffer space
is available.
➢ The communication channel between the data link
layers never damages or loses frames.
➢ This thoroughly unrealistic protocol, which we will
nickname ''utopia,'' is shown in Fig. 3-10.
3.3.1 An Unrestricted Simplex Protocol
3.3.1 An Unrestricted Simplex Protocol
3.3.1 An Unrestricted Simplex Protocol
3.3.1 An Unrestricted Simplex Protocol
3.3.1 An Unrestricted Simplex Protocol
➢ The protocol consists of two distinct procedures, a
sender and a receiver.
➢ The sender runs in the data link layer of the source
machine, and the receiver runs in the data link layer of
the destination machine.
➢ The sender is in an infinite while loop just pumping
data out onto the line as fast as it can.
➢ The body of the loop consists of three actions: go fetch
a packet from the (always obliging) network layer,
construct an outbound frame using the variable s, and
send the frame on its way.
3.3.1 An Unrestricted Simplex Protocol
➢ The receiver is equally simple. Initially, it waits for
something to happen, the only possibility being the
arrival of an undamaged frame.
➢ The call to from_physical_layer removes the newly
arrived frame from the hardware buffer and puts it in
the variable r, where the receiver code can get at it.
➢ Finally, the data portion is passed on to the network
layer.
3.3.2 A Simplex Stop-and-Wait Protocol
➢ The sender sends one frame and then waits for an
acknowledgement before proceeding the next frame is
called stop-and-wait. Figure 3-11 gives an example of
a simplex stop-and-wait protocol.
Figure 3-11. A simplex stop-and-wait protocol.
3.3.2 A Simplex Stop-and-Wait Protocol
3.3.2 A Simplex Stop-and-Wait Protocol
3.3.3 A Simplex Protocol for a Noisy Channel
➢ The simplex protocol, follow an existing stop and
wait protocol mechanism with a timer.
3.3.3 A Simplex Protocol for a Noisy Channel
➢ The sender could send a frame, but the receiver
would only send an acknowledgement frame if the
data were correctly received.
➢ If a damaged frame arrived at the receiver, it would
be discarded.
➢ After a while the sender would time out and send
the frame again.
➢ This process would be repeated until the frame
finally arrived intact.
3.3.3 A Simplex Protocol for a Noisy Channel
➢ During the data transmission, the following
situation may occur.
Situation 1:
➢ The network layer on A gives packet 1 to its data
link layer.
➢ The packet is correctly received at B and passed to
the network layer on B.
➢ B sends an acknowledgement frame back to A. It
means there is no error in data transmission.
3.3.3 A Simplex Protocol for a Noisy Channel
Situation 2:
➢ The acknowledgement frame gets lost completely.
➢ This problem solved by introducing sequence
number for data.
3.3.3 A Simplex Protocol for a Noisy Channel
Situation 3:
➢ The data link layer on A eventually times out. i.e.,
The data is lost.
➢ The data should be sent again.
3.3.3 A Simplex Protocol for a Noisy Channel
Situation 4:
➢ The duplicate frame also arrives at the data link
layer on B.
➢ This problem solved by introducing sequence
number for Acknowledgement also.
3.3.3 A Simplex Protocol for a Noisy Channel
3.4 Sliding Window Protocols
➢ Less efficient in stop and wait protocol. Stop and
wait protocol send data (one frame) only one
direction at a time. Sender to receiver for data
(Forward) and receiver to sender (backward) for
acknowledgement.
➢ To overcome this issue, here introducing sliding
window protocol for sending data (several frames)
in both directions at a time.
➢ In stop and wait protocol the sender sends the next
packet after receiving the acknowledgement. In
sliding window protocol the sender sends the data
before receiving acknowledgement.
3.4 Sliding Window Protocols
➢ When a data frame arrives, instead of immediately
sending a separate control frame, the receiver
restrains itself and waits until the network layer
passes it the next packet.
➢ The acknowledgement is attached to the outgoing
data frame (using the ack field in the frame header).
This technique known as piggybacking.
➢ Sliding window protocol primarily used for error
control protocol. There are two types of sliding
window protocol used one is GO Back N and
another one is selective repeat protocol.
3.4 Sliding Window Protocols
➢ Sliding window protocol mainly used for, how the
data is transmitted.
➢ It follows two parameters.
➢ One is the sequence number and another one is a
sliding window.
➢ The sequence number ranges from 0 to 2n – 1
frames.
➢ The Sliding window is a buffer which holds the
temporary data.
3.4.1 One Bit Sliding Window Protocols
➢ The sequence numbers within the sender's window
represent frames that have been sent or can be sent
but are as yet not acknowledged.
➢ Whenever a new packet arrives from the network
layer, it is given the next highest sequence number,
and the upper edge of the window is advanced by
one (Fig 3.13 (b) of the sender ).
➢ When an acknowledgement comes in, the lower
edge is advanced by one (Fig 3.13 (d) of the
sender). In this way the window continuously
maintains a list of unacknowledged frames. Figure
3-13 shows an example.
3.4.1 One Bit Sliding Window Protocols
Lecture Notes Unit III The DataLink Layer
➢ N represents the number of frames to be sent.
➢ In GO BACK N mechanism, several frames are
sent before receiving the acknowledgement.
➢ Here N should be greater than one. If N=1 means
simple stop and wait protocol.
3.4.2 A Protocol Using Go Back N
➢ If the data or acknowledgement is lost, then the
action is performed by the sender.
➢ For example, the sender sends the several frames
at a time.
➢ During the transmission the data2 may be damaged.
➢ Whenever the data is damaged or lost the sender
simply sends the data continuously.
➢ But the receiver discards the data after the damage
and the receiver sends the Negative
acknowledgement (NAK) to the sender.
➢ Now the sender sends the data from data2 onwards.
3.4.2 A Protocol Using Go Back N
3.4.2 A Protocol Using Go Back N
➢ In Go Back N mechanism, It retransmits all the
frame after the frame was damaged.
➢ In the selective repeat protocol, it retransmits only
that frame which is damaged or lost.
➢ The receiver is capable of sorting the frames in a
proper sequence. The sender must be the capable of
searching the frame for which the negative
acknowledgement has been received.
➢ It requires less window size as compared to GO
Back N protocol.
3.4.3 A Protocol Using Selective Repeat
➢ If the data or acknowledgement is lost, then the
action is performed by the sender.
➢ For example, the sender sends the several frames at
a time.
➢ During the transmission, the data2 may be
damaged.
➢ Whenever the data is damaged or lost the sender
simply sends the data continuously.
➢ The receiver discard the damaged data data2 and
sends the negative acknowledgement to the sender.
➢ The sender checks the buffer and resend the
damaged data data2 only.
3.4.3 A Protocol Using Selective Repeat
3.4.3 A Protocol Using Selective Repeat

More Related Content

PDF
Lecture Notes - Introduction to Computer Network
PDF
Computer Network-Data Link Layer-Module-2.pdf
PPTX
Operators and expressions
PPTX
Error Detection and Correction - Data link Layer
PPT
Design issues for the layers
PPSX
Error control
PDF
COMPUTER NETWORKS NOTES.pdf
PPTX
Unit 3 - Function & Grouping,Joins and Set Operations in ORACLE
Lecture Notes - Introduction to Computer Network
Computer Network-Data Link Layer-Module-2.pdf
Operators and expressions
Error Detection and Correction - Data link Layer
Design issues for the layers
Error control
COMPUTER NETWORKS NOTES.pdf
Unit 3 - Function & Grouping,Joins and Set Operations in ORACLE

What's hot (20)

PDF
Lecture Notes Unit III PArt 2 - The DataLink Layer Medium Access Control Subl...
PDF
Lecture Notes - Unit II - The Physical Layer
PDF
Computer Networks- Introduction and Data Link Layer
PPTX
Multiplexing
PPTX
Unit 4 - Transport Layer
PPTX
Network software
PPTX
Structure of switches
PDF
Computer Network Unit IV - Lecture Notes - Network Layer
PPT
Framming data link layer
PPSX
Adoptive retransmission in TCP
PPT
Concept of Network Routing Layer
PPTX
Pn sequence
PDF
IT6601 MOBILE COMPUTING
PPT
Computer network
PPSX
Multiple access control protocol
PPTX
Network layer - design Issues
PPTX
Sliding window protocol(ARQ technique)
PPTX
Multiplexing
PPTX
Mobile transport layer - traditional TCP
PDF
CSMA /CD PPT ON SLIDESHARE
Lecture Notes Unit III PArt 2 - The DataLink Layer Medium Access Control Subl...
Lecture Notes - Unit II - The Physical Layer
Computer Networks- Introduction and Data Link Layer
Multiplexing
Unit 4 - Transport Layer
Network software
Structure of switches
Computer Network Unit IV - Lecture Notes - Network Layer
Framming data link layer
Adoptive retransmission in TCP
Concept of Network Routing Layer
Pn sequence
IT6601 MOBILE COMPUTING
Computer network
Multiple access control protocol
Network layer - design Issues
Sliding window protocol(ARQ technique)
Multiplexing
Mobile transport layer - traditional TCP
CSMA /CD PPT ON SLIDESHARE
Ad

Similar to Lecture Notes Unit III The DataLink Layer (20)

PPT
computer_network_completenotes_unit2.ppt
DOCX
Data link layer
PDF
Data Communication and Computer Networks unit 2
PPTX
DLL services from the computer networks.pptx
PPTX
data link layer - Chapter 3
PPTX
Chapter 2.1.1.pptx
PPT
Computers network Chapter 3 The data link layer.ppt
PPT
Jaimin chp-3 - data-link layer- 2011 batch
PPTX
Dcn ppt on data link layer
PDF
CN R16 -UNIT-3.pdf
PPTX
datalinklayermukesh-150130061041-conversion-gate01.pptx
PPTX
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
PPTX
Introduction to data link layer
PPTX
Data Communication Unit - II Data Link Layer.pptx
PPTX
Data Link layer in computer netwroks.pptx
PPTX
Dcn ppt by roma
PDF
PPTX
Unit 2
PPTX
Computer networks unit three presentation
PPT
Chapter 4 data link layer
computer_network_completenotes_unit2.ppt
Data link layer
Data Communication and Computer Networks unit 2
DLL services from the computer networks.pptx
data link layer - Chapter 3
Chapter 2.1.1.pptx
Computers network Chapter 3 The data link layer.ppt
Jaimin chp-3 - data-link layer- 2011 batch
Dcn ppt on data link layer
CN R16 -UNIT-3.pdf
datalinklayermukesh-150130061041-conversion-gate01.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
Introduction to data link layer
Data Communication Unit - II Data Link Layer.pptx
Data Link layer in computer netwroks.pptx
Dcn ppt by roma
Unit 2
Computer networks unit three presentation
Chapter 4 data link layer
Ad

More from Murugan146644 (17)

PDF
Assembly Language Program for 16_bit_Addition
PDF
Lecture Notes Microprocessor and Controller Unit2
PDF
Lecture Notes - Microprocessor - Unit 1 - Microprocessor Architecture and its...
PDF
Lecture Notes Unit3 chapter22 - distributed databases
PDF
Lecture Notes Unit3 chapter21 - parallel databases
PDF
Lecture Notes Unit3 chapter20 - Database System Architectures
PDF
Relational Database Management System (RDBMS) LAB - GROUP B
PDF
Relational Database Managment System Lab - Group A
PDF
Lecture Notes Unit2 chapter7 RelationalDatabaseDesign
PDF
Lecture Notes Unit 1 chapter 6 E-R MODEL
PDF
Lecture Notes Unit1 chapter1 Introduction
PDF
Lecture Notes Unit5 chapter19 Cursor in Pl/SQL
PDF
Lecture Notes Unit5 chapter18 Packages.pdf
PDF
Lecture Notes Unit5 chapter17 Stored procedures and functions
PDF
Lecture Notes Unit5 chapter16 Trigger Creation
PDF
Lecture Notes Unit5 chapter 15 PL/SQL Programming
PDF
Lecture Notes Unit4 Chapter13 users , roles and privileges
Assembly Language Program for 16_bit_Addition
Lecture Notes Microprocessor and Controller Unit2
Lecture Notes - Microprocessor - Unit 1 - Microprocessor Architecture and its...
Lecture Notes Unit3 chapter22 - distributed databases
Lecture Notes Unit3 chapter21 - parallel databases
Lecture Notes Unit3 chapter20 - Database System Architectures
Relational Database Management System (RDBMS) LAB - GROUP B
Relational Database Managment System Lab - Group A
Lecture Notes Unit2 chapter7 RelationalDatabaseDesign
Lecture Notes Unit 1 chapter 6 E-R MODEL
Lecture Notes Unit1 chapter1 Introduction
Lecture Notes Unit5 chapter19 Cursor in Pl/SQL
Lecture Notes Unit5 chapter18 Packages.pdf
Lecture Notes Unit5 chapter17 Stored procedures and functions
Lecture Notes Unit5 chapter16 Trigger Creation
Lecture Notes Unit5 chapter 15 PL/SQL Programming
Lecture Notes Unit4 Chapter13 users , roles and privileges

Recently uploaded (20)

PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Institutional Correction lecture only . . .
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Pharma ospi slides which help in ospi learning
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Computing-Curriculum for Schools in Ghana
Institutional Correction lecture only . . .
STATICS OF THE RIGID BODIES Hibbelers.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Cell Structure & Organelles in detailed.
Sports Quiz easy sports quiz sports quiz
Microbial disease of the cardiovascular and lymphatic systems
Module 4: Burden of Disease Tutorial Slides S2 2025
Microbial diseases, their pathogenesis and prophylaxis
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Abdominal Access Techniques with Prof. Dr. R K Mishra
O5-L3 Freight Transport Ops (International) V1.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
TR - Agricultural Crops Production NC III.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
O7-L3 Supply Chain Operations - ICLT Program

Lecture Notes Unit III The DataLink Layer

  • 1. Unit III - Data Link Layer Computer Network Dr. S.Murugan Associate Professor, Department of Computer Science. Alagappa Government Arts College, (Affiliated by Alagappa University) Karaikudi. Email: muruganjit@gmail.com 1
  • 2. This slides compiled from Computer Network by Andrew S. Tenenbaum 4th Ed.
  • 3. Ch.3 The Data Link Layer ➢ This study deals with the algorithms for achieving reliable, efficient communication between two adjacent machines at the data link layer. ➢ The essential property of a channel that makes it ''wirelike'' is that the bits are delivered in exactly the same order in which they are sent
  • 4. 3.1 Data Link Layer Design Issues ➢ The data link layer has a number of specific functions, it can carry out. These functions include 1. Providing a well-defined service interface to the network layer. 2. Dealing with transmission errors. 3. Regulating the flow of data so that slow receivers are not swamped by fast senders.
  • 5. Data Link Layer Design Issues ➢ To accomplish these goals, the data link layer takes the packets it gets from the network layer and encapsulates them into frames for transmission. ➢ Each frame contains a frame header, a payload field for holding the packet, and a frame trailer, as illustrated in Fig. 3-1.
  • 6. Services Provided to the Network Layer ➢ The function of the data link layer is to provide services to the network layer. ➢ The principal service is transferring data from the network layer on the source machine to the network layer on the destination machine as shown in Fig. 3-2(a). ➢ The actual transmission follows the path of Fig. 3-2(b).
  • 7. Services Provided to the Network Layer
  • 8. Services Provided to the Network Layer ➢ The data link layer can be designed to offer various services. ➢ Three reasonable possibilities that are commonly provided are 1. Unacknowledged connectionless service. 2. Acknowledged connectionless service. 3. Acknowledged connection-oriented service. ➢ The source machine send independent frames to the destination machine without having the destination machine acknowledgement.
  • 9. Services Provided to the Network Layer ➢ The acknowledged connectionless service is offered, there are still no logical connections used, but each frame sent is individually acknowledged. ➢ In this way, the sender knows whether a frame has arrived correctly. ➢ If it has not arrived within a specified time interval, it can be sent again.
  • 10. Services Provided to the Network Layer ➢ When connection-oriented service is used, transfers go through three distinct phases. ➢ In the first phase, the connection is established by having both sides initialize variables and counters needed to keep track of which frames have been received and which ones have not. ➢ the second phase, one or more frames are actually transmitted. ➢ In the third and final phase, the connection is released, freeing up the variables, buffers, and other resources used to maintain the connection.
  • 11. Framing ➢ To provide service to the network layer, the data link layer must use the service provided to it by the physical layer. ➢ The data link layer to break the bit stream up into discrete frames and compute the checksum for each frame. ➢ If the newly-computed checksum is different from the one contained in the frame, the data link layer knows that an error has occurred and takes steps to deal with it.
  • 12. Framing ➢ The following four methods used to compute checksum error. 1. Character count. 2. Flag bytes with byte stuffing. 3. Starting and ending flags, with bit stuffing. 4. Physical layer coding violations.
  • 13. Framing - Character count ➢ The first framing method uses a field in the header to specify the number of characters in the frame. ➢ When the data link layer at the destination sees the character count, it knows how many characters follow and hence where the end of the frame is. ➢ This technique is shown in Fig. 3-4(a) for four frames of sizes 5, 5, 8, and 8 characters, respectively.
  • 14. Framing - Character count ➢ In Fig 3-4 (b) character count of 5 in the second frame becomes a 7. It is considered as an error. ➢ The destination will get out of synchronization and will be unable to locate the start of the next frame.
  • 15. Framing - Byte stuffing or character stuffing ➢ The second framing method, each frame contains start and end with a flag byte as shown in Fig. 3-5(a).
  • 16. Framing - Byte stuffing or character stuffing ➢ A serious problem occurs with this method when binary data, such as object programs or floating- point numbers, are being transmitted. ➢ To solve this problem, the sender's data link layer insert a special escape byte (ESC) just before each ''accidental'' flag byte in the data. ➢ The data link layer on the receiving end removes the escape byte before the data are given to the network layer. ➢ This technique is called byte stuffing or character stuffing. Some examples are shown in Fig. 3-5(b).
  • 17. Framing - Byte stuffing or character stuffing
  • 18. Framing - Bit stuffing ➢ Each frame begins and ends with a special bit pattern, 01111110 (in fact, a flag byte). ➢ Whenever the sender's data link layer encounters five consecutive 1s in the data, it automatically stuffs a 0 bit into the outgoing bit stream. ➢ When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, it automatically destuffs (i.e.,deletes) the 0 bit. ➢ This techniques is called bit stuffing. ➢ For example, If the user data contain the flag pattern, 01111110, this flag is transmitted as 011111010 but stored in the receiver's memory as 01111110. Figure 3-6 gives an example of bit stuffing.
  • 19. Framing - Bit stuffing
  • 20. Framing - Physical layer coding violations ➢ The last method of framing is only applicable to networks in which the encoding on the physical medium contains some redundancy. ➢ For example, some LANs encode 1 bit of data by using 2 physical bits. ➢ Normally, a 1 bit is a high-low pair and a 0 bit is a low-high pair. ➢ The combinations high-high and low-low are not used for data, but are used for delimiting frames in some protocols.
  • 21. Error Control ➢ Error control determines how to make sure all frames are eventually delivered to the network layer at the destination and in the proper order. ➢ In connection oriented service, If the sender receives a positive acknowledgement about a frame, it knows the frame has arrived safely. ➢ On the other hand, a negative acknowledgement means that something has gone wrong, and the frame must be transmitted again.
  • 22. Error Control ➢ When the sender transmits a frame, it generally also starts a timer. ➢ If either the frame or the acknowledgement is lost, the timer will go off, alerting the sender to a potential problem. The solution is to just transmit the frame again. ➢ When frames may be transmitted multiple times there is a danger that the receiver will accept the same frame two or more times and pass it to the network layer more than once. ➢ To prevent this from happening, it is generally necessary to assign sequence numbers to outgoing frames, so that the receiver can distinguish retransmissions from originals.
  • 23. Flow Control ➢ Another important design issue in the data link layer is, sender that systematically wants to transmit frames faster than the receiver can accept them. ➢ This situation can easily occur when the sender is running on a fast (or lightly loaded) computer and the receiver is running on a slow (or heavily loaded) machine. ➢ Two approaches are commonly used to solve the above issue.
  • 24. Flow Control ➢ In the first one, feedback-based flow control, the receiver sends back information to the sender giving it permission to send more data. ➢ In the second one, rate-based flow control, the protocol has a automatic built-in mechanism that limits the rate at which senders may transmit data, without using feedback from the receiver.
  • 25. 3.2 Error Detection and Correction ➢ Error is a condition when the output information does not match with the input information. ➢ During transmission, digital signals suffer from noise that can introduce errors in the binary bits travelling from one system to another. ➢ That means a 0 bit may change to 1 or a 1 bit may change to 0.
  • 26. 3.2.1 Error Detecting Codes - Simple Parity check ➢ Whenever a message is transmitted, it may get scrambled by noise or data may get corrupted. ➢ To avoid this, we use error-detecting codes which are additional data added to a given digital message to help us detect if any error has occurred during transmission of the message.
  • 27. 3.2.1 Error Detecting Codes - Simple Parity check ➢ Blocks of data from the source are subject to a check bit or parity bit generator form, where a parity of : ➢ 1 is added to the block if it contains odd number of 1’s, and ➢ 0 is added if it contains even number of 1’s
  • 28. 3.2.1 Error Detecting Codes - Simple Parity check ➢ It is a simple error-checking method used in data communication. Parity checking helps detect errors in data transmission. If the parity bit doesn't match the expected value, it indicates an error in the received data. 1.Sender Side: 1. The sender has a binary data sequence: 100011. 2. It computes a parity bit to ensure even parity (total number of 1s is even). 3. Since there are three 1s (odd count), an extra 1 is added to make it even. 4. The final transmitted data: 1000111. 2.Transmission: 1. The data is sent through the communication channel. 3.Receiver Side: 1. The receiver receives 1000111. 2. It also computes the parity to check if the number of 1s is even. 3. If even → Data is accepted. 4. If odd → Data is rejected (error detected).
  • 29. 3.2.2 Error-Detecting Codes (Polynomial or Cyclic Redundancy Check) ➢ In CRC (, a sequence of redundant bits, called cyclic redundancy check bits, are appended to the end of data unit so that the resulting data unit becomes exactly divisible by a second predetermined binary number. ➢ At the destination, the incoming data unit is divided by the same number. If at this step there is no remainder, the data unit is assumed to be correct and is therefore accepted. ➢ A remainder indicates that the data unit has been damaged in transmit and therefore must be rejected.
  • 30. 3.2.2 Error-Detecting Codes (Polynomial or Cyclic Redundancy Check)
  • 31. 3.2.2 Error-Detecting Codes (Polynomial or Cyclic Redundancy Check) CRC Workflow (Sender and Receiver) This image outlines the process of CRC error detection through a flowchart: Sender Side: 1. Data Preparation: o A data message of m bits is taken. o n-1 zeros are appended to the message (where n is the length of the CRC generator polynomial). 2. Division: o The modified message (with zeros) is divided by the CRC generator (divisor), typically a fixed binary polynomial. o This division is performed using binary modulo-2 division (similar to XOR). 3. CRC (Remainder): o The result of the division is the remainder (n bits), referred to as the CRC. o This CRC is appended to the original message and transmitted.
  • 32. 3.2.2 Error-Detecting Codes (Polynomial or Cyclic Redundancy Check) Receiver Side: 1. Verification: o Upon receiving the data, the receiver splits it into the original message and the appended CRC. o The entire received sequence is divided again by the same divisor. 2. Check for Errors: o If the remainder (result of division) is zero, the data is considered error- free and accepted. If the remainder is non-zero, the data is rejected due to errors during transmission.
  • 33. 3.2.2 Error-Detecting Codes (Polynomial or Cyclic Redundancy Check)
  • 34. 3.2.2 Error-Detecting Codes (Polynomial or Cyclic Redundancy Check) This example demonstrates the process in numbers with the following: Given Inputs: 1. Original Message: 1010000 2. Generator Polynomial: x3+1 => 1*x3 + 0* x2*+ 0*x1x + 1 (binary: 1001) Sender's Process: 1. Append Zeros: o Append n-1 zeros (3 zeros for a 4-bit generator) to the original message: 1010000 → 1010000000. 2. Binary Division: o Perform modulo-2 division of 1010000000 by 1001. o XOR is used instead of subtraction: ▪ Step-by-step division shown in the image. o The remainder is 011. 3. Transmit Data: o Append the remainder (011) to the original message: 1010000 + 011 → 1010000011.
  • 35. 3.2.2 Error-Detecting Codes (Polynomial or Cyclic Redundancy Check) Receiver's Process: 1. Received Data: o Receiver gets 1010000011. 2. Verification: o Perform modulo-2 division of 1010000011 by 1001. o The division results in a remainder of 000. 3. Conclusion: o A remainder of zero indicates the data is error-free and accepted. Summary: • CRC ensures data integrity by appending a calculated remainder (CRC) to the transmitted data. • At the receiver, division is repeated to verify correctness. • Advantages: o Efficient error detection for large datasets. o Simple to implement with hardware or software. • Limitation: Cannot correct errors; it only detects them.
  • 36. Hamming Code ➢ Hamming code is a set of error-correction code s that can be used to detect and correct bit errors that can occur when computer data is moved or stored. ➢ To enable this, a transmitting station must add extra data (called error correction bits ) to the transmission.
  • 37. 3.3 Elementary Data Link Protocols ➢ Assume the following… ➢ The physical layer, data link layer, and network layer are independent processes that communicate by passing messages back and forth. ➢ Machine A wants to send a long stream of data to Machine B, using a reliable, connection-oriented service. ➢ B also wants to send data to A Simultaneously. ➢ Machines do not crash.
  • 38. Elementary Data Link Protocols
  • 39. 3.3 Elementary Data Link Protocols ➢ Figure 3-9 shows some declarations (in C) common to many of the protocols. ➢ Five data structures are defined: boolean, seq_nr, packet, frame_kind, and frame. ➢ A boolean is an enumerated type and can take on the values true and false. ➢ A seq_nr is a small integer used to number the frames. These sequence numbers run from 0 up to and including MAX_SEQ.
  • 40. 3.3 Elementary Data Link Protocols ➢ A packet is the unit of information exchanged between the network layer and the data link layer. ➢ A frame is composed of four fields: kind, seq, ack, and info, the first three of which contain control information and the last of which may contain actual data to be transferred. These control fields are collectively called the frame header. ➢ The kind field tells whether there are any data in the frame. The seq and ack fields are used for sequence numbers and acknowledgements, respectively. The info field of a data frame contains a single packet.
  • 41. 3.3 Elementary Data Link Protocols ➢ A number of procedures are listed in Fig. 3-9. ➢ The procedure wait_for_event waiting for something to happen. ➢ The procedures from_physical_layer and to_physical_layer pass frames between the data link layer and physical layer.
  • 42. 3.3 Elementary Data Link Protocols ➢ The procedures to_network_layer and from_network_layer pass packets between the data link layer and network layer. ➢ The procedures start_ack_timer and stop_ack_timer control an auxiliary timer used to generate acknowledgements under certain conditions. ➢ The procedures enable_network_layer and disable_network_layer are used in the network layer always has packets to send. ➢ Frame sequence numbers are always in the range 0 to MAX_SEQ.
  • 43. 3.3 Elementary Data Link Protocols
  • 44. 3.3 Elementary Data Link Protocols
  • 45. 3.3.1 An Unrestricted Simplex Protocol ➢ A protocol that is as simple as it can be. Data are transmitted in one direction only. ➢ Both the transmitting and receiving network layers are always ready. ➢ Processing time can be ignored. Infinite buffer space is available. ➢ The communication channel between the data link layers never damages or loses frames. ➢ This thoroughly unrealistic protocol, which we will nickname ''utopia,'' is shown in Fig. 3-10.
  • 46. 3.3.1 An Unrestricted Simplex Protocol
  • 47. 3.3.1 An Unrestricted Simplex Protocol
  • 48. 3.3.1 An Unrestricted Simplex Protocol
  • 49. 3.3.1 An Unrestricted Simplex Protocol
  • 50. 3.3.1 An Unrestricted Simplex Protocol ➢ The protocol consists of two distinct procedures, a sender and a receiver. ➢ The sender runs in the data link layer of the source machine, and the receiver runs in the data link layer of the destination machine. ➢ The sender is in an infinite while loop just pumping data out onto the line as fast as it can. ➢ The body of the loop consists of three actions: go fetch a packet from the (always obliging) network layer, construct an outbound frame using the variable s, and send the frame on its way.
  • 51. 3.3.1 An Unrestricted Simplex Protocol ➢ The receiver is equally simple. Initially, it waits for something to happen, the only possibility being the arrival of an undamaged frame. ➢ The call to from_physical_layer removes the newly arrived frame from the hardware buffer and puts it in the variable r, where the receiver code can get at it. ➢ Finally, the data portion is passed on to the network layer.
  • 52. 3.3.2 A Simplex Stop-and-Wait Protocol ➢ The sender sends one frame and then waits for an acknowledgement before proceeding the next frame is called stop-and-wait. Figure 3-11 gives an example of a simplex stop-and-wait protocol. Figure 3-11. A simplex stop-and-wait protocol.
  • 53. 3.3.2 A Simplex Stop-and-Wait Protocol
  • 54. 3.3.2 A Simplex Stop-and-Wait Protocol
  • 55. 3.3.3 A Simplex Protocol for a Noisy Channel ➢ The simplex protocol, follow an existing stop and wait protocol mechanism with a timer.
  • 56. 3.3.3 A Simplex Protocol for a Noisy Channel ➢ The sender could send a frame, but the receiver would only send an acknowledgement frame if the data were correctly received. ➢ If a damaged frame arrived at the receiver, it would be discarded. ➢ After a while the sender would time out and send the frame again. ➢ This process would be repeated until the frame finally arrived intact.
  • 57. 3.3.3 A Simplex Protocol for a Noisy Channel ➢ During the data transmission, the following situation may occur. Situation 1: ➢ The network layer on A gives packet 1 to its data link layer. ➢ The packet is correctly received at B and passed to the network layer on B. ➢ B sends an acknowledgement frame back to A. It means there is no error in data transmission.
  • 58. 3.3.3 A Simplex Protocol for a Noisy Channel Situation 2: ➢ The acknowledgement frame gets lost completely. ➢ This problem solved by introducing sequence number for data.
  • 59. 3.3.3 A Simplex Protocol for a Noisy Channel Situation 3: ➢ The data link layer on A eventually times out. i.e., The data is lost. ➢ The data should be sent again.
  • 60. 3.3.3 A Simplex Protocol for a Noisy Channel Situation 4: ➢ The duplicate frame also arrives at the data link layer on B. ➢ This problem solved by introducing sequence number for Acknowledgement also.
  • 61. 3.3.3 A Simplex Protocol for a Noisy Channel
  • 62. 3.4 Sliding Window Protocols ➢ Less efficient in stop and wait protocol. Stop and wait protocol send data (one frame) only one direction at a time. Sender to receiver for data (Forward) and receiver to sender (backward) for acknowledgement. ➢ To overcome this issue, here introducing sliding window protocol for sending data (several frames) in both directions at a time. ➢ In stop and wait protocol the sender sends the next packet after receiving the acknowledgement. In sliding window protocol the sender sends the data before receiving acknowledgement.
  • 63. 3.4 Sliding Window Protocols ➢ When a data frame arrives, instead of immediately sending a separate control frame, the receiver restrains itself and waits until the network layer passes it the next packet. ➢ The acknowledgement is attached to the outgoing data frame (using the ack field in the frame header). This technique known as piggybacking. ➢ Sliding window protocol primarily used for error control protocol. There are two types of sliding window protocol used one is GO Back N and another one is selective repeat protocol.
  • 64. 3.4 Sliding Window Protocols ➢ Sliding window protocol mainly used for, how the data is transmitted. ➢ It follows two parameters. ➢ One is the sequence number and another one is a sliding window. ➢ The sequence number ranges from 0 to 2n – 1 frames. ➢ The Sliding window is a buffer which holds the temporary data.
  • 65. 3.4.1 One Bit Sliding Window Protocols ➢ The sequence numbers within the sender's window represent frames that have been sent or can be sent but are as yet not acknowledged. ➢ Whenever a new packet arrives from the network layer, it is given the next highest sequence number, and the upper edge of the window is advanced by one (Fig 3.13 (b) of the sender ). ➢ When an acknowledgement comes in, the lower edge is advanced by one (Fig 3.13 (d) of the sender). In this way the window continuously maintains a list of unacknowledged frames. Figure 3-13 shows an example.
  • 66. 3.4.1 One Bit Sliding Window Protocols
  • 68. ➢ N represents the number of frames to be sent. ➢ In GO BACK N mechanism, several frames are sent before receiving the acknowledgement. ➢ Here N should be greater than one. If N=1 means simple stop and wait protocol. 3.4.2 A Protocol Using Go Back N
  • 69. ➢ If the data or acknowledgement is lost, then the action is performed by the sender. ➢ For example, the sender sends the several frames at a time. ➢ During the transmission the data2 may be damaged. ➢ Whenever the data is damaged or lost the sender simply sends the data continuously. ➢ But the receiver discards the data after the damage and the receiver sends the Negative acknowledgement (NAK) to the sender. ➢ Now the sender sends the data from data2 onwards. 3.4.2 A Protocol Using Go Back N
  • 70. 3.4.2 A Protocol Using Go Back N
  • 71. ➢ In Go Back N mechanism, It retransmits all the frame after the frame was damaged. ➢ In the selective repeat protocol, it retransmits only that frame which is damaged or lost. ➢ The receiver is capable of sorting the frames in a proper sequence. The sender must be the capable of searching the frame for which the negative acknowledgement has been received. ➢ It requires less window size as compared to GO Back N protocol. 3.4.3 A Protocol Using Selective Repeat
  • 72. ➢ If the data or acknowledgement is lost, then the action is performed by the sender. ➢ For example, the sender sends the several frames at a time. ➢ During the transmission, the data2 may be damaged. ➢ Whenever the data is damaged or lost the sender simply sends the data continuously. ➢ The receiver discard the damaged data data2 and sends the negative acknowledgement to the sender. ➢ The sender checks the buffer and resend the damaged data data2 only. 3.4.3 A Protocol Using Selective Repeat
  • 73. 3.4.3 A Protocol Using Selective Repeat