SlideShare a Scribd company logo
1 of 18
Computer Networks
LEC #2
Communicating Over the
Network
Computer Networks
LEC #9
DataLink Layer
(CONT.)
Lecture
Outlines
Error Control
Medium Access Control
Error Control
 Error control is both error detection and error correction.
 It allows the receiver to inform the sender of any frames lost or damaged in
transmission and coordinates the retransmission of those frames by the sender.
Any time an error is detected in an exchange, specified frames are
retransmitted. This process is called automatic repeat request (ARQ).
• Types of Errors: Whenever bits flow from one point to another, they are subject
to unpredictable changes because of interference. This interference can change
the shape of the signal.
• There are two types of error
 Single-Bit Error
Burst Error
Error Detection and Correction
• Single-Bit Error: The term single-bit error means that only 1 bit of a given
data unit (such as a byte, character, or packet) is changed from 1 to 0 or
from 0 to 1.
 Burst Error: The term burst error means that 2 or more bits in the data
unit have changed from 1 to 0 or from 0 to 1.
Figure 7: Example of Single-bit error and Burst error.
Error-Correcting Codes – hamming Code
 https://www.youtube.com/watch?v=aFNfjdFg5-o
 A method that adds redundant bits to a data unit to detect and correct bit
errors.
So, one parity bit can tell us an error occurred
Multiple parity bits can also tell us where it occurred
Hamming Code - Example
 Adding number of bits k to the original data
 the k bits are added in places 20=1, 21=2, 22=4, 23=8, 124=16, ……
 How to determine number of added bits (k)?
 To achieve that we need to accomplish the following relation 2k-1>=n+k
Range of data bits Number of check bits
2-4 3
5-11 4
12-16 5
For example
Consider the original data n is 8 bits = 11000100 use hamming code to
perform error check for transmitted data?
 Solution:
 Because the original data is 8 bits then we will add 4 bits for hamming
code called parity code in positions 20,21,22,23
1 1 0 0 0 1 0 0
P1 P2 1 P4 1 0 0 P8 0 1 0 0
Hamming Code - Example
P1 P2 1 P4 1 0 0 P8 0 1 0 0
 How to compute P1, P2, P4, and P8?
P1=XOR{1,1,0,0,0} (take one and leave one starting from the bit itself) (it equal 0
if number of 1’s is even otherwise it equal 1). So p1=0
P2= XOR{1,0,0,1,0} (take two and leave two starting from the bit itself). So p2=0.
P4=XOR{1,0,0,0} (take four and leave four starting from the bit itself). So p4=1.
P8=XOR{0,1,0,0} (take 8 and leave 8 starting from the bit itself). So p8=1.
SO, Hamming code is
0 0 1 1 1 0 0 1 0 1 0 0
Hamming Code - Example
 To proof there is no error occurred
you need to compute the p1, p2, p4, and p8 at the receiver side
P1= XOR{0,1,1,0,0,0} = 0
P2= {0,1,0,0,1,0} = 0
P4= {1,1,0,0,0}=0
p8= XOR{1,0,1,0,0} = 0
Because all values at the receiver side = 0 then the data is received
correctly.
Hamming Code - Example
How to discover the error if occurred?
Suppose the bit number 7 is arrived incorrectly (altered from 0 to 1) and you do not
know where is error?
0 0 1 1 1 0 1 1 0 1 0 0
 Again, compute p1, p2, p4, and p8 at the receiver side
P1= XOR{0,1,1,1,0,0} = 1
P2= {0,1,,0,1,1} = 1
P4= {1,1,0,1,0}=1
p8= XOR{1,0,1,0,0} = 0
 So, the result of (P8 P4 P2 P1) is (0111) by converting this number to decimal
we found that it equal 7 which means that the error in the position 7.
 So, you can correct it by converting to 0.
Error-Detecting Codes - Cyclic
Redundancy Check (CRC)
Figure 9: Design of Encoder and Decoder
Error-Detecting Codes – CRC (Cont.)
 Example
 Suppose the original data is 100100 and divisor is
1101.
At the sender side:
1. We added to the original message number of zeros equal
the length of divisor -1.
2. Divide the generated new-data by given divisor.
3. The reminder is the CRC which will be appended in the
original message.
Reminder
 So that we will append 3 zeros to the original message
(100100000) and divide it by divisor.
 The transmitted data is 100100001.
 And CRC is 001
XOR
0 0 = 0
0 1 = 1
1 0 = 1
1 1 = 0
Error-Detecting Codes – CRC (Cont.)
 Example
 In the previous example the transmitted
data is 100100001 and divisor is 1101.
 Perform the division.
 The result is equal 0 which means the data
was arrived correctly.
 At the receiver side, https://www.youtube.com/watch?v=-5-cd2VP1n4
 Once the message has been received, the message is divided by the generator,
 If the result equal 0 then the received message is correct
CRC Video
The Channel Allocation Problem
If two frames are transmitted simultaneously, they overlap in time and the resulting
signal is garbled. This event is called a collision.
 There are 2 solutions:
1. Static Channel Allocation
The channel's capacity is divided into fixed portions. Each user is then allocated a
portion for all time. If the user has no traffic to use in its portion, then it goes
unused.
2. Dynamic Channel Allocation
The allocation of the channel changes based on the traffic generated by the users.
Which is better ?
 Static allocation performs better when the traffic is predictable.
 Dynamic channel allocation tries to get better utilization and lower delay on a
channel when the traffic is unpredictable.
Taxonomy of Multiple Access Protocols
• Random Access Protocols (any sender can send data in any time)
Aloha
Slotted Aloha
Carrier sense multiple access (CSMA): Ethernet
• Controlled Access Protocols
polling
Reservation protocols
Token passing protocols
 Channelization Protocols (bandwidth of the link is shared between different hosts)
 Code-division multiple access (CDMA)
Random Access Protocols - Aloha
• If you have a packet, just send it.
• If multiple host/station try it and so there is collision, then try
resending it later!
Random Access Protocols - Slotted Aloha
• Synchronous, that is time is divided into slots
• Slot size is equal to the transmission time of a packet
• Sending data is allowed only at the beginning of these slots
• It is more efficient than Aloha because it reduces the number of collision.
• Collision time is the slot duration
Controlled Access Protocols - Token Passing
• Token is exchanged among hosts in fixed order.
• Host is authorized to send data when it receives a special frame called
token and release it after successful transmission.
• Problem: The failure of one host can crash the entire channel or if the
host accidentally neglects to release the token, then some recover
techniques must be involved to get the token back to work.
18

More Related Content

Similar to 9-Lect_9-2.pptx DataLink Layer DataLink Layer

Data link layar
Data link layarData link layar
Data link layarjaysans
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correctionSisir Ghosh
 
Humming code error detector 7_communications.ppt
Humming code error detector 7_communications.pptHumming code error detector 7_communications.ppt
Humming code error detector 7_communications.pptnesarahmad37
 
Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layerShashank HP
 
Error detection methods-computer networks
Error detection methods-computer networksError detection methods-computer networks
Error detection methods-computer networksDHIVYADEVAKI
 
Computer Networks Module II
Computer Networks Module IIComputer Networks Module II
Computer Networks Module IIAjit Nayak
 
Transport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptxTransport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptxAnkitKumar891632
 
Error detection.
Error detection.Error detection.
Error detection.Wasim Akbar
 
AN INTRODUCTION TO SERIAL PORT INTERFACING
AN INTRODUCTION TO SERIAL PORT INTERFACINGAN INTRODUCTION TO SERIAL PORT INTERFACING
AN INTRODUCTION TO SERIAL PORT INTERFACINGTotal Project Solutions
 
chapter-3-data-link-layer.ppt
chapter-3-data-link-layer.pptchapter-3-data-link-layer.ppt
chapter-3-data-link-layer.pptYashikaAsrani
 
chp2 - data link layer.pptx
chp2 - data link layer.pptxchp2 - data link layer.pptx
chp2 - data link layer.pptxChakra Pani
 
Transmission
TransmissionTransmission
Transmissionmrhaken
 
Data Link Layer Numericals
Data Link Layer NumericalsData Link Layer Numericals
Data Link Layer NumericalsManisha Keim
 
4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdf4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdfkenilpatel65
 

Similar to 9-Lect_9-2.pptx DataLink Layer DataLink Layer (20)

Data link layar
Data link layarData link layar
Data link layar
 
Data link layar
Data link layarData link layar
Data link layar
 
Ch3 datalink
Ch3 datalinkCh3 datalink
Ch3 datalink
 
5 DLL-LLC- Book
5 DLL-LLC- Book5 DLL-LLC- Book
5 DLL-LLC- Book
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 
Humming code error detector 7_communications.ppt
Humming code error detector 7_communications.pptHumming code error detector 7_communications.ppt
Humming code error detector 7_communications.ppt
 
crc_checksum.pdf
crc_checksum.pdfcrc_checksum.pdf
crc_checksum.pdf
 
Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layer
 
Error detection methods-computer networks
Error detection methods-computer networksError detection methods-computer networks
Error detection methods-computer networks
 
Computer Networks Module II
Computer Networks Module IIComputer Networks Module II
Computer Networks Module II
 
Transport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptxTransport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptx
 
Error detection.
Error detection.Error detection.
Error detection.
 
AN INTRODUCTION TO SERIAL PORT INTERFACING
AN INTRODUCTION TO SERIAL PORT INTERFACINGAN INTRODUCTION TO SERIAL PORT INTERFACING
AN INTRODUCTION TO SERIAL PORT INTERFACING
 
Error.pdf
Error.pdfError.pdf
Error.pdf
 
chapter-3-data-link-layer.ppt
chapter-3-data-link-layer.pptchapter-3-data-link-layer.ppt
chapter-3-data-link-layer.ppt
 
chp2 - data link layer.pptx
chp2 - data link layer.pptxchp2 - data link layer.pptx
chp2 - data link layer.pptx
 
K034066071
K034066071K034066071
K034066071
 
Transmission
TransmissionTransmission
Transmission
 
Data Link Layer Numericals
Data Link Layer NumericalsData Link Layer Numericals
Data Link Layer Numericals
 
4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdf4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdf
 

More from ZahouAmel1

2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...ZahouAmel1
 
1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptxZahouAmel1
 
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxLecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxZahouAmel1
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationZahouAmel1
 
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Lec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxLec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxZahouAmel1
 
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptxDB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptxZahouAmel1
 
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyDB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyZahouAmel1
 
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxZahouAmel1
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptxZahouAmel1
 
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...ZahouAmel1
 
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...ZahouAmel1
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork LayerZahouAmel1
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptxZahouAmel1
 
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptxZahouAmel1
 

More from ZahouAmel1 (17)

2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
 
1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx
 
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxLecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType Classification
 
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Lec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxLec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptx
 
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptxDB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
 
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyDB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
 
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
 
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
 
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx
 
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
 

Recently uploaded

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

9-Lect_9-2.pptx DataLink Layer DataLink Layer

  • 1. Computer Networks LEC #2 Communicating Over the Network Computer Networks LEC #9 DataLink Layer (CONT.)
  • 3. Error Control  Error control is both error detection and error correction.  It allows the receiver to inform the sender of any frames lost or damaged in transmission and coordinates the retransmission of those frames by the sender. Any time an error is detected in an exchange, specified frames are retransmitted. This process is called automatic repeat request (ARQ). • Types of Errors: Whenever bits flow from one point to another, they are subject to unpredictable changes because of interference. This interference can change the shape of the signal. • There are two types of error  Single-Bit Error Burst Error
  • 4. Error Detection and Correction • Single-Bit Error: The term single-bit error means that only 1 bit of a given data unit (such as a byte, character, or packet) is changed from 1 to 0 or from 0 to 1.  Burst Error: The term burst error means that 2 or more bits in the data unit have changed from 1 to 0 or from 0 to 1. Figure 7: Example of Single-bit error and Burst error.
  • 5. Error-Correcting Codes – hamming Code  https://www.youtube.com/watch?v=aFNfjdFg5-o  A method that adds redundant bits to a data unit to detect and correct bit errors. So, one parity bit can tell us an error occurred Multiple parity bits can also tell us where it occurred
  • 6. Hamming Code - Example  Adding number of bits k to the original data  the k bits are added in places 20=1, 21=2, 22=4, 23=8, 124=16, ……  How to determine number of added bits (k)?  To achieve that we need to accomplish the following relation 2k-1>=n+k Range of data bits Number of check bits 2-4 3 5-11 4 12-16 5 For example Consider the original data n is 8 bits = 11000100 use hamming code to perform error check for transmitted data?  Solution:  Because the original data is 8 bits then we will add 4 bits for hamming code called parity code in positions 20,21,22,23 1 1 0 0 0 1 0 0 P1 P2 1 P4 1 0 0 P8 0 1 0 0
  • 7. Hamming Code - Example P1 P2 1 P4 1 0 0 P8 0 1 0 0  How to compute P1, P2, P4, and P8? P1=XOR{1,1,0,0,0} (take one and leave one starting from the bit itself) (it equal 0 if number of 1’s is even otherwise it equal 1). So p1=0 P2= XOR{1,0,0,1,0} (take two and leave two starting from the bit itself). So p2=0. P4=XOR{1,0,0,0} (take four and leave four starting from the bit itself). So p4=1. P8=XOR{0,1,0,0} (take 8 and leave 8 starting from the bit itself). So p8=1. SO, Hamming code is 0 0 1 1 1 0 0 1 0 1 0 0
  • 8. Hamming Code - Example  To proof there is no error occurred you need to compute the p1, p2, p4, and p8 at the receiver side P1= XOR{0,1,1,0,0,0} = 0 P2= {0,1,0,0,1,0} = 0 P4= {1,1,0,0,0}=0 p8= XOR{1,0,1,0,0} = 0 Because all values at the receiver side = 0 then the data is received correctly.
  • 9. Hamming Code - Example How to discover the error if occurred? Suppose the bit number 7 is arrived incorrectly (altered from 0 to 1) and you do not know where is error? 0 0 1 1 1 0 1 1 0 1 0 0  Again, compute p1, p2, p4, and p8 at the receiver side P1= XOR{0,1,1,1,0,0} = 1 P2= {0,1,,0,1,1} = 1 P4= {1,1,0,1,0}=1 p8= XOR{1,0,1,0,0} = 0  So, the result of (P8 P4 P2 P1) is (0111) by converting this number to decimal we found that it equal 7 which means that the error in the position 7.  So, you can correct it by converting to 0.
  • 10. Error-Detecting Codes - Cyclic Redundancy Check (CRC) Figure 9: Design of Encoder and Decoder
  • 11. Error-Detecting Codes – CRC (Cont.)  Example  Suppose the original data is 100100 and divisor is 1101. At the sender side: 1. We added to the original message number of zeros equal the length of divisor -1. 2. Divide the generated new-data by given divisor. 3. The reminder is the CRC which will be appended in the original message. Reminder  So that we will append 3 zeros to the original message (100100000) and divide it by divisor.  The transmitted data is 100100001.  And CRC is 001 XOR 0 0 = 0 0 1 = 1 1 0 = 1 1 1 = 0
  • 12. Error-Detecting Codes – CRC (Cont.)  Example  In the previous example the transmitted data is 100100001 and divisor is 1101.  Perform the division.  The result is equal 0 which means the data was arrived correctly.  At the receiver side, https://www.youtube.com/watch?v=-5-cd2VP1n4  Once the message has been received, the message is divided by the generator,  If the result equal 0 then the received message is correct CRC Video
  • 13. The Channel Allocation Problem If two frames are transmitted simultaneously, they overlap in time and the resulting signal is garbled. This event is called a collision.  There are 2 solutions: 1. Static Channel Allocation The channel's capacity is divided into fixed portions. Each user is then allocated a portion for all time. If the user has no traffic to use in its portion, then it goes unused. 2. Dynamic Channel Allocation The allocation of the channel changes based on the traffic generated by the users. Which is better ?  Static allocation performs better when the traffic is predictable.  Dynamic channel allocation tries to get better utilization and lower delay on a channel when the traffic is unpredictable.
  • 14. Taxonomy of Multiple Access Protocols • Random Access Protocols (any sender can send data in any time) Aloha Slotted Aloha Carrier sense multiple access (CSMA): Ethernet • Controlled Access Protocols polling Reservation protocols Token passing protocols  Channelization Protocols (bandwidth of the link is shared between different hosts)  Code-division multiple access (CDMA)
  • 15. Random Access Protocols - Aloha • If you have a packet, just send it. • If multiple host/station try it and so there is collision, then try resending it later!
  • 16. Random Access Protocols - Slotted Aloha • Synchronous, that is time is divided into slots • Slot size is equal to the transmission time of a packet • Sending data is allowed only at the beginning of these slots • It is more efficient than Aloha because it reduces the number of collision. • Collision time is the slot duration
  • 17. Controlled Access Protocols - Token Passing • Token is exchanged among hosts in fixed order. • Host is authorized to send data when it receives a special frame called token and release it after successful transmission. • Problem: The failure of one host can crash the entire channel or if the host accidentally neglects to release the token, then some recover techniques must be involved to get the token back to work.
  • 18. 18