SlideShare a Scribd company logo
1 of 108
Data Link Layer Protocols
Data Link Sublayers
Media Access Control
Data Link Control
Created by Zulhelman
Flow control
• It is a technique that generally observes the proper flow of data from sender to
receiver. It is very essential because it is possible for sender to transmit data or
information at very fast rate and hence receiver can receive this information and
process it.
• This can happen only if receiver has very high load of traffic as compared to sender, or
if receiver has power of processing less as compared to sender.
• Flow control is basically a technique that gives permission to two of stations that are
working and processing at different speeds to just communicate with one another.
• Flow control in Data Link Layer simply restricts and coordinates number of frames or
amount of data sender can send just before it waits for an acknowledgement from
receiver.
• Flow control is actually set of procedures that explains sender about how much data or
frames it can transfer or transmit before data overwhelms receiver.
• The receiving device also contains only limited amount of speed and memory to store
data. This is why receiving device should be able to tell or inform the sender about
stopping the transmission or transferring of data on temporary basis before it reaches
limit. It also needs buffer, large block of memory for just storing data or frames until
they are processed.
Flow Control
• Ensuring the sending entity does not overwhelm
the receiving entity
– Preventing buffer overflow
• Transmission time
– Time taken to emit all bits into medium
• Propagation time
– Time for a bit to traverse the link
Model of Frame Transmission
Approaches to Flow Control :Flow Control is classified into
two categories:
• Feedback – based Flow Control :
– The sender transmits data or frames after it has received
acknowledgements from user.
• Rate – based Flow Control :
– The sender sends or transfers data at a faster speed to
the recipient and the recipient cannot receive data at
that speed. The built-in mechanisms in the protocol will
only limit the overall speed at which data or information
is being transferred or sent by the sender without any
feedback or acknowledgment from the receiver.
• Feedback – based Flow Control : In this control technique, sender
simply transmits data or information or frame to receiver, then
receiver transmits data back to sender and also allows sender to
transmit more amount of data or tell sender about how receiver is
processing or doing. This simply means that sender transmits data
or frames after it has received acknowledgements from user.
• Rate – based Flow Control : In this control technique, usually when
sender sends or transfer data at faster speed to receiver and
receiver is not being able to receive data at the speed, then
mechanism known as built-in mechanism in protocol will just limit
or restricts overall rate at which data or information is being
transferred or transmitted by sender without any feedback or
acknowledgement from receiver.
Techniques of Flow Control in Data
Link Layer d to control the flow of data
Stop and Wait
• Source transmits frame
• Destination receives frame and replies with
acknowledgement
• Source waits for ACK before sending next frame
• Destination can stop flow by not send ACK
• Works well for a few large frames
Fragmentation
• Large block of data may be split into small frames
– Limited buffer size
– Errors detected sooner (when whole frame received)
– On error, retransmission of smaller frames is needed
– Prevents one station occupying medium for long
periods
• Stop and wait becomes inadequate
1. Stop-and-Wait Flow Control : This method is the easiest and simplest form of flow
control. In this method, basically message or data is broken down into various
multiple frames, and then receiver indicates its readiness to receive frame of data.
When acknowledgement is received, then only sender will send or transfer the next
frame. This process is continued until sender transmits EOT (End of Transmission)
frame. In this method, only one of frames can be in transmission at a time. It leads to
inefficiency i.e. less productivity if propagation delay is very much longer than the
transmission delay and Ultimately In this method sender sent single frame and
receiver take one frame at a time and sent acknowledgement(which is next frame
number only) for new frame.
Advantages –
This method is very easiest and simple and each of the frames is checked and
acknowledged well.
This method is also very accurate.
Disadvantages –
This method is fairly slow.
In this, only one packet or frame can be sent at a time.
Stop and Wait ARQ
• Characteristics
– Used in Connection-oriented communication.
– It offers error and flows control
– It is used in Data Link and Transport Layers
– Stop and Wait for ARQ mainly implements the
Sliding Window Protocol concept with Window
Size 1
• Useful Terms:
– Propagation Delay: Amount of time taken by a packet to make a
physical journey from one router to another router.
– Propagation Delay = (Distance between routers) / (Velocity of
propagation)
– RoundTripTime (RTT) = 2* Propagation Delay
– TimeOut (TO) = 2* RTT
– Time To Live (TTL) = 2* TimeOut. (Maximum TTL is 180 seconds)
Simple Stop and Wait
• Sender:
– Rule 1 : Send one data packet at a time.
– Rule 2 : end the next packet only after receiving
acknowledgement for the previous.
• Receiver:
– Rule 1 : Send acknowledgement after receiving and
consuming a data packet.
– Rule 2 : After consuming packet acknowledgement need to be
sent (Flow Control)
Diagram
Problems
1. Lost Data
2. Lost Acknowledgement:
After a timeout on the sender side, a long-delayed acknowledgement might be
wrongly considered as acknowledgement of some other recent packet.
3. Delayed Acknowledgement/Data:
Stop and Wait for ARQ (Automatic Repeat Request)
The above 3 problems are resolved by Stop and Wait for ARQ
(Automatic Repeat Request) that does both error control and
flow control.
1. Time Out
3. Delayed Acknowledgement:
This is resolved by introducing sequence numbers for
acknowledgement also.
Working of Stop and Wait for ARQ:
1) Sender A sends a data frame or packet with sequence number 0.
2) Receiver B, after receiving the data frame, sends an
acknowledgement with sequence number 1 (the sequence number
of the next expected data frame or packet)
There is only a one-bit sequence number that implies that both
sender and receiver have a buffer for one frame or packet only.
Characteristics of Stop and Wait ARQ:
• It uses a link between sender and receiver as a half-duplex link
• Throughput = 1 Data packet/frame per RTT
• If the Bandwidth*Delay product is very high, then they stop and wait
for protocol if it is not so useful.
• The sender has to keep waiting for acknowledgements before
sending the processed next packet.
• It is an example of “Closed Loop OR connection-oriented “ protocols
• It is a special category of SWP where its window size is 1
• Irrespective of the number of packets sender is having stop and wait
for protocol requires only 2 sequence numbers 0 and 1
Constraints:
1. Stop and Wait ARQ has very less efficiency .
• Fixed by increasing window size.
• Improve better efficiency, Return N and Selective Repeat
Protocols are used.
2. Stop and Wait ARQ solves three main problems but creates a
big performance problem because the sender is always waiting
for an acknowledgment even if the next packet is ready to be
sent.
• Simple Implementation: Stop and Wait ARQ is a simple protocol that is easy
to implement in both hardware and software. - Requires no complex
hardware algorithms or components, making it a cheap and efficient option.
• Error Detection: Stop and Wait ARQ detects errors in the transmitted data by
using checksums or cyclic redundancy checks (CRC). If an error is detected,
the receiver sends a negative acknowledgment (NAK) to the sender,
indicating that the data needs to be retransmitted.
• Reliable: Stop and Wait ARQ ensures that the data is transmitted reliably and
in order.
• Flow Control: Stop and Wait ARQ flow can be used to control the speed at
which data is sent by the sender. This is useful in situations where the
receiver has limited buffer space or processing power.
• Backward Compatibility: Stop and Wait ARQ is compatible with many existing
systems and protocols, making it a popular choice for communication over
unreliable channels.
Advantages of Stop and Wait ARQ :
1. Low Efficiency: Stop and Wait ARQ has low efficiency as it requires the sender
to wait for an acknowledgment from the receiver before sending the next data
packet. This results in a low data transmission rate, especially for large data
sets.
2. High Latency: Stop and Wait ARQ introduces additional latency in the
transmission of data, as the sender must wait for an acknowledgment before
sending the next packet. This can be a problem for real-time applications such
as video streaming or online gaming.
3. Limited Bandwidth Utilization: Stop and Wait ARQ does not utilize the available
bandwidth efficiently, as the sender can transmit only one data packet at a
time. This results in underutilization of the channel, which can be a problem in
situations where the available bandwidth is limited.
4. Limited Error Recovery: Stop and Wait ARQ has limited error recovery
capabilities. If a data packet is lost or corrupted, the sender must retransmit the
entire packet, which can be time-consuming and can result in further delays.
5. Vulnerable to Channel Noise: Stop and Wait ARQ is vulnerable to channel noise,
which can cause errors in the transmitted data. This can result in frequent
retransmissions and can impact the overall efficiency of the protocol.
Disadvantages of Stop and Wait ARQ :
https://www.geeksforgeeks.org/python-stop-wait-implementation-using-crc/
Sliding Windows Flow Control
• Allow multiple frames to be in transit
• Receiver has buffer W long
• Transmitter can send up to W frames without
ACK
• Each frame is numbered
• ACK includes number of next frame expected
• Sequence number bounded by size of field (k)
– Frames are numbered modulo 2k
Sliding Window Diagram
Example Sliding Window
Sliding Window Enhancements
• Receiver can acknowledge frames without
permitting further transmission (Receive Not
Ready)
• Must send a normal acknowledge to resume
• If duplex, use piggybacking
– If no data to send, use acknowledgement frame
– If data but no acknowledgement to send, send last
acknowledgement number again, or have ACK
valid flag (TCP)
Go-Back-N ARQ
• Stop and wait ARQ mechanism does not utilize
the resources at their best.
• When the acknowledgement is received, the
sender sits idle and does nothing.
• In Go-Back-N ARQ method, both sender and
receiver maintain a window.
• The sending-window size enables
the sender to send multiple
frames without receiving the
acknowledgement of the
previous ones.
• The receiving-window enables
the receiver to receive multiple
frames and acknowledge them.
• The receiver keeps track of
incoming frame’s sequence
number.
• The sender sends all the frames in
window, it checks up to what sequence
number it has received positive
acknowledgement.
• If all frames are positively
acknowledged, the sender sends next
set of frames.
• If sender finds that it has received NACK
or has not receive any ACK for a
particular frame, it retransmits all the
frames after which it does not receive
Selective Repeat ARQ
• In Go-back-N ARQ, it is assumed that the
receiver does not have any buffer space for its
window size and has to process each frame as
it comes.
• This enforces the sender to retransmit all the
frames which are not acknowledged.
• In Selective-Repeat ARQ, the
receiver while keeping track of
sequence numbers, buffers the
frames in memory and sends NACK
for only frame which is missing or
damaged.
• The sender in this case, sends only
packet for which NACK is received.
Sliding Window Flow Control
Advantages
• It performs much better than stop-and-wait flow control.
• This method increases efficiency.
• Multiples frames can be sent one after another.
• Disadvantages –
• The main issue is complexity at the sender and receiver due to the
transferring of multiple frames.
• The receiver might receive data frames or packets out the
sequence.
Problem
• Ukuran windows 8, gambarkan diagram waktu
pengiriman Frame, asumsikan fran ke 5 tidak
sampai di penerima, bila menggunakan :
– Stop and wait ARQ....Apakah ini memerlukan
window ?
– Sliding Windows G back N
– Sliding Windows Selective Repeat
Error Detection
• Additional bits added by transmitter for error
detection code
• Parity
– Value of parity bit is such that character has even
(even parity) or odd (odd parity) number of ones
– Even number of bit errors goes undetected
Cyclic Redundancy Check
• For a block of k bits transmitter generates n
bit sequence
• Transmit k+n bits which is exactly divisible by
some number
• Receive divides frame by that number
– If no remainder, assume no error
– For math, see Stallings chapter 7
Error Control
o Data errors occur because electromagnetic wave
signals are disrupted due to heat, magnetism,
and other forms of electricity.
o Error control is needed to prevent error sending
messages to a higher level in the communication
hierarchy.
o The probability of a bit experiencing an error is
called the Bit Error Rate (BER).
o for example: 10 -6 means that in 1 million bits sent
there is 1 bit error.
Error Control
• Detection and correction of errors
• Lost frames
• Damaged frames
• Automatic repeat request
– Error detection
– Positive acknowledgment
– Retransmission after timeout
– Negative acknowledgement and retransmission
Techniques for Error Control
There are various techniques of error control as given
below :
Type of Errors
1. Single-bit error: 0  1 or 1  0
2. Burst error: Multiple bits are changed
Error Control Mechanism
1. Forward Error Control
2. Backward Error Control .
• FEC: additional information is sent to the receiver to be used to
detect errors and correct errors at once.
• Backward Error Control: only used to detect errors, error
correction is done by retransmitting data that causes errors.
Stop and Wait
Characteristics
• Used in Connection-oriented communication.
• It offers error and flows control
• It is used in Data Link and Transport Layers
• Stop and Wait for ARQ mainly implements the Sliding Window Protocol concept with
Window Size 1
• Useful Terms:
– Propagation Delay: Amount of time taken by a packet to make a physical journey from one router to
another router.
– Propagation Delay = (Distance between routers) / (Velocity of propagation)
– RoundTripTime (RTT) = 2* Propagation Delay
– TimeOut (TO) = 2* RTT
– Time To Live (TTL) = 2* TimeOut. (Maximum TTL is 180 seconds)
Redundancy
Error Detection Method
• The error detection method consists of four
types of redundancy checks, namely VRC, LRC,
CRC and Checksum
• The first three types are used in the data link
layer, while Checksum is on the higher layer.
Vertical Redundancy Check (VRC)
(Parity Check)
VRC Performance
• VRC can check all single bits of an error.
– In the case of even-parity checking, VRC can
detect burst errors if the number of total errors in
each unit of data is odd.
Longitudinal Redundancy Check (LRC)
LRC mechanism
• One bit block is divided into several rows and
added with one redundant row (LRC)
• The content of LRC is a sum of modulo two.
• In the recipient is done again, if LRC 0, there is
no error
Performa LRC
• LRC meningkatkan kemampuan pendeteksian
burst errors,
• LRC dengan n bit dapat mendeteksi burst error
n bit
10.
CRC encoder
10.
CRC decoder for two cases
CRC performance
• CRC can detect all burst errors whose length is
less or equal to the polynomial level.
CRC standard
Checksum
• Using the Complementary System 1
• Invert every 1 to 0 and 0 to 1
• A and -A are complement 1 of the others
• +A=1010 -A=0101
• +0 = 0000  -0 = 1111
Konsep Checksum
Performa Checksum
• Contoh-contoh no error dan a burst error
• Segment 1 10101001
• Segment2 00111001
• Checksum 00011101
• --------------------------------- --------------------------------
• Sum 11111111 Sum 11000110
• Complement 00000000 Complement 00111001
Segment 1 10101111
Segment2 11111001
Checksum 00011101
• Error tidak terdeteksi bila pembalikan bit
diimbangi oleh an opposite bit inversion pada
digit yang berhubungan pada segmen lain.
• Segment 1 10111101 10101001
• Segment2 00101001 00111001
• Checksum 00011001
• ---------------------------------
• Sum 11111111  Error tidakterdeteksi
Error Correction
• Error correction requires more bit redundancy
than error detection.
– For example one extra bit can detect single-bit errors
(Parity bit in VRC)
• Bit redundancy is used to determine the location
of the bit that is experiencing an error.
– For example for 7-bit data, 8 conditions are needed,
namely 7 conditions for location and one condition for
no errors, so three bits of redundancy are needed.
1. Hamming Code
• Hamming code is a set of error-correction codes
that can be used to detect and correct the errors
that can occur when the data is moved or stored
from the sender to the receiver.
• It is a technique developed by R.W. Hamming for
error correction.
• Redundant bits – Redundant bits are extra binary
bits that are generated and added to the
information-carrying bits of data transfer to ensure
that no bits were lost during the data transfer.
Terminology
1. Codeword is a word formed by data bits and
additional bits for check bits.
2. Hamming distance, is the minimum number of
bit positions in the sending and receiving code
words.
1. Bila hamming distance = n tidak dapat mendeteksi
n bit errors.
• For example parity bits, with a hamming distance, n
= 2 cannot detect data that has a 2-bit error.
Example: 0000000 0 0000011 0
Parity bit
• A parity bit is a bit appended to a data of binary bits to ensure that the total
number of 1’s in the data is even or odd.
• Parity bits are used for error detection.
• There are two types of parity bits:
– Even parity bit: In the case of even parity, for a given set of bits, the number of 1’s
are counted. If that count is odd, the parity bit value is set to 1, making the total
count of occurrences of 1’s an even number. If the total number of 1’s in a given set
of bits is already even, the parity bit’s value is 0.
– Odd Parity bit – In the case of odd parity, for a given set of bits, the number of 1’s
are counted. If that count is even, the parity bit value is set to 1, making the total
count of occurrences of 1’s an odd number. If the total number of 1’s in a given set
of bits is already odd, the parity bit’s value is 0.
10.
Let us find the Hamming distance between two pairs of
words.
1. The Hamming distance d(000, 011) is 2 because
Example
2. The Hamming distance d(10101, 11110) is 3 because
10.81
A code for error detection
(Example 10.2)
10.
Find the minimum Hamming distance of
the coding scheme in Table 10.1.
Solution
We first find all Hamming distances.
Example
The dmin in this case is 2.
10.
Find the minimum Hamming distance of the coding
scheme in Table
Solution
We first find all the Hamming distances.
The dmin in this case is 3.
Example
10.84
Table 10.2 A code for error correction (Example 10.3)
10.
To guarantee the detection of up to s
errors in all cases, the minimum
Hamming distance in a block
code must be dmin = s + 1.
Note
• The number of redundant bits can be
calculated using the following formula:
– 2^r ≥ m + r + 1
– where, r = redundant bit, m = data bit
• Suppose the number of data bits is 7, then the
number of redundant bits can be calculated
using:
• 2^4 ≥ 7 + 4 + 1 Thus, the number of redundant
bits= 4 Parity bits.
General Algorithm of Hamming code
Hamming Code is simply the use of extra parity bits to allow the identification of an error.
1. Write the bit positions starting from 1 in binary form (1, 10, 11, 100, etc).
2. All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc).
3. All the other bit positions are marked as data bits.
4. Each data bit is included in a unique set of parity bits, as determined its bit position in binary form. a. Parity bit 1
covers all the bits positions whose binary representation includes a 1 in the least significant position (1, 3, 5, 7, 9,
11, etc). b. Parity bit 2 covers all the bits positions whose binary representation includes a 1 in the second position
from the least significant bit (2, 3, 6, 7, 10, 11, etc). c. Parity bit 4 covers all the bits positions whose binary
representation includes a 1 in the third position from the least significant bit (4–7, 12–15, 20–23, etc). d. Parity bit
8 covers all the bits positions whose binary representation includes a 1 in the fourth position from the least
significant bit bits (8–15, 24–31, 40–47, etc). e. In general, each parity bit covers all bits where the bitwise AND of
the parity position and the bit position is non-zero.
5. Since we check for even parity set a parity bit to 1 if the total number of ones in the positions it checks is odd.
6. Set a parity bit to 0 if the total number of ones in the positions it checks is even.
7. Determining the position of redundant bits
8. These redundancy bits are placed at positions that correspond to
the power of 2.
As in the above example:
• The number of data bits = 7
• The number of redundant bits = 4
• The total number of bits = 11
• The redundant bits are placed at positions corresponding to power
of 2
– 1, 2, 4, and 8
Suppose the data to be transmitted is 1011001, the bits will be placed
as follows:
Determining the Parity bits:
R1 bit is calculated using parity check at all the bits positions
whose binary representation includes a 1 in the least significant
position. R1: bits 1, 3, 5, 7, 9, 11
• To find the redundant bit R1, we check for even parity. Since the
total number of 1’s in all the bit positions corresponding to R1 is
an even number the value of R1 (parity bit’s value) = 0
• R2 bit is calculated using parity check at all the bits positions
whose binary representation includes a 1 in the second position
from the least significant bit. R2: bits 2,3,6,7,10,11
To find the redundant bit R2, we check for even parity. Since
the total number of 1’s in all the bit positions corresponding
to R2 is odd the value of R2(parity bit’s value)=1
R4 bit is calculated using parity check at all the bits positions whose binary
representation includes a 1 in the third position from the least significant
bit. R4: bits 4, 5, 6, 7
To find the redundant bit R4, we check for even parity. Since the total
number of 1’s in all the bit positions corresponding to R4 is odd the value of
R4(parity bit’s value) = 1
R8 bit is calculated using parity check at all the bits positions whose
binary representation includes a 1 in the fourth position from the
least significant bit. R8: bit 8,9,10,11
To find the redundant bit R8, we check for even parity. Since the total
number of 1’s in all the bit positions corresponding to R8 is an even
number the value of R8(parity bit’s value)=0. Thus, the data transferred
is:
The bits give the binary number 0110 whose decimal representation is
6. Thus, bit 6 contains an error. To correct the error the 6th bit is
changed from 1 to 0.
Error detection and correction: Suppose in the above example the 6th
bit is changed from 0 to 1 during data transmission, then it gives new
parity values in the binary number:
The bits give the binary number 0110 whose decimal
representation is 6. Thus, bit 6 contains an error. To correct the
error the 6th bit is changed from 1 to 0.
Contoh 2
Convolutional Codes
• Pada metoda ini aliran bit kontinyu sumber
dikodekan secara terus menerus, setiap bit
dikonvolusi dan akan menghasilkan symbols,
yang tergantung pada bit saat ini dan urutan
bit sebelumnya.
• Teknik yang digunakan untuk menentukan
urutan output adalah :
– tree diagram
– state diagram
– trellis diagram
Tree Diagram
Contoh Penggunaan
Trellis diagram
Data 1100011101
Tentukan jalur yang dilewati data
tersebut dan simbolnya
Misalkan ada sebuah packet dalam binary: 1110-
1011-0001-10 yang dikirim menggunakan hamming
code 4 bit. Tentukan apakah packet tersebut
mengandung error, jika iya, tentukan posisi errornya,
dan perbaiki isi paket tersebut.
SOAL
1110-1011-0001-10
1111-1011-0001-10
SOLUSI
1. Framing : Pembungkusan datagram ke bentuk frame sebelum ditransmisikan.
2. Physical Address, menambahkan sebuah header dimuka frame untuk mendefinisikan
pengirim dan penerima.
3. Flow Control : karena keterbatasan Buffer pada node, layer link memastikan
pengiriman frame tidak lebih cepat dari pada pemrosesan frame pada receiver.
Apabila bit rate berlebihan atau juga menurun maka flow control akan melakukan
tindakan yang menstabilkan bit rate.
4. Access Control : erangkat yang terhubung dengan link yang sama, lapisan data link
akan menentukan perangkat mana yang akan di kontrol pada saat tertentu.
5. Link Accsess : Link akses ini berhubungan dengan protokol kontrol akses media yang
mengatur bagaimana frame dikirimkan ke tautan.
6. Reliable Delivery : Reliable Delivery ini merupakan pengiriman yang handal menjamin
pengiriman datagram melalui link tanpa error.
7. Error Control : Agar layanan layer reliability, maka dilakukan penambahan mekanisme
deteksi dan transmisi ulang frame yang gagal.
1. Error Detection mendeteksi bit error karena atenuasi sinyal pada link, namun
hal ini tidak meminta frame reset dan frame yang salah akan dibuang.
2. Error Corection : memberikan layanan koreksi error.
Kesimpulan Layanan Link Layer pada Data Link :

More Related Content

Similar to DLC_23 (3).pptx

Traffic Characterization
Traffic CharacterizationTraffic Characterization
Traffic CharacterizationIsmail Mukiibi
 
Module 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfModule 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfShivakrishnan18
 
Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1Ronoh Kennedy
 
Transport Layer In Computer Network
Transport Layer In Computer NetworkTransport Layer In Computer Network
Transport Layer In Computer NetworkDestro Destro
 
CN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxCN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxPondinesh2
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by romaboraroma
 
Computer Networks Module 2.pdf
Computer Networks Module 2.pdfComputer Networks Module 2.pdf
Computer Networks Module 2.pdfShanthalaKV
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control ProtocolsTechiNerd
 
CSC 424 -Lecture 5n8 2022.pptx
CSC 424 -Lecture 5n8 2022.pptxCSC 424 -Lecture 5n8 2022.pptx
CSC 424 -Lecture 5n8 2022.pptxNoraNjepuome3
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layerroma bora
 
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdfNetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdfoptokunal1
 

Similar to DLC_23 (3).pptx (20)

Traffic Characterization
Traffic CharacterizationTraffic Characterization
Traffic Characterization
 
MODULE-4_CCN.pptx
MODULE-4_CCN.pptxMODULE-4_CCN.pptx
MODULE-4_CCN.pptx
 
Nigga.pdf
Nigga.pdfNigga.pdf
Nigga.pdf
 
Module 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfModule 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdf
 
Congestion Control
Congestion ControlCongestion Control
Congestion Control
 
Unit 4
Unit 4Unit 4
Unit 4
 
Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1
 
Transport Layer In Computer Network
Transport Layer In Computer NetworkTransport Layer In Computer Network
Transport Layer In Computer Network
 
Tieu luan qo s
Tieu luan qo sTieu luan qo s
Tieu luan qo s
 
CN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxCN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptx
 
9_Network.ppt
9_Network.ppt9_Network.ppt
9_Network.ppt
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
 
Computer Networks Module 2.pdf
Computer Networks Module 2.pdfComputer Networks Module 2.pdf
Computer Networks Module 2.pdf
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control Protocols
 
CSC 424 -Lecture 5n8 2022.pptx
CSC 424 -Lecture 5n8 2022.pptxCSC 424 -Lecture 5n8 2022.pptx
CSC 424 -Lecture 5n8 2022.pptx
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
 
CN UNIT III.pptx
CN UNIT III.pptxCN UNIT III.pptx
CN UNIT III.pptx
 
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdfNetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
 
Tcp(no ip) review part1
Tcp(no ip) review part1Tcp(no ip) review part1
Tcp(no ip) review part1
 
Mc unit 4-jwfiles
Mc unit 4-jwfilesMc unit 4-jwfiles
Mc unit 4-jwfiles
 

More from zulhelmanz

Audio Compression_2023.pptx
Audio Compression_2023.pptxAudio Compression_2023.pptx
Audio Compression_2023.pptxzulhelmanz
 
Teknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptxTeknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptxzulhelmanz
 
Pendahuluan (12) (1).pptx
Pendahuluan (12) (1).pptxPendahuluan (12) (1).pptx
Pendahuluan (12) (1).pptxzulhelmanz
 
1_Pengantar Komunikasi Data (9).pptx
1_Pengantar Komunikasi Data (9).pptx1_Pengantar Komunikasi Data (9).pptx
1_Pengantar Komunikasi Data (9).pptxzulhelmanz
 
CS553_ST7_Ch09-SpreadSpectrum 23.pptx
CS553_ST7_Ch09-SpreadSpectrum 23.pptxCS553_ST7_Ch09-SpreadSpectrum 23.pptx
CS553_ST7_Ch09-SpreadSpectrum 23.pptxzulhelmanz
 
routing 23.pptx
routing 23.pptxrouting 23.pptx
routing 23.pptxzulhelmanz
 
Media Transmisi_23.pptx
Media Transmisi_23.pptxMedia Transmisi_23.pptx
Media Transmisi_23.pptxzulhelmanz
 
Quality of service (qo s) 2021
Quality of service (qo s) 2021Quality of service (qo s) 2021
Quality of service (qo s) 2021zulhelmanz
 

More from zulhelmanz (9)

MPEG_23.pptx
MPEG_23.pptxMPEG_23.pptx
MPEG_23.pptx
 
Audio Compression_2023.pptx
Audio Compression_2023.pptxAudio Compression_2023.pptx
Audio Compression_2023.pptx
 
Teknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptxTeknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptx
 
Pendahuluan (12) (1).pptx
Pendahuluan (12) (1).pptxPendahuluan (12) (1).pptx
Pendahuluan (12) (1).pptx
 
1_Pengantar Komunikasi Data (9).pptx
1_Pengantar Komunikasi Data (9).pptx1_Pengantar Komunikasi Data (9).pptx
1_Pengantar Komunikasi Data (9).pptx
 
CS553_ST7_Ch09-SpreadSpectrum 23.pptx
CS553_ST7_Ch09-SpreadSpectrum 23.pptxCS553_ST7_Ch09-SpreadSpectrum 23.pptx
CS553_ST7_Ch09-SpreadSpectrum 23.pptx
 
routing 23.pptx
routing 23.pptxrouting 23.pptx
routing 23.pptx
 
Media Transmisi_23.pptx
Media Transmisi_23.pptxMedia Transmisi_23.pptx
Media Transmisi_23.pptx
 
Quality of service (qo s) 2021
Quality of service (qo s) 2021Quality of service (qo s) 2021
Quality of service (qo s) 2021
 

Recently uploaded

定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewingbigorange77
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 

Recently uploaded (20)

定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewing
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
 

DLC_23 (3).pptx

  • 1. Data Link Layer Protocols
  • 2.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 12. Flow control • It is a technique that generally observes the proper flow of data from sender to receiver. It is very essential because it is possible for sender to transmit data or information at very fast rate and hence receiver can receive this information and process it. • This can happen only if receiver has very high load of traffic as compared to sender, or if receiver has power of processing less as compared to sender. • Flow control is basically a technique that gives permission to two of stations that are working and processing at different speeds to just communicate with one another. • Flow control in Data Link Layer simply restricts and coordinates number of frames or amount of data sender can send just before it waits for an acknowledgement from receiver. • Flow control is actually set of procedures that explains sender about how much data or frames it can transfer or transmit before data overwhelms receiver. • The receiving device also contains only limited amount of speed and memory to store data. This is why receiving device should be able to tell or inform the sender about stopping the transmission or transferring of data on temporary basis before it reaches limit. It also needs buffer, large block of memory for just storing data or frames until they are processed.
  • 13.
  • 14. Flow Control • Ensuring the sending entity does not overwhelm the receiving entity – Preventing buffer overflow • Transmission time – Time taken to emit all bits into medium • Propagation time – Time for a bit to traverse the link
  • 15.
  • 16. Model of Frame Transmission
  • 17.
  • 18. Approaches to Flow Control :Flow Control is classified into two categories: • Feedback – based Flow Control : – The sender transmits data or frames after it has received acknowledgements from user. • Rate – based Flow Control : – The sender sends or transfers data at a faster speed to the recipient and the recipient cannot receive data at that speed. The built-in mechanisms in the protocol will only limit the overall speed at which data or information is being transferred or sent by the sender without any feedback or acknowledgment from the receiver.
  • 19. • Feedback – based Flow Control : In this control technique, sender simply transmits data or information or frame to receiver, then receiver transmits data back to sender and also allows sender to transmit more amount of data or tell sender about how receiver is processing or doing. This simply means that sender transmits data or frames after it has received acknowledgements from user. • Rate – based Flow Control : In this control technique, usually when sender sends or transfer data at faster speed to receiver and receiver is not being able to receive data at the speed, then mechanism known as built-in mechanism in protocol will just limit or restricts overall rate at which data or information is being transferred or transmitted by sender without any feedback or acknowledgement from receiver.
  • 20. Techniques of Flow Control in Data Link Layer d to control the flow of data
  • 21. Stop and Wait • Source transmits frame • Destination receives frame and replies with acknowledgement • Source waits for ACK before sending next frame • Destination can stop flow by not send ACK • Works well for a few large frames
  • 22. Fragmentation • Large block of data may be split into small frames – Limited buffer size – Errors detected sooner (when whole frame received) – On error, retransmission of smaller frames is needed – Prevents one station occupying medium for long periods • Stop and wait becomes inadequate
  • 23. 1. Stop-and-Wait Flow Control : This method is the easiest and simplest form of flow control. In this method, basically message or data is broken down into various multiple frames, and then receiver indicates its readiness to receive frame of data. When acknowledgement is received, then only sender will send or transfer the next frame. This process is continued until sender transmits EOT (End of Transmission) frame. In this method, only one of frames can be in transmission at a time. It leads to inefficiency i.e. less productivity if propagation delay is very much longer than the transmission delay and Ultimately In this method sender sent single frame and receiver take one frame at a time and sent acknowledgement(which is next frame number only) for new frame. Advantages – This method is very easiest and simple and each of the frames is checked and acknowledged well. This method is also very accurate. Disadvantages – This method is fairly slow. In this, only one packet or frame can be sent at a time.
  • 24. Stop and Wait ARQ • Characteristics – Used in Connection-oriented communication. – It offers error and flows control – It is used in Data Link and Transport Layers – Stop and Wait for ARQ mainly implements the Sliding Window Protocol concept with Window Size 1
  • 25. • Useful Terms: – Propagation Delay: Amount of time taken by a packet to make a physical journey from one router to another router. – Propagation Delay = (Distance between routers) / (Velocity of propagation) – RoundTripTime (RTT) = 2* Propagation Delay – TimeOut (TO) = 2* RTT – Time To Live (TTL) = 2* TimeOut. (Maximum TTL is 180 seconds)
  • 26. Simple Stop and Wait • Sender: – Rule 1 : Send one data packet at a time. – Rule 2 : end the next packet only after receiving acknowledgement for the previous. • Receiver: – Rule 1 : Send acknowledgement after receiving and consuming a data packet. – Rule 2 : After consuming packet acknowledgement need to be sent (Flow Control)
  • 29. 2. Lost Acknowledgement: After a timeout on the sender side, a long-delayed acknowledgement might be wrongly considered as acknowledgement of some other recent packet. 3. Delayed Acknowledgement/Data:
  • 30. Stop and Wait for ARQ (Automatic Repeat Request) The above 3 problems are resolved by Stop and Wait for ARQ (Automatic Repeat Request) that does both error control and flow control.
  • 32. 3. Delayed Acknowledgement: This is resolved by introducing sequence numbers for acknowledgement also.
  • 33. Working of Stop and Wait for ARQ: 1) Sender A sends a data frame or packet with sequence number 0. 2) Receiver B, after receiving the data frame, sends an acknowledgement with sequence number 1 (the sequence number of the next expected data frame or packet) There is only a one-bit sequence number that implies that both sender and receiver have a buffer for one frame or packet only.
  • 34.
  • 35. Characteristics of Stop and Wait ARQ: • It uses a link between sender and receiver as a half-duplex link • Throughput = 1 Data packet/frame per RTT • If the Bandwidth*Delay product is very high, then they stop and wait for protocol if it is not so useful. • The sender has to keep waiting for acknowledgements before sending the processed next packet. • It is an example of “Closed Loop OR connection-oriented “ protocols • It is a special category of SWP where its window size is 1 • Irrespective of the number of packets sender is having stop and wait for protocol requires only 2 sequence numbers 0 and 1
  • 36. Constraints: 1. Stop and Wait ARQ has very less efficiency . • Fixed by increasing window size. • Improve better efficiency, Return N and Selective Repeat Protocols are used. 2. Stop and Wait ARQ solves three main problems but creates a big performance problem because the sender is always waiting for an acknowledgment even if the next packet is ready to be sent.
  • 37. • Simple Implementation: Stop and Wait ARQ is a simple protocol that is easy to implement in both hardware and software. - Requires no complex hardware algorithms or components, making it a cheap and efficient option. • Error Detection: Stop and Wait ARQ detects errors in the transmitted data by using checksums or cyclic redundancy checks (CRC). If an error is detected, the receiver sends a negative acknowledgment (NAK) to the sender, indicating that the data needs to be retransmitted. • Reliable: Stop and Wait ARQ ensures that the data is transmitted reliably and in order. • Flow Control: Stop and Wait ARQ flow can be used to control the speed at which data is sent by the sender. This is useful in situations where the receiver has limited buffer space or processing power. • Backward Compatibility: Stop and Wait ARQ is compatible with many existing systems and protocols, making it a popular choice for communication over unreliable channels. Advantages of Stop and Wait ARQ :
  • 38. 1. Low Efficiency: Stop and Wait ARQ has low efficiency as it requires the sender to wait for an acknowledgment from the receiver before sending the next data packet. This results in a low data transmission rate, especially for large data sets. 2. High Latency: Stop and Wait ARQ introduces additional latency in the transmission of data, as the sender must wait for an acknowledgment before sending the next packet. This can be a problem for real-time applications such as video streaming or online gaming. 3. Limited Bandwidth Utilization: Stop and Wait ARQ does not utilize the available bandwidth efficiently, as the sender can transmit only one data packet at a time. This results in underutilization of the channel, which can be a problem in situations where the available bandwidth is limited. 4. Limited Error Recovery: Stop and Wait ARQ has limited error recovery capabilities. If a data packet is lost or corrupted, the sender must retransmit the entire packet, which can be time-consuming and can result in further delays. 5. Vulnerable to Channel Noise: Stop and Wait ARQ is vulnerable to channel noise, which can cause errors in the transmitted data. This can result in frequent retransmissions and can impact the overall efficiency of the protocol. Disadvantages of Stop and Wait ARQ :
  • 40. Sliding Windows Flow Control • Allow multiple frames to be in transit • Receiver has buffer W long • Transmitter can send up to W frames without ACK • Each frame is numbered • ACK includes number of next frame expected • Sequence number bounded by size of field (k) – Frames are numbered modulo 2k
  • 43. Sliding Window Enhancements • Receiver can acknowledge frames without permitting further transmission (Receive Not Ready) • Must send a normal acknowledge to resume • If duplex, use piggybacking – If no data to send, use acknowledgement frame – If data but no acknowledgement to send, send last acknowledgement number again, or have ACK valid flag (TCP)
  • 44. Go-Back-N ARQ • Stop and wait ARQ mechanism does not utilize the resources at their best. • When the acknowledgement is received, the sender sits idle and does nothing. • In Go-Back-N ARQ method, both sender and receiver maintain a window.
  • 45. • The sending-window size enables the sender to send multiple frames without receiving the acknowledgement of the previous ones. • The receiving-window enables the receiver to receive multiple frames and acknowledge them. • The receiver keeps track of incoming frame’s sequence number. • The sender sends all the frames in window, it checks up to what sequence number it has received positive acknowledgement. • If all frames are positively acknowledged, the sender sends next set of frames. • If sender finds that it has received NACK or has not receive any ACK for a particular frame, it retransmits all the frames after which it does not receive
  • 46.
  • 47. Selective Repeat ARQ • In Go-back-N ARQ, it is assumed that the receiver does not have any buffer space for its window size and has to process each frame as it comes. • This enforces the sender to retransmit all the frames which are not acknowledged.
  • 48. • In Selective-Repeat ARQ, the receiver while keeping track of sequence numbers, buffers the frames in memory and sends NACK for only frame which is missing or damaged. • The sender in this case, sends only packet for which NACK is received.
  • 49. Sliding Window Flow Control Advantages • It performs much better than stop-and-wait flow control. • This method increases efficiency. • Multiples frames can be sent one after another. • Disadvantages – • The main issue is complexity at the sender and receiver due to the transferring of multiple frames. • The receiver might receive data frames or packets out the sequence.
  • 50. Problem • Ukuran windows 8, gambarkan diagram waktu pengiriman Frame, asumsikan fran ke 5 tidak sampai di penerima, bila menggunakan : – Stop and wait ARQ....Apakah ini memerlukan window ? – Sliding Windows G back N – Sliding Windows Selective Repeat
  • 51. Error Detection • Additional bits added by transmitter for error detection code • Parity – Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones – Even number of bit errors goes undetected
  • 52. Cyclic Redundancy Check • For a block of k bits transmitter generates n bit sequence • Transmit k+n bits which is exactly divisible by some number • Receive divides frame by that number – If no remainder, assume no error – For math, see Stallings chapter 7
  • 53. Error Control o Data errors occur because electromagnetic wave signals are disrupted due to heat, magnetism, and other forms of electricity. o Error control is needed to prevent error sending messages to a higher level in the communication hierarchy. o The probability of a bit experiencing an error is called the Bit Error Rate (BER). o for example: 10 -6 means that in 1 million bits sent there is 1 bit error.
  • 54. Error Control • Detection and correction of errors • Lost frames • Damaged frames • Automatic repeat request – Error detection – Positive acknowledgment – Retransmission after timeout – Negative acknowledgement and retransmission
  • 55. Techniques for Error Control There are various techniques of error control as given below :
  • 56. Type of Errors 1. Single-bit error: 0  1 or 1  0 2. Burst error: Multiple bits are changed
  • 57. Error Control Mechanism 1. Forward Error Control 2. Backward Error Control . • FEC: additional information is sent to the receiver to be used to detect errors and correct errors at once. • Backward Error Control: only used to detect errors, error correction is done by retransmitting data that causes errors.
  • 58. Stop and Wait Characteristics • Used in Connection-oriented communication. • It offers error and flows control • It is used in Data Link and Transport Layers • Stop and Wait for ARQ mainly implements the Sliding Window Protocol concept with Window Size 1 • Useful Terms: – Propagation Delay: Amount of time taken by a packet to make a physical journey from one router to another router. – Propagation Delay = (Distance between routers) / (Velocity of propagation) – RoundTripTime (RTT) = 2* Propagation Delay – TimeOut (TO) = 2* RTT – Time To Live (TTL) = 2* TimeOut. (Maximum TTL is 180 seconds)
  • 60. Error Detection Method • The error detection method consists of four types of redundancy checks, namely VRC, LRC, CRC and Checksum • The first three types are used in the data link layer, while Checksum is on the higher layer.
  • 61. Vertical Redundancy Check (VRC) (Parity Check)
  • 62. VRC Performance • VRC can check all single bits of an error. – In the case of even-parity checking, VRC can detect burst errors if the number of total errors in each unit of data is odd.
  • 64. LRC mechanism • One bit block is divided into several rows and added with one redundant row (LRC) • The content of LRC is a sum of modulo two. • In the recipient is done again, if LRC 0, there is no error
  • 65. Performa LRC • LRC meningkatkan kemampuan pendeteksian burst errors, • LRC dengan n bit dapat mendeteksi burst error n bit
  • 67. 10. CRC decoder for two cases
  • 68. CRC performance • CRC can detect all burst errors whose length is less or equal to the polynomial level.
  • 70.
  • 71. Checksum • Using the Complementary System 1 • Invert every 1 to 0 and 0 to 1 • A and -A are complement 1 of the others • +A=1010 -A=0101 • +0 = 0000  -0 = 1111
  • 73.
  • 74. Performa Checksum • Contoh-contoh no error dan a burst error • Segment 1 10101001 • Segment2 00111001 • Checksum 00011101 • --------------------------------- -------------------------------- • Sum 11111111 Sum 11000110 • Complement 00000000 Complement 00111001 Segment 1 10101111 Segment2 11111001 Checksum 00011101
  • 75. • Error tidak terdeteksi bila pembalikan bit diimbangi oleh an opposite bit inversion pada digit yang berhubungan pada segmen lain. • Segment 1 10111101 10101001 • Segment2 00101001 00111001 • Checksum 00011001 • --------------------------------- • Sum 11111111  Error tidakterdeteksi
  • 76. Error Correction • Error correction requires more bit redundancy than error detection. – For example one extra bit can detect single-bit errors (Parity bit in VRC) • Bit redundancy is used to determine the location of the bit that is experiencing an error. – For example for 7-bit data, 8 conditions are needed, namely 7 conditions for location and one condition for no errors, so three bits of redundancy are needed.
  • 77. 1. Hamming Code • Hamming code is a set of error-correction codes that can be used to detect and correct the errors that can occur when the data is moved or stored from the sender to the receiver. • It is a technique developed by R.W. Hamming for error correction. • Redundant bits – Redundant bits are extra binary bits that are generated and added to the information-carrying bits of data transfer to ensure that no bits were lost during the data transfer.
  • 78. Terminology 1. Codeword is a word formed by data bits and additional bits for check bits. 2. Hamming distance, is the minimum number of bit positions in the sending and receiving code words. 1. Bila hamming distance = n tidak dapat mendeteksi n bit errors. • For example parity bits, with a hamming distance, n = 2 cannot detect data that has a 2-bit error. Example: 0000000 0 0000011 0
  • 79. Parity bit • A parity bit is a bit appended to a data of binary bits to ensure that the total number of 1’s in the data is even or odd. • Parity bits are used for error detection. • There are two types of parity bits: – Even parity bit: In the case of even parity, for a given set of bits, the number of 1’s are counted. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1’s an even number. If the total number of 1’s in a given set of bits is already even, the parity bit’s value is 0. – Odd Parity bit – In the case of odd parity, for a given set of bits, the number of 1’s are counted. If that count is even, the parity bit value is set to 1, making the total count of occurrences of 1’s an odd number. If the total number of 1’s in a given set of bits is already odd, the parity bit’s value is 0.
  • 80. 10. Let us find the Hamming distance between two pairs of words. 1. The Hamming distance d(000, 011) is 2 because Example 2. The Hamming distance d(10101, 11110) is 3 because
  • 81. 10.81 A code for error detection (Example 10.2)
  • 82. 10. Find the minimum Hamming distance of the coding scheme in Table 10.1. Solution We first find all Hamming distances. Example The dmin in this case is 2.
  • 83. 10. Find the minimum Hamming distance of the coding scheme in Table Solution We first find all the Hamming distances. The dmin in this case is 3. Example
  • 84. 10.84 Table 10.2 A code for error correction (Example 10.3)
  • 85. 10. To guarantee the detection of up to s errors in all cases, the minimum Hamming distance in a block code must be dmin = s + 1. Note
  • 86. • The number of redundant bits can be calculated using the following formula: – 2^r ≥ m + r + 1 – where, r = redundant bit, m = data bit • Suppose the number of data bits is 7, then the number of redundant bits can be calculated using: • 2^4 ≥ 7 + 4 + 1 Thus, the number of redundant bits= 4 Parity bits.
  • 87. General Algorithm of Hamming code Hamming Code is simply the use of extra parity bits to allow the identification of an error. 1. Write the bit positions starting from 1 in binary form (1, 10, 11, 100, etc). 2. All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc). 3. All the other bit positions are marked as data bits. 4. Each data bit is included in a unique set of parity bits, as determined its bit position in binary form. a. Parity bit 1 covers all the bits positions whose binary representation includes a 1 in the least significant position (1, 3, 5, 7, 9, 11, etc). b. Parity bit 2 covers all the bits positions whose binary representation includes a 1 in the second position from the least significant bit (2, 3, 6, 7, 10, 11, etc). c. Parity bit 4 covers all the bits positions whose binary representation includes a 1 in the third position from the least significant bit (4–7, 12–15, 20–23, etc). d. Parity bit 8 covers all the bits positions whose binary representation includes a 1 in the fourth position from the least significant bit bits (8–15, 24–31, 40–47, etc). e. In general, each parity bit covers all bits where the bitwise AND of the parity position and the bit position is non-zero. 5. Since we check for even parity set a parity bit to 1 if the total number of ones in the positions it checks is odd. 6. Set a parity bit to 0 if the total number of ones in the positions it checks is even.
  • 88.
  • 89. 7. Determining the position of redundant bits 8. These redundancy bits are placed at positions that correspond to the power of 2. As in the above example: • The number of data bits = 7 • The number of redundant bits = 4 • The total number of bits = 11 • The redundant bits are placed at positions corresponding to power of 2 – 1, 2, 4, and 8
  • 90. Suppose the data to be transmitted is 1011001, the bits will be placed as follows: Determining the Parity bits: R1 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the least significant position. R1: bits 1, 3, 5, 7, 9, 11
  • 91. • To find the redundant bit R1, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R1 is an even number the value of R1 (parity bit’s value) = 0 • R2 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the second position from the least significant bit. R2: bits 2,3,6,7,10,11 To find the redundant bit R2, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R2 is odd the value of R2(parity bit’s value)=1
  • 92. R4 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the third position from the least significant bit. R4: bits 4, 5, 6, 7
  • 93. To find the redundant bit R4, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R4 is odd the value of R4(parity bit’s value) = 1 R8 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the fourth position from the least significant bit. R8: bit 8,9,10,11
  • 94. To find the redundant bit R8, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R8 is an even number the value of R8(parity bit’s value)=0. Thus, the data transferred is: The bits give the binary number 0110 whose decimal representation is 6. Thus, bit 6 contains an error. To correct the error the 6th bit is changed from 1 to 0.
  • 95. Error detection and correction: Suppose in the above example the 6th bit is changed from 0 to 1 during data transmission, then it gives new parity values in the binary number: The bits give the binary number 0110 whose decimal representation is 6. Thus, bit 6 contains an error. To correct the error the 6th bit is changed from 1 to 0.
  • 97.
  • 98. Convolutional Codes • Pada metoda ini aliran bit kontinyu sumber dikodekan secara terus menerus, setiap bit dikonvolusi dan akan menghasilkan symbols, yang tergantung pada bit saat ini dan urutan bit sebelumnya.
  • 99.
  • 100. • Teknik yang digunakan untuk menentukan urutan output adalah : – tree diagram – state diagram – trellis diagram
  • 104.
  • 105. Data 1100011101 Tentukan jalur yang dilewati data tersebut dan simbolnya
  • 106. Misalkan ada sebuah packet dalam binary: 1110- 1011-0001-10 yang dikirim menggunakan hamming code 4 bit. Tentukan apakah packet tersebut mengandung error, jika iya, tentukan posisi errornya, dan perbaiki isi paket tersebut. SOAL
  • 108. 1. Framing : Pembungkusan datagram ke bentuk frame sebelum ditransmisikan. 2. Physical Address, menambahkan sebuah header dimuka frame untuk mendefinisikan pengirim dan penerima. 3. Flow Control : karena keterbatasan Buffer pada node, layer link memastikan pengiriman frame tidak lebih cepat dari pada pemrosesan frame pada receiver. Apabila bit rate berlebihan atau juga menurun maka flow control akan melakukan tindakan yang menstabilkan bit rate. 4. Access Control : erangkat yang terhubung dengan link yang sama, lapisan data link akan menentukan perangkat mana yang akan di kontrol pada saat tertentu. 5. Link Accsess : Link akses ini berhubungan dengan protokol kontrol akses media yang mengatur bagaimana frame dikirimkan ke tautan. 6. Reliable Delivery : Reliable Delivery ini merupakan pengiriman yang handal menjamin pengiriman datagram melalui link tanpa error. 7. Error Control : Agar layanan layer reliability, maka dilakukan penambahan mekanisme deteksi dan transmisi ulang frame yang gagal. 1. Error Detection mendeteksi bit error karena atenuasi sinyal pada link, namun hal ini tidak meminta frame reset dan frame yang salah akan dibuang. 2. Error Corection : memberikan layanan koreksi error. Kesimpulan Layanan Link Layer pada Data Link :