SlideShare a Scribd company logo
DATA LINK LAYER
CHAPTER 3.
OVERVIEW OF DLL
• The data link layer transforms the physical
layer, a raw transmission facility, to a link
responsible for node-to-node (hop-to-hop)
communication.
• Specific responsibilities of the data link layer
include framing, addressing, flow control,error
control, and media access control.
DLL DESIGN ISSUES
1) Services Provided to the Network Layer:
• The network layer wants to be able to send packets to its neighbors without
worrying about the details of getting it there in one piece.
2) Framing:
• Group the physical layer bit stream into units called frames. Frames are
nothing more than "packets" or "messages". By convention, we use the
term "frames" when discussing DLL.
3) Error Control:
• Sender checksums the frame and transmits checksum together with
data. Receiver re-computes the checksum and compares it with the
received value.
4) Flow Control:
• Prevent a fast sender from overwhelming a slower receiver.
DATA LINK LAYER DESIGN ISSUES
• Providing a well-defined service interface to
the network layer.
• Dealing with transmission errors.
• Regulating the flow of data so that slow
receivers are not swamped by fast senders.
• For this, the data link layer takes the packets it gets from the
network layer and encapsulates them into frames for
transmission.
• Each frame contains a frame header, a payload field for
holding the packet, and a frame trailer.
SERVICES PROVIDED TO THE
NETWORK LAYER
• The function of the data link layer is to provide services to the
network layer.
• The principal service is transferring data from the network layer
on the source machine to the network layer on the destination
machine.
• The data link layer can be designed to offer various services.
• The actual services offered can vary from system to system.
• Three reasonable possibilities that are commonly provided are
• 1) Unacknowledged Connectionless service
• 2) Acknowledged Connectionless service
• 3) Acknowledged Connection-Oriented service
UNACKNOWLEDGED CONNECTIONLESS
SERVICE
• Unacknowledged connectionless service consists of having
the source machine send independent frames to the
destination machine without having the destination machine
acknowledge them.
• No logical connection is established beforehand or released
afterward. If a frame is lost due to noise on the line, no
attempt is made to detect the loss or recover from it in the
data link layer.
• This class of service is appropriate when the error rate is very
low so that recovery is left to higher layers. It is also
appropriate for realtime traffic, such as voice, in which late
data are worse than bad data.
Most LANs use unacknowledged connectionless service in the
data link layer.
ACKNOWLEDGED CONNECTIONLESS SERVICE
• When this service is offered, there are still no logical connections
used, but each frame sent is individually acknowledged.
• In this way, the sender knows whether a frame has arrived correctly.
• If it has not arrived within a specified time interval, it can be sent
again. This service is useful over unreliable channels, such as wireless
systems.
• Adding Ack in the DLL rather than in the Network Layer is just an
optimization and not a requirement. If individual frames are
acknowledged and retransmitted, entire packets get through much
faster.
• On reliable channels, such as fiber, the overhead of a heavyweight
data link protocol may be unnecessary, but on wireless channels,
with their inherent unreliability, it is well worth the cost.
ACKNOWLEDGED CONNECTION-ORIENTED SERVICE
• Here, the source and destination machines establish a connection before
any data are transferred. Each frame sent over the connection is numbered,
and the data link layer guarantees that each frame sent is indeed received.
• Furthermore, it guarantees that each frame is received exactly once and that
all frames are received in the right order.
• When connection-oriented service is used, transfers go through three
distinct phases.
• In the first phase, the connection is established by having both sides
initialize variables and counters needed to keep track of which frames have
been received and which ones have not.
• In the second phase, one or more frames are actually transmitted.
• In the third and final phase, the connection is released, freeing up the
variables, buffers, and other resources used to maintain the connection.
PLACEMENT OF DATA LINK PROTOCOL
• FRAMING:
• DLL translates the physical layer's raw bit stream into
discrete units (messages) called frames.
• How can frame be transmitted so the receiver can detect
frame boundaries? That is, how can the receiver
recognize the start and end of a frame?
• Types of Framing:
• Character Count
• Flag byte with Byte Stuffing
• Starting and ending flag with bite stuffing
• Encoding Violations.
FRAMING – CHARACTER COUNT
• The first framing method uses a field in the
header to specify the number of characters in
the frame.
• When the data link layer at the destination
sees the character count, it knows how many
characters follow and hence where the end of
the frame is.
FRAMING – BYTE STUFFING
• Use reserved characters to indicate the start and end of a frame.
• For instance, use the two-character sequence DLE STX (Data-Link Escape,
Start of Text) to signal the beginning of a frame, and the sequence DLE ETX
(End of TeXt) to flag the frame's end.
• The second framing method, Starting and ending character stuffing, gets
around the problem of resynchronization after an error by having each
frame start with the ASCII character sequence DLE STX and end with the
sequence DLE ETX.
• Problem: What happens if the two-character sequence DLE ETX happens
to appear in the frame itself?
• Solution: Use character stuffing; within the frame, replace every
occurrence of DLE with the two-character sequence DLE DLE.
The receiver reverses the processes, replacing every occurrence of DLE DLE
with a single DLE.
• Example: If the frame contained ``A B DLE D E DLE'', the characters
• transmitted over the channel would be ``DLE STX A B DLE DLE D E DLE
• DLE DLE ETX''.
• Disadvantage: character is the smallest unit that can be operated on; not
all
• architectures are byte oriented.
Byte stuffing and unstuffing
FRAMING – BIT STUFFING
• This technique allows data frames to contain an arbitrary number of bits
and
• allows character codes with an arbitrary number of bits per character. It
• works like this. Each frame begins and ends with a special bit pattern,
• 01111110 (in fact, a flag byte).
• Whenever the sender's data link layer encounters five consecutive 1s in
the
• data, it automatically stuffs a 0 bit into the outgoing bit stream.
• This bit stuffing is analogous to byte stuffing, in which an escape byte is
• stuffed into the outgoing character stream before a flag byte in the data.
• When the receiver sees five consecutive incoming 1 bits, followed by a 0
bit,
• it automatically destuffs (i.e., deletes) the 0 bit

More Related Content

What's hot

Distance Vector & Link state Routing Algorithm
Distance Vector & Link state Routing AlgorithmDistance Vector & Link state Routing Algorithm
Distance Vector & Link state Routing Algorithm
MOHIT AGARWAL
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)
Ramola Dhande
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
N.Jagadish Kumar
 
Flow control in Computer Network
Flow control in Computer NetworkFlow control in Computer Network
Flow control in Computer Network
Ahtesham Ullah khan
 
Data Link Layer
Data Link LayerData Link Layer
Data Link Layer
Sachii Dosti
 
Multiple access control protocol
Multiple access control protocol Multiple access control protocol
Multiple access control protocol
meenamunesh
 
transport layer
transport layer transport layer
transport layer
usman19
 
Network layer tanenbaum
Network layer tanenbaumNetwork layer tanenbaum
Network layer tanenbaum
Mahesh Kumar Chelimilla
 
Presentation Routing algorithm
Presentation Routing algorithmPresentation Routing algorithm
Presentation Routing algorithm
Basit Hussain
 
Token ring
Token ringToken ring
Token ring
selvakumar_b1985
 
Chapter 4 data link layer
Chapter 4 data link layerChapter 4 data link layer
Chapter 4 data link layer
Naiyan Noor
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
roma bora
 
Data link layer
Data link layer Data link layer
Data link layer
Mukesh Chinta
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocal
tes31
 
Transportlayer tanenbaum
Transportlayer tanenbaumTransportlayer tanenbaum
Transportlayer tanenbaum
Mahesh Kumar Chelimilla
 
Computer network switches & their structures
Computer network switches & their structuresComputer network switches & their structures
Computer network switches & their structures
Sweta Kumari Barnwal
 
IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11
Keshav Maheshwari
 
Distance Vector Routing
Distance Vector RoutingDistance Vector Routing
Distance Vector Routing
ShouvikDhali
 

What's hot (20)

Tcp
TcpTcp
Tcp
 
Distance Vector & Link state Routing Algorithm
Distance Vector & Link state Routing AlgorithmDistance Vector & Link state Routing Algorithm
Distance Vector & Link state Routing Algorithm
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Flow control in Computer Network
Flow control in Computer NetworkFlow control in Computer Network
Flow control in Computer Network
 
Data Link Layer
Data Link LayerData Link Layer
Data Link Layer
 
Multiple access control protocol
Multiple access control protocol Multiple access control protocol
Multiple access control protocol
 
transport layer
transport layer transport layer
transport layer
 
Network layer tanenbaum
Network layer tanenbaumNetwork layer tanenbaum
Network layer tanenbaum
 
Presentation Routing algorithm
Presentation Routing algorithmPresentation Routing algorithm
Presentation Routing algorithm
 
Token ring
Token ringToken ring
Token ring
 
Chapter 4 data link layer
Chapter 4 data link layerChapter 4 data link layer
Chapter 4 data link layer
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
 
Data link layer
Data link layer Data link layer
Data link layer
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocal
 
Transportlayer tanenbaum
Transportlayer tanenbaumTransportlayer tanenbaum
Transportlayer tanenbaum
 
Computer network switches & their structures
Computer network switches & their structuresComputer network switches & their structures
Computer network switches & their structures
 
Transport layer
Transport layerTransport layer
Transport layer
 
IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11
 
Distance Vector Routing
Distance Vector RoutingDistance Vector Routing
Distance Vector Routing
 

Similar to Data link layer

Unit 2
Unit 2Unit 2
Unit 2
APARNA P
 
DLL
DLLDLL
datalinklayermukesh
datalinklayermukeshdatalinklayermukesh
datalinklayermukesh
TamiratDejene1
 
datalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptxdatalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptx
lathass5
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
boraroma
 
Data Link Layer
Data Link LayerData Link Layer
Data Link Layer
Rutwik Jadhav
 
Computer Network Notes UNIT II
Computer Network Notes UNIT IIComputer Network Notes UNIT II
Computer Network Notes UNIT II
NANDINI SHARMA
 
Presentation of computer network on data link layer
Presentation of computer network on data link layerPresentation of computer network on data link layer
Presentation of computer network on data link layer
sumit gyawali
 
Chapter 2.1.1.pptx
Chapter 2.1.1.pptxChapter 2.1.1.pptx
Chapter 2.1.1.pptx
botAlert
 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
k2w9psdb96
 
Osi layer model
Osi layer modelOsi layer model
Osi layer model
IshworKhatiwada
 
CN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfCN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdf
Joshuaeeda1
 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
Selvakanmani S
 
Computer network coe351- part4- final
Computer network coe351- part4- finalComputer network coe351- part4- final
Computer network coe351- part4- final
Taymoor Nazmy
 
Frame Relay
Frame RelayFrame Relay
Frame Relay
trendy updates
 
Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3
Zakirul Islam
 
Osi model
Osi model Osi model
Osi model maha tce
 
Data link control.pdf
Data link control.pdfData link control.pdf
Data link control.pdf
DhairyaGohil
 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin Jani
 
Computers network Chapter 3 The data link layer.ppt
Computers network Chapter 3 The data link layer.pptComputers network Chapter 3 The data link layer.ppt
Computers network Chapter 3 The data link layer.ppt
kekeuwoe
 

Similar to Data link layer (20)

Unit 2
Unit 2Unit 2
Unit 2
 
DLL
DLLDLL
DLL
 
datalinklayermukesh
datalinklayermukeshdatalinklayermukesh
datalinklayermukesh
 
datalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptxdatalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptx
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
 
Data Link Layer
Data Link LayerData Link Layer
Data Link Layer
 
Computer Network Notes UNIT II
Computer Network Notes UNIT IIComputer Network Notes UNIT II
Computer Network Notes UNIT II
 
Presentation of computer network on data link layer
Presentation of computer network on data link layerPresentation of computer network on data link layer
Presentation of computer network on data link layer
 
Chapter 2.1.1.pptx
Chapter 2.1.1.pptxChapter 2.1.1.pptx
Chapter 2.1.1.pptx
 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
 
Osi layer model
Osi layer modelOsi layer model
Osi layer model
 
CN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfCN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdf
 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
 
Computer network coe351- part4- final
Computer network coe351- part4- finalComputer network coe351- part4- final
Computer network coe351- part4- final
 
Frame Relay
Frame RelayFrame Relay
Frame Relay
 
Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3
 
Osi model
Osi model Osi model
Osi model
 
Data link control.pdf
Data link control.pdfData link control.pdf
Data link control.pdf
 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batch
 
Computers network Chapter 3 The data link layer.ppt
Computers network Chapter 3 The data link layer.pptComputers network Chapter 3 The data link layer.ppt
Computers network Chapter 3 The data link layer.ppt
 

Recently uploaded

weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 

Data link layer

  • 2. OVERVIEW OF DLL • The data link layer transforms the physical layer, a raw transmission facility, to a link responsible for node-to-node (hop-to-hop) communication. • Specific responsibilities of the data link layer include framing, addressing, flow control,error control, and media access control.
  • 3.
  • 4. DLL DESIGN ISSUES 1) Services Provided to the Network Layer: • The network layer wants to be able to send packets to its neighbors without worrying about the details of getting it there in one piece. 2) Framing: • Group the physical layer bit stream into units called frames. Frames are nothing more than "packets" or "messages". By convention, we use the term "frames" when discussing DLL. 3) Error Control: • Sender checksums the frame and transmits checksum together with data. Receiver re-computes the checksum and compares it with the received value. 4) Flow Control: • Prevent a fast sender from overwhelming a slower receiver.
  • 5. DATA LINK LAYER DESIGN ISSUES • Providing a well-defined service interface to the network layer. • Dealing with transmission errors. • Regulating the flow of data so that slow receivers are not swamped by fast senders.
  • 6. • For this, the data link layer takes the packets it gets from the network layer and encapsulates them into frames for transmission. • Each frame contains a frame header, a payload field for holding the packet, and a frame trailer.
  • 7. SERVICES PROVIDED TO THE NETWORK LAYER • The function of the data link layer is to provide services to the network layer. • The principal service is transferring data from the network layer on the source machine to the network layer on the destination machine. • The data link layer can be designed to offer various services. • The actual services offered can vary from system to system. • Three reasonable possibilities that are commonly provided are • 1) Unacknowledged Connectionless service • 2) Acknowledged Connectionless service • 3) Acknowledged Connection-Oriented service
  • 8. UNACKNOWLEDGED CONNECTIONLESS SERVICE • Unacknowledged connectionless service consists of having the source machine send independent frames to the destination machine without having the destination machine acknowledge them. • No logical connection is established beforehand or released afterward. If a frame is lost due to noise on the line, no attempt is made to detect the loss or recover from it in the data link layer. • This class of service is appropriate when the error rate is very low so that recovery is left to higher layers. It is also appropriate for realtime traffic, such as voice, in which late data are worse than bad data. Most LANs use unacknowledged connectionless service in the data link layer.
  • 9. ACKNOWLEDGED CONNECTIONLESS SERVICE • When this service is offered, there are still no logical connections used, but each frame sent is individually acknowledged. • In this way, the sender knows whether a frame has arrived correctly. • If it has not arrived within a specified time interval, it can be sent again. This service is useful over unreliable channels, such as wireless systems. • Adding Ack in the DLL rather than in the Network Layer is just an optimization and not a requirement. If individual frames are acknowledged and retransmitted, entire packets get through much faster. • On reliable channels, such as fiber, the overhead of a heavyweight data link protocol may be unnecessary, but on wireless channels, with their inherent unreliability, it is well worth the cost.
  • 10. ACKNOWLEDGED CONNECTION-ORIENTED SERVICE • Here, the source and destination machines establish a connection before any data are transferred. Each frame sent over the connection is numbered, and the data link layer guarantees that each frame sent is indeed received. • Furthermore, it guarantees that each frame is received exactly once and that all frames are received in the right order. • When connection-oriented service is used, transfers go through three distinct phases. • In the first phase, the connection is established by having both sides initialize variables and counters needed to keep track of which frames have been received and which ones have not. • In the second phase, one or more frames are actually transmitted. • In the third and final phase, the connection is released, freeing up the variables, buffers, and other resources used to maintain the connection.
  • 11. PLACEMENT OF DATA LINK PROTOCOL
  • 12. • FRAMING: • DLL translates the physical layer's raw bit stream into discrete units (messages) called frames. • How can frame be transmitted so the receiver can detect frame boundaries? That is, how can the receiver recognize the start and end of a frame? • Types of Framing: • Character Count • Flag byte with Byte Stuffing • Starting and ending flag with bite stuffing • Encoding Violations.
  • 13.
  • 14. FRAMING – CHARACTER COUNT • The first framing method uses a field in the header to specify the number of characters in the frame. • When the data link layer at the destination sees the character count, it knows how many characters follow and hence where the end of the frame is.
  • 15.
  • 16. FRAMING – BYTE STUFFING • Use reserved characters to indicate the start and end of a frame. • For instance, use the two-character sequence DLE STX (Data-Link Escape, Start of Text) to signal the beginning of a frame, and the sequence DLE ETX (End of TeXt) to flag the frame's end. • The second framing method, Starting and ending character stuffing, gets around the problem of resynchronization after an error by having each frame start with the ASCII character sequence DLE STX and end with the sequence DLE ETX. • Problem: What happens if the two-character sequence DLE ETX happens to appear in the frame itself? • Solution: Use character stuffing; within the frame, replace every occurrence of DLE with the two-character sequence DLE DLE.
  • 17. The receiver reverses the processes, replacing every occurrence of DLE DLE with a single DLE. • Example: If the frame contained ``A B DLE D E DLE'', the characters • transmitted over the channel would be ``DLE STX A B DLE DLE D E DLE • DLE DLE ETX''. • Disadvantage: character is the smallest unit that can be operated on; not all • architectures are byte oriented.
  • 18.
  • 19. Byte stuffing and unstuffing
  • 20. FRAMING – BIT STUFFING • This technique allows data frames to contain an arbitrary number of bits and • allows character codes with an arbitrary number of bits per character. It • works like this. Each frame begins and ends with a special bit pattern, • 01111110 (in fact, a flag byte). • Whenever the sender's data link layer encounters five consecutive 1s in the • data, it automatically stuffs a 0 bit into the outgoing bit stream. • This bit stuffing is analogous to byte stuffing, in which an escape byte is • stuffed into the outgoing character stream before a flag byte in the data. • When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, • it automatically destuffs (i.e., deletes) the 0 bit