SlideShare a Scribd company logo
1 of 15
Computer Networks
LEC #2
Communicating Over the
Network
Computer Networks
LEC #8
DataLink Layer
Lecture
Outlines
 DataLink Layer.
Framing
Method of Framing
Error Control
Medium Access Control
Next
Lecture
The Data Link Layer
Two basic functions:
• Allows the upper layers to access the media using framing.
• Controls how data is placed on the media and received
from the media using media access control (MAC) and
logical link control (LLC) for flow control and error control.
Framing
 The data link layer takes the packets it gets from the network layer and
encapsulates them into frames for transmission.
 Framing in the data link layer add a source and destination MAC
addresses.
 Data Link layer translates the physical layer’s raw bit stream into discrete
units (message) called frames.
4
Framing: Role of the Header
Header
Data Trailer
Start Address Type/length
Specific bit sequence that indicates to the
receiving device that the frame starts here.
The source and destination
MAC addresses (physical
address). They are only used
for local delivery.
A code identifying the type (fixed size
or variable size of the frame. OR the
total length of the frame.
5
Framing: Role of the Trailer
Header Data
Trailer
FCS Stop
Frame Check Sequence (FCS): Used to provide basic error checking, usually
with a Cyclic Redundancy Check (CRC).
Sending device uses an algorithm on the bits of the header and data
portions.
 The resulting value is placed in the FCS field.
Receiving device does the same thing.
 If the values match – no error.
 If the values do not match – frame discarded.
A specific sequence of bits that indicate the end of the frame.
Methods of Framing
 To perform framing task there are Different methods :
1. Character Count.
2. Flag byte with Byte Stuffing.
3. Starting and ending flag with byte Stuffing.
4. Physical layer coding violations
7
Framing – Character Count
Character Count :
• First field in the frame’s header = the length of the frame.
• Problem:
 Receivers loses synchronization when bits become garbled by
transmission error.
 So, if the bits in the count become corrupted during transmission,
the receiver will think that the frame contains fewer or more bits
than it actually does.
8
For the following data create frames using character count with
size 5, 5, 8, and 8 bytes, respectively.
Framing – Character Count - Example
9
1 2 3 4 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
Answer
5 1 2 3 4 5 6 7 8 9 8 0 1 2 3 4 5 6 8 7 8 9 0 1 2 3
Note that the counted number is included in the length of the frame.
Frame-1 Frame-2 Frame-3 Frame-4
problem, in the previous example. if the byte count of 5 in the second frame
becomes a 7 due to a single bit flip, the destination will get out of
synchronization. It will then be unable to locate the correct start of the next
frame.
Figure 4. A byte stream. (a) Without errors. (b) With one error.
Framing – Character Count
10
Framing – Byte Stuffing
11
Flag byte with Byte Stuffing:
 The data frames can be fixed length or variable length. In variable length
framing, the size of each frame to be transmitted may be different.
So, a pattern of bits is used as a delimiter to mark the end of one frame and
the beginning of the next frame.
 Problem: What happens if the pattern occurs in the message?
 Solution: A byte is stuffed in the message to differentiate from the
delimiter. There should be a strategy so that the receiver does not consider
the pattern as the end of the frame
 a special byte called the escape character (ESC) is stuffed before every
byte in the message (How?)
Framing – Byte Stuffing
• To make things simpler we will consider only three types of byte sequences in
the sent data, as :
F : Flag Sequence
E : Escape Sequence
D : Any other Data Sequence
At Sender (Client) Side
1.Data of each frame is first stuffed with 8-bit flag sequence (‘F’) at the beginning and end of
each frame.
2.Next, the data is scanned to see if any similar flag sequence (‘F’) forms a part of it or not. If
yes, then before each such flag sequence, an extra escape sequence (‘E’) is stuffed.
3.Now, if any similar escape sequence (‘E’) is found to form a part of the data to be sent, then
an extra escape sequence (‘E’) is stuffed before the occurrence of each such escape
sequence.
4.Finally, this stuffed data is sent by the sender.
Framing – Byte Stuffing
At Receiver (Server) Side
1. The receiver skips over the first and last bytes of data received, as they are
merely for signaling the beginning and end of one frame, respectively and
does not carry any useful data.
2. From the next byte on wards data is scanned and if two escape sequences
(‘E’) are found in succession, the first one is de-stuffed. Similarly, if an
escape sequence is followed by a flag sequence (‘F’), the former is de-
stuffed.
3. This strategy helps the receiver recover the actual sent data, accurately.
14
Framing – Byte Stuffing
The following figure shows the original characters before framing and after
framing using byte stuffing in different situations.
15

More Related Content

Similar to 9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx

Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
mekind
 
1Bit and Byte Stuffing computer networks
1Bit and Byte Stuffing computer networks1Bit and Byte Stuffing computer networks
1Bit and Byte Stuffing computer networks
Manimaran A
 
1Bit and Byte Stuffing computer networks
1Bit and Byte Stuffing computer networks1Bit and Byte Stuffing computer networks
1Bit and Byte Stuffing computer networks
Manimaran A
 
Introduction to the OSI 7 layer model and Data Link Layer
Introduction to the OSI 7 layer model and Data Link LayerIntroduction to the OSI 7 layer model and Data Link Layer
Introduction to the OSI 7 layer model and Data Link Layer
VNIT-ACM Student Chapter
 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
k2w9psdb96
 

Similar to 9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx (20)

Unit 2 [autosaved]
Unit 2 [autosaved]Unit 2 [autosaved]
Unit 2 [autosaved]
 
Computer Network Notes UNIT II
Computer Network Notes UNIT IIComputer Network Notes UNIT II
Computer Network Notes UNIT II
 
Framing Protocols
Framing ProtocolsFraming Protocols
Framing Protocols
 
Fa2c4eb1e3582a1a36255a82b258cb03a7dc
Fa2c4eb1e3582a1a36255a82b258cb03a7dcFa2c4eb1e3582a1a36255a82b258cb03a7dc
Fa2c4eb1e3582a1a36255a82b258cb03a7dc
 
Fa2c4eb1e3582a1a36255a82b258cb03a7dc
Fa2c4eb1e3582a1a36255a82b258cb03a7dcFa2c4eb1e3582a1a36255a82b258cb03a7dc
Fa2c4eb1e3582a1a36255a82b258cb03a7dc
 
chp2 - data link layer.pptx
chp2 - data link layer.pptxchp2 - data link layer.pptx
chp2 - data link layer.pptx
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 
1Bit and Byte Stuffing computer networks
1Bit and Byte Stuffing computer networks1Bit and Byte Stuffing computer networks
1Bit and Byte Stuffing computer networks
 
1Bit and Byte Stuffing computer networks
1Bit and Byte Stuffing computer networks1Bit and Byte Stuffing computer networks
1Bit and Byte Stuffing computer networks
 
DLL
DLLDLL
DLL
 
III_UNIT.ppt
III_UNIT.pptIII_UNIT.ppt
III_UNIT.ppt
 
datalinklayermukesh
datalinklayermukeshdatalinklayermukesh
datalinklayermukesh
 
Data link layer
Data link layer Data link layer
Data link layer
 
Unit 2
Unit 2Unit 2
Unit 2
 
III_UNIT.pptx
III_UNIT.pptxIII_UNIT.pptx
III_UNIT.pptx
 
III_UNIT.pptx
III_UNIT.pptxIII_UNIT.pptx
III_UNIT.pptx
 
data link layer - Chapter 3
data link layer - Chapter 3data link layer - Chapter 3
data link layer - Chapter 3
 
Introduction to the OSI 7 layer model and Data Link Layer
Introduction to the OSI 7 layer model and Data Link LayerIntroduction to the OSI 7 layer model and Data Link Layer
Introduction to the OSI 7 layer model and Data Link Layer
 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
 
Chapter 4 data link layer
Chapter 4 data link layerChapter 4 data link layer
Chapter 4 data link layer
 

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.pptx
ZahouAmel1
 
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
ZahouAmel1
 
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
ZahouAmel1
 
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
ZahouAmel1
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 
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
ZahouAmel1
 
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptxDB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
ZahouAmel1
 
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyDB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
ZahouAmel1
 
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
ZahouAmel1
 
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
ZahouAmel1
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
ZahouAmel1
 
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 Layer
ZahouAmel1
 
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
ZahouAmel1
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
ZahouAmel1
 

More from ZahouAmel1 (18)

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
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
 
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-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
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 Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx

  • 1. Computer Networks LEC #2 Communicating Over the Network Computer Networks LEC #8 DataLink Layer
  • 2. Lecture Outlines  DataLink Layer. Framing Method of Framing Error Control Medium Access Control Next Lecture
  • 3. The Data Link Layer Two basic functions: • Allows the upper layers to access the media using framing. • Controls how data is placed on the media and received from the media using media access control (MAC) and logical link control (LLC) for flow control and error control.
  • 4. Framing  The data link layer takes the packets it gets from the network layer and encapsulates them into frames for transmission.  Framing in the data link layer add a source and destination MAC addresses.  Data Link layer translates the physical layer’s raw bit stream into discrete units (message) called frames. 4
  • 5. Framing: Role of the Header Header Data Trailer Start Address Type/length Specific bit sequence that indicates to the receiving device that the frame starts here. The source and destination MAC addresses (physical address). They are only used for local delivery. A code identifying the type (fixed size or variable size of the frame. OR the total length of the frame. 5
  • 6. Framing: Role of the Trailer Header Data Trailer FCS Stop Frame Check Sequence (FCS): Used to provide basic error checking, usually with a Cyclic Redundancy Check (CRC). Sending device uses an algorithm on the bits of the header and data portions.  The resulting value is placed in the FCS field. Receiving device does the same thing.  If the values match – no error.  If the values do not match – frame discarded. A specific sequence of bits that indicate the end of the frame.
  • 7. Methods of Framing  To perform framing task there are Different methods : 1. Character Count. 2. Flag byte with Byte Stuffing. 3. Starting and ending flag with byte Stuffing. 4. Physical layer coding violations 7
  • 8. Framing – Character Count Character Count : • First field in the frame’s header = the length of the frame. • Problem:  Receivers loses synchronization when bits become garbled by transmission error.  So, if the bits in the count become corrupted during transmission, the receiver will think that the frame contains fewer or more bits than it actually does. 8
  • 9. For the following data create frames using character count with size 5, 5, 8, and 8 bytes, respectively. Framing – Character Count - Example 9 1 2 3 4 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 Answer 5 1 2 3 4 5 6 7 8 9 8 0 1 2 3 4 5 6 8 7 8 9 0 1 2 3 Note that the counted number is included in the length of the frame. Frame-1 Frame-2 Frame-3 Frame-4
  • 10. problem, in the previous example. if the byte count of 5 in the second frame becomes a 7 due to a single bit flip, the destination will get out of synchronization. It will then be unable to locate the correct start of the next frame. Figure 4. A byte stream. (a) Without errors. (b) With one error. Framing – Character Count 10
  • 11. Framing – Byte Stuffing 11 Flag byte with Byte Stuffing:  The data frames can be fixed length or variable length. In variable length framing, the size of each frame to be transmitted may be different. So, a pattern of bits is used as a delimiter to mark the end of one frame and the beginning of the next frame.  Problem: What happens if the pattern occurs in the message?  Solution: A byte is stuffed in the message to differentiate from the delimiter. There should be a strategy so that the receiver does not consider the pattern as the end of the frame  a special byte called the escape character (ESC) is stuffed before every byte in the message (How?)
  • 12. Framing – Byte Stuffing • To make things simpler we will consider only three types of byte sequences in the sent data, as : F : Flag Sequence E : Escape Sequence D : Any other Data Sequence At Sender (Client) Side 1.Data of each frame is first stuffed with 8-bit flag sequence (‘F’) at the beginning and end of each frame. 2.Next, the data is scanned to see if any similar flag sequence (‘F’) forms a part of it or not. If yes, then before each such flag sequence, an extra escape sequence (‘E’) is stuffed. 3.Now, if any similar escape sequence (‘E’) is found to form a part of the data to be sent, then an extra escape sequence (‘E’) is stuffed before the occurrence of each such escape sequence. 4.Finally, this stuffed data is sent by the sender.
  • 13. Framing – Byte Stuffing At Receiver (Server) Side 1. The receiver skips over the first and last bytes of data received, as they are merely for signaling the beginning and end of one frame, respectively and does not carry any useful data. 2. From the next byte on wards data is scanned and if two escape sequences (‘E’) are found in succession, the first one is de-stuffed. Similarly, if an escape sequence is followed by a flag sequence (‘F’), the former is de- stuffed. 3. This strategy helps the receiver recover the actual sent data, accurately.
  • 14. 14 Framing – Byte Stuffing The following figure shows the original characters before framing and after framing using byte stuffing in different situations.
  • 15. 15