SlideShare a Scribd company logo
1 of 9
Download to read offline
mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani
1Chap 11. Data Link Control
11. Data Link Control
1. Briefly describe the services provided by the data link layer.
The two main functions of the data link layer are data link control and media access control.
(1) Data link control functions include framing, flow and error control. The stream of bits received from
network layer is divided into smaller data units called frames. Flow control decides the amount of
data that can be sent before receiving an acknowledgment. Error control means error detection and
correction.
(2) The second function of the data link layer is media access control (also called as line discipline), or
how to share the link. Line discipline determines which device can send and when it can send.
Collisions must be avoided and media must be shared by many systems that need to transmit on the
same channel.
2. Define framing and the reason for its need.
The stream of bits received from network layer is divided into smaller data units called frames.
Data transmission in the physical layer means moving bits in the form of a signal from the source to the
destination. The physical layer provides bit synchronization to ensure that the sender and receiver use the
same bit durations and timing. But, the data link layer must pack bits into frames, so that each frame is
distinguishable from another.
What does framing do and why is it necessary?
1. Framing in the data link layer adds a sender address and a destination address. The destination
address specifies where the packet should go; the sender address is used to send an
acknowledgement back to the sender.
2. A whole message could be packed in one frame but that is not normally done, because a large frame
can make flow and error control very inefficient.
3. When a message is carried in one very large frame, even a single-bit error would require the
retransmission of the whole message. When a message is divided into smaller frames, a single-bit
error affects only that small frame and only the affected frame needs to be retransmitted.
Fixed-Size Framing
Frames can be of fixed or variable size. In fixed-size framing, there is no need for defining the
boundaries of the frames; the size itself can be used as a delimiter.
Variable-Size Framing
In variable-size framing, we must define the end of a frame and the beginning of the next. This is
commonly used in local area networks. Two approaches are used for this purpose: a character-oriented
approach and a bit-oriented approach.
3. Compare and contrast byte-oriented and bit-oriented protocols. Which category has been popular
in the past (explain the reason)? Which category is popular now (explain the reason)?
Character-oriented protocol
In a character-oriented protocol, data to be carried are 8-bit characters (ASCII). The header carries the
source and destination addresses and other control information, and the trailer carries error detection or
error correction redundant bits, are also multiples of 8 bits.
To separate one frame from the next, an 8-bit (1-byte) flag is added at the beginning and the end of a
frame. The flag contains special characters and it indicates the start or end of a frame. Figure below
shows the format of a frame in a character-oriented protocol.
Drawbacks of character-oriented protocol:
End of a frame Start of a frame
Prof. Mukesh N Tekwani mukeshtekwani@hotmail.com
2 Data Link Control
Character-oriented framing was popular when only text was exchanged by the data link layers. The flag
could be selected to be any character not used for text communication. But now we send other types of
information such as graphs, audio, and video. Any pattern used for the flag could also be part of the
information. If this happens, the receiver, when it encounters this pattern in the middle of the data, thinks
it has reached the end of the frame. This drawback is overcome by using a byte-stuffing strategy.
Bit-oriented protocol
In a bit-oriented protocol, the data section of a frame is a sequence of bits which is interpreted by the
upper layer as text, audio, video or graphics. To separate one frame from another, an 8-bit flag such as
01111110 is used and it marks the beginning and end of a frame. This is shown in the diagram below:
Drawbacks:
This flag can create the same type of problem as in the byte-oriented protocols. That is, if the flag pattern
appears in the data, we need to somehow inform the receiver that this is not the end of the frame. We do
this by stuffing 1 single bit (instead of 1 byte) to prevent the pattern from looking like a flag. The
strategy is called bit stuffing. In bit stuffing, if a 0 and five consecutive I bits are encountered, an extra 0
is added. This extra stuffed bit is eventually removed from the data by the receiver. Note that the extra
bit is added after one 0 followed by five 1s regardless of the value of the next bit. This guarantees that
the flag field sequence does not inadvertently appear in the frame.
4. Compare and contrast byte-stuffing and bit-stuffing.
Byte-stuffing Strategy:
Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape character in the text.
1. In byte stuffing, a special byte is added to the data section of the frame when there is a character
with the same pattern as the flag. The data section is stuffed with an extra byte. This byte is usually
called the escape character (ESC), which has a predefined bit pattern.
2. Whenever the receiver encounters the ESC character, it removes it from the data section and treats
the next character as data, not a delimiting flag.
3. Byte stuffing by the escape character allows the presence of the flag in the data section of the frame,
but it creates another problem. What happens if the text contains one or more escape characters
followed by a flag? The receiver removes the escape character, but keeps the flag, which is
incorrectly interpreted as the end of the frame.
4. To solve this problem, the escape characters that are part of the text must also be marked by another
escape character. In other words, if the escape character is part of the text, an extra one is added to
show that the second one is part of the text.
Bit-stuffing Strategy:
1. In a bit-oriented protocol, the data section of a frame is a sequence of bits which is interpreted by the
upper layer as text, audio, video or graphics.
2. To separate one frame from another, an 8-bit flag such as 01111110 is used and it marks the
beginning and end of a frame.
3. Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data,
so that the receiver does not mistake the pattern 0111110 for a flag.
4. This flag can create some problems. If the flag pattern appears in the data, we need to somehow
inform the receiver that this is not the end of the frame.
5. We do this by stuffing 1 single bit (instead of I byte) to prevent the pattern from looking like a flag.
The strategy is called bit stuffing.
6. In bit stuffing, if a 0 and five consecutive 1 bits are encountered, an extra 0 is added. This extra
mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani
3Chap 11: Data Link Control
stuffed bit is eventually removed from the data by the receiver. The extra bit is added after one 0
followed by five 1s regardless of the value of the next bit. This guarantees that the flag field
sequence does not appear in the frame by mistake.
Even if we have a 0 after five 1s, we still stuff a 0. The 0 will be removed by the receiver. This means
that if the flaglike pattern 01111110 appears in the data, it will change to 011111010 (stuffed).
5. Compare and contrast flow control and error control
Flow Control:
1. Flow control refers to a set of procedures used to restrict the amount of data that the sender can
send before waiting for acknowledgment.
2. Flow control is concerned with the amount of data that can be sent before receiving an
acknowledgment.
3. Any receiving device has a limited speed at which it can process incoming data and a limited amount
of memory in which to store incoming data. The receiving device should not receive data at a rate
that is more than the rate at which it can process this data
4. The receiving device must be able to inform the sending device before those limits are reached and
to request that the transmitting device send fewer frames or stop temporarily.
5. Incoming data must be checked and processed before they can be used. The rate of such processing
is often slower than the rate of transmission. For this reason, each receiving device has a block of
memory, called a buffer, reserved for storing incoming data until they are processed. If the buffer
begins to fill up, the receiver must be able to tell the sender to halt transmission until it is once again
able to receive.
Error Control:
1. Error control in the data link layer is based on automatic repeat request, which is the retransmission
of data.
2. Error control involves both error detection and error correction.
3. 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.
4. In the data link layer, the term error control refers primarily to methods of error detection and
retransmission.
5. How is error control implemented in the data link layer? Error control in the data link layer is
implemented simply: Any time an error is detected in an exchange, specified frames are
retransmitted. This process is called automatic repeat request (ARQ).
6. What are the two protocols for noiseless channels? What are the three protocols for noisy
channels?
Data link layer uses protocols to combine framing, flow control, and error control. The protocols used by
this layer can be divided into two types:
a) Protocols for noiseless channel
Prof. Mukesh N Tekwani mukeshtekwani@hotmail.com
4 Data Link Control
a. Simplest
b. Stop-and-wait
b) Protocols for noisy channel
a. Stop-and-Wait ARQ
b. Go-Back-N ARQ
c. Selective Repeat ARQ
7. Describe the Simplest protocol used for an ideal (noiseless) channel.
Simplest Protocol:
1. The Simplest Protocol has no flow or error control.
2. It is a unidirectional protocol in which data frames are traveling in only one direction-from the
sender to receiver.
3. We assume that the receiver can immediately handle any frame it receives with a processing time
that is small enough to be negligible.
4. The data link layer at the sender site gets data from its network layer, makes a frame out of the data,
and sends it.
5. The data link layer at the receiver site receives a frame from its physical layer, removes header from
the frame (extracts data from the frame) and delivers the data to its network layer.
6. Thus, the receiver can never be overwhelmed (flooded) with incoming frames.
7. The data link layers of the sender and receiver provide transmission services for their network layers.
The data link layers use the services provided by their physical layers for the physical transmission
of bits.
Implementation of the protocol as a procedure:
We introduce the idea of events in this protocol. The procedure at the sender site is constantly running;
an action takes place only when there is a request from the network layer. The procedure at the receiver
site is also constantly running, but there is an action only when the physical layer informs it. Both
procedures are constantly running because they do not know when the corresponding events will occur.
Sender-side Algorithm: Receiver-side Algorithm:
while (true) //repeat forever
{
WaitForEvent(); //sleep until an event occurs
If(Event(RequestToSend)) //there is a
//packet to send
{
GetData();
MakeFrame();
SendFrame(); //send the frame
}
}
while (true) //repeat forever
{
WaitForEvent(); //sleep until an event occurs
If(Event(ArrivalNotofication)) //there is a
//packet to send
{
ReceiveFrame();
ExtractData();
DeliverData(); //send the frame
}
}
mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani
5Chap 11: Data Link Control
8. Describe the Stop-And-Wait Protocol for a noiseless channel.
1. The Stop-and-Wait Protocol is so called because the sender sends one frame, stops until it receives
confirmation from the receiver (okay to go ahead), and then sends the next frame.
2. If data frames arrive at the receiver site faster than they can be processed, the frames must be stored
until their use.
3. Normally, the receiver does not have enough storage space, especially if it is receiving data from
many sources. This may result in either the discarding of frames or denial of service.
4. To prevent the receiver from becoming flooded with frames, we must tell the sender to slow down.
5. There must be feedback from the receiver to the sender.
6. We have unidirectional communication for data frames, but auxiliary ACK frames
(acknowledgment) travel from the other direction. We add flow control to the Simplest protocol. We
use a half-duplex link.
Prof. Mukesh N Tekwani mukeshtekwani@hotmail.com
6 Data Link Control
Sender-side Algorithm for Stop-And-Wait Protocol:
Receiver-side Algorithm for Stop-And-Wait Protocol:
9. Discuss the Stop-And-Wait Automatic Repeat Request Protocol for a noisy channel.
1. The Stop-and-Wait Automatic Repeat Request (Stop-and-Wait ARQ) is a modification of the Stop-and-Wait
protocol. It adds a simple error control mechanism to the Stop-and-Wait Protocol.
2. Redundancy Bits in frame: To detect and correct corrupted frames, we need to add redundancy bits to our
data frame. When the frame arrives at the receiver site, it is checked and if it is corrupted, it is discarded.
3. Error detection by not responding: No response from the receiver implies that it has detected some errors.
4. Frame numbering: Lost frames are more difficult to handle than corrupted ones. In other protocols such as
Simplest and Stop-and-Wait, there was no way to identify a frame. The received frame could be the correct
one, or a duplicate, or a frame out of order. We now number the frames. When the receiver receives a data
frame that is out of order, this means that frames were either lost or duplicated.
5. The corrupted and lost frames must be resent in this protocol. If the receiver does not respond when there is an
error, how can the sender know which frame to resend? To solve this problem, the sender keeps a copy of the
sent frame. At the same time, it starts a timer. If the timer expires and there is no ACK for the sent frame, the
frame is resent, the copy is held, and the timer is restarted. Since the protocol uses the stop-and-wait
mechanism, there is only one specific frame that needs an ACK even though several copies of the same frame
can be in the network.
6. Numbering the ACK frames: Since an ACK frame can also be corrupted and lost, it also needs redundancy
mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani
7Chap 11: Data Link Control
bits and a sequence number. The ACK frame for this protocol has a sequence number field. The sender
discards a corrupted ACK frame.
7. Sequence Numbers: We want to minimize the frame size and therefore we look for the smallest range
of sequence numbers for numbering the frames. If the sequence number field is m bits long, the
sequence number can go from 0 to 2m – 1, and then wrap around. If we have used x as a sequence
number then the next frame will have x + 1 as the sequence number.
8. Acknowledgement Number: The acknowledgment numbers always announce the sequence number of
the next frame expected by the receiver. For example, if frame 0 has arrived safe and sound, the
receiver sends an ACK frame with acknowledgment 1 (meaning frame 1 is expected next). If frame
1 has arrived safe and sound, the receiver sends an ACK frame with acknowledgment 0 (meaning
frame 0 is expected).
9. Inefficient: This protocol is very inefficient if the channel has a large bandwidth (thick) and if the
round-trip delay is long. The product of these two parameters is called bandwidth-delay product.
10. Pipelining: Pipelining means beginning a task before the previous task has ended. In this protocol
there is no pipelining because we have to wait for a frame to reach the destination, and receive the
acknowledgment before the next frame is sent.
Protocol Design Issues:
1. The sending device keeps a copy of the last frame sent until it receives an ACK for that frame. It can
retransmit the lost or damaged frames .
2. The Sender has a control variable Sn which is the sequence number of the next frame to send.
3. Similarly, the Receiver has a control variable Rn which holds the sequence number of the next frame
that is expected.
4. When a frame is sent, the value of Sn is incremented (modulo – 2), (if it is 1 it becomes 0, and vice-
versa.
5. When a frame is received, the value of Rn is incremented (modulo – 2), (if it is 1 it becomes 0, etc)
6. A data frame 0 is acknowledged by ACK 1 frame indicating that the receiver has got the frame 0 and
is now expecting data frame 0.
Sender-side Algorithm:
Sn = 0; //frame 0 should be sent first
canSend = true;
while(true)
{
WaitforEvent(); //sleep until an event occurs
if (Event (RequestToSend) AND canSend)
{
GetData () ;
Prof. Mukesh N Tekwani mukeshtekwani@hotmail.com
8 Data Link Control
MakeFrame (Sn) ;
StoreFrame(Sn);
SendFrame(Sn) ;
StartTimerO;
Sn = Sn + 1;
canSend = false;
}
WaitforEvent();
if (Event (ArrivaINotification)
{
ReceiveFrame(ackNo);
if(not corrupted AND ackNo == Sn) //valid ACK
{
Stoptimer();
PurgeFrame(Sn-l); //copy is not needed
canSend = true;
}
}
if (Event (TimeOot)
{
StartTimer();
ResendFrame(Sn-l);
}
}
Receiver Side Algorithm:
Rn = 0; //frame 0 expected to arrive first
while (true)
{
WaitForEvent(); //sleep until an event occurs
if(Event(Arriva1Notification)) //data frame arrices
{
ReceiveFrame();
if(corrupted(frame))
sleep ();
if (seqNo == Rn) //valid data frame
{
ExtractData();
De1iverData(); //deliver data
Rn = Rn + 1;
}
SendFrame (Rn) ; //send an ACK
}
}
10. Assume that, in a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit takes
20 ms to make a round trip. a) What is the bandwidth-delay product? b)If the system data frames
are 1000 bits in length, what is the utilization percentage of the link? c) If the protocol can send 15
frames before stopping and waiting for the ACK, what is the utilization?
a) The bandwidth-delay product is :
(1 x 106
Mbps) x (20 x 10-3
s) = 20,000 bits
b) The system can send 20,000 bits during the time it takes for the data to go from the sender to the
receiver and then back again. But, the system sends only 1000 bits. Thus, the link utilization is only
1000/20,000, or 5 percent. For this reason, for a link with a high bandwidth or long delay, the use of
Stop-and-Wait ARQ wastes the capacity of the link.
c) The system can send 15 frames = 15 x 1000 bits = 15,000 bits. The utilization now becomes
15000/20000 = 75%.
mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani
9Chap 11: Data Link Control

More Related Content

What's hot

Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptxNaveen Dubey
 
GSM Radio interface
GSM Radio interfaceGSM Radio interface
GSM Radio interfaceRUpaliLohar
 
Application layer
Application layerApplication layer
Application layerreshmadayma
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSDr. SELVAGANESAN S
 
Chapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionChapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionJeoffnaRuth
 
Framming data link layer
Framming data link layerFramming data link layer
Framming data link layerPREMAL GAJJAR
 
Mobile transport layer - traditional TCP
Mobile transport layer - traditional TCPMobile transport layer - traditional TCP
Mobile transport layer - traditional TCPVishal Tandel
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit ivJAIGANESH SEKAR
 

What's hot (20)

Network delay
Network delayNetwork delay
Network delay
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptx
 
GSM Radio interface
GSM Radio interfaceGSM Radio interface
GSM Radio interface
 
Ieee 802.11 wireless lan
Ieee 802.11 wireless lanIeee 802.11 wireless lan
Ieee 802.11 wireless lan
 
Application layer
Application layerApplication layer
Application layer
 
Transport Protocols
Transport ProtocolsTransport Protocols
Transport Protocols
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Token ring
Token ringToken ring
Token ring
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Chapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionChapter 10: Error Correction and Detection
Chapter 10: Error Correction and Detection
 
Framming data link layer
Framming data link layerFramming data link layer
Framming data link layer
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
IPV4 Frame Format
IPV4 Frame FormatIPV4 Frame Format
IPV4 Frame Format
 
Quality of service
Quality of serviceQuality of service
Quality of service
 
Mobile transport layer - traditional TCP
Mobile transport layer - traditional TCPMobile transport layer - traditional TCP
Mobile transport layer - traditional TCP
 
2. data and signals
2. data and signals2. data and signals
2. data and signals
 
Data link layer
Data link layer Data link layer
Data link layer
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
 

Viewers also liked

Java chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and useJava chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and useMukesh Tekwani
 
Java chapter 3 - OOPs concepts
Java chapter 3 - OOPs conceptsJava chapter 3 - OOPs concepts
Java chapter 3 - OOPs conceptsMukesh Tekwani
 
Python - Regular Expressions
Python - Regular ExpressionsPython - Regular Expressions
Python - Regular ExpressionsMukesh Tekwani
 
Python reading and writing files
Python reading and writing filesPython reading and writing files
Python reading and writing filesMukesh Tekwani
 
Phases of the Compiler - Systems Programming
Phases of the Compiler - Systems ProgrammingPhases of the Compiler - Systems Programming
Phases of the Compiler - Systems ProgrammingMukesh Tekwani
 
Digital signal and image processing FAQ
Digital signal and image processing FAQDigital signal and image processing FAQ
Digital signal and image processing FAQMukesh Tekwani
 
Data communications ch 1
Data communications   ch 1Data communications   ch 1
Data communications ch 1Mukesh Tekwani
 
Chap 3 data and signals
Chap 3 data and signalsChap 3 data and signals
Chap 3 data and signalsMukesh Tekwani
 
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File TransferChapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File TransferWayne Jones Jnr
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programmingMukesh Tekwani
 

Viewers also liked (19)

Java chapter 3
Java   chapter 3Java   chapter 3
Java chapter 3
 
Html tables examples
Html tables   examplesHtml tables   examples
Html tables examples
 
Java chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and useJava chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and use
 
Java chapter 3 - OOPs concepts
Java chapter 3 - OOPs conceptsJava chapter 3 - OOPs concepts
Java chapter 3 - OOPs concepts
 
Python - Regular Expressions
Python - Regular ExpressionsPython - Regular Expressions
Python - Regular Expressions
 
Html graphics
Html graphicsHtml graphics
Html graphics
 
Java 1-contd
Java 1-contdJava 1-contd
Java 1-contd
 
Java swing 1
Java swing 1Java swing 1
Java swing 1
 
Java misc1
Java misc1Java misc1
Java misc1
 
Python reading and writing files
Python reading and writing filesPython reading and writing files
Python reading and writing files
 
Phases of the Compiler - Systems Programming
Phases of the Compiler - Systems ProgrammingPhases of the Compiler - Systems Programming
Phases of the Compiler - Systems Programming
 
Jdbc 1
Jdbc 1Jdbc 1
Jdbc 1
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
 
Java chapter 5
Java chapter 5Java chapter 5
Java chapter 5
 
Digital signal and image processing FAQ
Digital signal and image processing FAQDigital signal and image processing FAQ
Digital signal and image processing FAQ
 
Data communications ch 1
Data communications   ch 1Data communications   ch 1
Data communications ch 1
 
Chap 3 data and signals
Chap 3 data and signalsChap 3 data and signals
Chap 3 data and signals
 
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File TransferChapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
 

Similar to Data Link Layer

data link layer to print
data link layer to printdata link layer to print
data link layer to printBishalWosti1
 
data link layer - Chapter 3
data link layer - Chapter 3data link layer - Chapter 3
data link layer - Chapter 3SakthiVinoth78
 
mod-3-cn-ppt (1).pdf bca bsc btech notes
mod-3-cn-ppt (1).pdf bca bsc btech notesmod-3-cn-ppt (1).pdf bca bsc btech notes
mod-3-cn-ppt (1).pdf bca bsc btech notesanandhakrishnankv
 
unit2-210710110327.pdf
unit2-210710110327.pdfunit2-210710110327.pdf
unit2-210710110327.pdfssuser3aa461
 
CN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfCN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfJoshuaeeda1
 
Osi model detail description
Osi model  detail descriptionOsi model  detail description
Osi model detail descriptionBathshebaparimala
 
Data communication network ppt_Unit_4.pptx
Data communication network ppt_Unit_4.pptxData communication network ppt_Unit_4.pptx
Data communication network ppt_Unit_4.pptxBHAVYPATEL34
 
Data link control.pdf
Data link control.pdfData link control.pdf
Data link control.pdfDhairyaGohil
 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxk2w9psdb96
 
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
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by romaboraroma
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layerroma bora
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layermekind
 

Similar to Data Link Layer (20)

data link layer to print
data link layer to printdata link layer to print
data link layer to print
 
data link layer - Chapter 3
data link layer - Chapter 3data link layer - Chapter 3
data link layer - Chapter 3
 
mod-3-cn-ppt (1).pdf bca bsc btech notes
mod-3-cn-ppt (1).pdf bca bsc btech notesmod-3-cn-ppt (1).pdf bca bsc btech notes
mod-3-cn-ppt (1).pdf bca bsc btech notes
 
unit2-210710110327.pdf
unit2-210710110327.pdfunit2-210710110327.pdf
unit2-210710110327.pdf
 
CN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfCN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdf
 
Unit 2 [autosaved]
Unit 2 [autosaved]Unit 2 [autosaved]
Unit 2 [autosaved]
 
Osi model detail description
Osi model  detail descriptionOsi model  detail description
Osi model detail description
 
Data communication network ppt_Unit_4.pptx
Data communication network ppt_Unit_4.pptxData communication network ppt_Unit_4.pptx
Data communication network ppt_Unit_4.pptx
 
DLL
DLLDLL
DLL
 
Data link layer
Data link layerData link layer
Data link layer
 
Unit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part AUnit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part A
 
Data link control.pdf
Data link control.pdfData link control.pdf
Data link control.pdf
 
Unit 2
Unit 2Unit 2
Unit 2
 
Data link layer
Data link layerData link layer
Data link layer
 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
 
datalinklayermukesh
datalinklayermukeshdatalinklayermukesh
datalinklayermukesh
 
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
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 

More from Mukesh Tekwani

Computer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube ChannelComputer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube ChannelMukesh Tekwani
 
The Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdfThe Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdfMukesh Tekwani
 
ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - PhysicsMukesh Tekwani
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion Mukesh Tekwani
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Mukesh Tekwani
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversionMukesh Tekwani
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion Mukesh Tekwani
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversionMukesh Tekwani
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Mukesh Tekwani
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prismMukesh Tekwani
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surfaceMukesh Tekwani
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomMukesh Tekwani
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesMukesh Tekwani
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEMukesh Tekwani
 

More from Mukesh Tekwani (20)

Computer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube ChannelComputer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube Channel
 
The Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdfThe Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdf
 
Circular motion
Circular motionCircular motion
Circular motion
 
Gravitation
GravitationGravitation
Gravitation
 
ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - Physics
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversion
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion
 
What is Gray Code?
What is Gray Code? What is Gray Code?
What is Gray Code?
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversion
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prism
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surface
 
Spherical mirrors
Spherical mirrorsSpherical mirrors
Spherical mirrors
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atom
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lenses
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
 
Cyber Laws
Cyber LawsCyber Laws
Cyber Laws
 
XML
XMLXML
XML
 

Recently uploaded

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Data Link Layer

  • 1. mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani 1Chap 11. Data Link Control 11. Data Link Control 1. Briefly describe the services provided by the data link layer. The two main functions of the data link layer are data link control and media access control. (1) Data link control functions include framing, flow and error control. The stream of bits received from network layer is divided into smaller data units called frames. Flow control decides the amount of data that can be sent before receiving an acknowledgment. Error control means error detection and correction. (2) The second function of the data link layer is media access control (also called as line discipline), or how to share the link. Line discipline determines which device can send and when it can send. Collisions must be avoided and media must be shared by many systems that need to transmit on the same channel. 2. Define framing and the reason for its need. The stream of bits received from network layer is divided into smaller data units called frames. Data transmission in the physical layer means moving bits in the form of a signal from the source to the destination. The physical layer provides bit synchronization to ensure that the sender and receiver use the same bit durations and timing. But, the data link layer must pack bits into frames, so that each frame is distinguishable from another. What does framing do and why is it necessary? 1. Framing in the data link layer adds a sender address and a destination address. The destination address specifies where the packet should go; the sender address is used to send an acknowledgement back to the sender. 2. A whole message could be packed in one frame but that is not normally done, because a large frame can make flow and error control very inefficient. 3. When a message is carried in one very large frame, even a single-bit error would require the retransmission of the whole message. When a message is divided into smaller frames, a single-bit error affects only that small frame and only the affected frame needs to be retransmitted. Fixed-Size Framing Frames can be of fixed or variable size. In fixed-size framing, there is no need for defining the boundaries of the frames; the size itself can be used as a delimiter. Variable-Size Framing In variable-size framing, we must define the end of a frame and the beginning of the next. This is commonly used in local area networks. Two approaches are used for this purpose: a character-oriented approach and a bit-oriented approach. 3. Compare and contrast byte-oriented and bit-oriented protocols. Which category has been popular in the past (explain the reason)? Which category is popular now (explain the reason)? Character-oriented protocol In a character-oriented protocol, data to be carried are 8-bit characters (ASCII). The header carries the source and destination addresses and other control information, and the trailer carries error detection or error correction redundant bits, are also multiples of 8 bits. To separate one frame from the next, an 8-bit (1-byte) flag is added at the beginning and the end of a frame. The flag contains special characters and it indicates the start or end of a frame. Figure below shows the format of a frame in a character-oriented protocol. Drawbacks of character-oriented protocol: End of a frame Start of a frame
  • 2. Prof. Mukesh N Tekwani mukeshtekwani@hotmail.com 2 Data Link Control Character-oriented framing was popular when only text was exchanged by the data link layers. The flag could be selected to be any character not used for text communication. But now we send other types of information such as graphs, audio, and video. Any pattern used for the flag could also be part of the information. If this happens, the receiver, when it encounters this pattern in the middle of the data, thinks it has reached the end of the frame. This drawback is overcome by using a byte-stuffing strategy. Bit-oriented protocol In a bit-oriented protocol, the data section of a frame is a sequence of bits which is interpreted by the upper layer as text, audio, video or graphics. To separate one frame from another, an 8-bit flag such as 01111110 is used and it marks the beginning and end of a frame. This is shown in the diagram below: Drawbacks: This flag can create the same type of problem as in the byte-oriented protocols. That is, if the flag pattern appears in the data, we need to somehow inform the receiver that this is not the end of the frame. We do this by stuffing 1 single bit (instead of 1 byte) to prevent the pattern from looking like a flag. The strategy is called bit stuffing. In bit stuffing, if a 0 and five consecutive I bits are encountered, an extra 0 is added. This extra stuffed bit is eventually removed from the data by the receiver. Note that the extra bit is added after one 0 followed by five 1s regardless of the value of the next bit. This guarantees that the flag field sequence does not inadvertently appear in the frame. 4. Compare and contrast byte-stuffing and bit-stuffing. Byte-stuffing Strategy: Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape character in the text. 1. In byte stuffing, a special byte is added to the data section of the frame when there is a character with the same pattern as the flag. The data section is stuffed with an extra byte. This byte is usually called the escape character (ESC), which has a predefined bit pattern. 2. Whenever the receiver encounters the ESC character, it removes it from the data section and treats the next character as data, not a delimiting flag. 3. Byte stuffing by the escape character allows the presence of the flag in the data section of the frame, but it creates another problem. What happens if the text contains one or more escape characters followed by a flag? The receiver removes the escape character, but keeps the flag, which is incorrectly interpreted as the end of the frame. 4. To solve this problem, the escape characters that are part of the text must also be marked by another escape character. In other words, if the escape character is part of the text, an extra one is added to show that the second one is part of the text. Bit-stuffing Strategy: 1. In a bit-oriented protocol, the data section of a frame is a sequence of bits which is interpreted by the upper layer as text, audio, video or graphics. 2. To separate one frame from another, an 8-bit flag such as 01111110 is used and it marks the beginning and end of a frame. 3. Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data, so that the receiver does not mistake the pattern 0111110 for a flag. 4. This flag can create some problems. If the flag pattern appears in the data, we need to somehow inform the receiver that this is not the end of the frame. 5. We do this by stuffing 1 single bit (instead of I byte) to prevent the pattern from looking like a flag. The strategy is called bit stuffing. 6. In bit stuffing, if a 0 and five consecutive 1 bits are encountered, an extra 0 is added. This extra
  • 3. mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani 3Chap 11: Data Link Control stuffed bit is eventually removed from the data by the receiver. The extra bit is added after one 0 followed by five 1s regardless of the value of the next bit. This guarantees that the flag field sequence does not appear in the frame by mistake. Even if we have a 0 after five 1s, we still stuff a 0. The 0 will be removed by the receiver. This means that if the flaglike pattern 01111110 appears in the data, it will change to 011111010 (stuffed). 5. Compare and contrast flow control and error control Flow Control: 1. Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. 2. Flow control is concerned with the amount of data that can be sent before receiving an acknowledgment. 3. Any receiving device has a limited speed at which it can process incoming data and a limited amount of memory in which to store incoming data. The receiving device should not receive data at a rate that is more than the rate at which it can process this data 4. The receiving device must be able to inform the sending device before those limits are reached and to request that the transmitting device send fewer frames or stop temporarily. 5. Incoming data must be checked and processed before they can be used. The rate of such processing is often slower than the rate of transmission. For this reason, each receiving device has a block of memory, called a buffer, reserved for storing incoming data until they are processed. If the buffer begins to fill up, the receiver must be able to tell the sender to halt transmission until it is once again able to receive. Error Control: 1. Error control in the data link layer is based on automatic repeat request, which is the retransmission of data. 2. Error control involves both error detection and error correction. 3. 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. 4. In the data link layer, the term error control refers primarily to methods of error detection and retransmission. 5. How is error control implemented in the data link layer? Error control in the data link layer is implemented simply: Any time an error is detected in an exchange, specified frames are retransmitted. This process is called automatic repeat request (ARQ). 6. What are the two protocols for noiseless channels? What are the three protocols for noisy channels? Data link layer uses protocols to combine framing, flow control, and error control. The protocols used by this layer can be divided into two types: a) Protocols for noiseless channel
  • 4. Prof. Mukesh N Tekwani mukeshtekwani@hotmail.com 4 Data Link Control a. Simplest b. Stop-and-wait b) Protocols for noisy channel a. Stop-and-Wait ARQ b. Go-Back-N ARQ c. Selective Repeat ARQ 7. Describe the Simplest protocol used for an ideal (noiseless) channel. Simplest Protocol: 1. The Simplest Protocol has no flow or error control. 2. It is a unidirectional protocol in which data frames are traveling in only one direction-from the sender to receiver. 3. We assume that the receiver can immediately handle any frame it receives with a processing time that is small enough to be negligible. 4. The data link layer at the sender site gets data from its network layer, makes a frame out of the data, and sends it. 5. The data link layer at the receiver site receives a frame from its physical layer, removes header from the frame (extracts data from the frame) and delivers the data to its network layer. 6. Thus, the receiver can never be overwhelmed (flooded) with incoming frames. 7. The data link layers of the sender and receiver provide transmission services for their network layers. The data link layers use the services provided by their physical layers for the physical transmission of bits. Implementation of the protocol as a procedure: We introduce the idea of events in this protocol. The procedure at the sender site is constantly running; an action takes place only when there is a request from the network layer. The procedure at the receiver site is also constantly running, but there is an action only when the physical layer informs it. Both procedures are constantly running because they do not know when the corresponding events will occur. Sender-side Algorithm: Receiver-side Algorithm: while (true) //repeat forever { WaitForEvent(); //sleep until an event occurs If(Event(RequestToSend)) //there is a //packet to send { GetData(); MakeFrame(); SendFrame(); //send the frame } } while (true) //repeat forever { WaitForEvent(); //sleep until an event occurs If(Event(ArrivalNotofication)) //there is a //packet to send { ReceiveFrame(); ExtractData(); DeliverData(); //send the frame } }
  • 5. mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani 5Chap 11: Data Link Control 8. Describe the Stop-And-Wait Protocol for a noiseless channel. 1. The Stop-and-Wait Protocol is so called because the sender sends one frame, stops until it receives confirmation from the receiver (okay to go ahead), and then sends the next frame. 2. If data frames arrive at the receiver site faster than they can be processed, the frames must be stored until their use. 3. Normally, the receiver does not have enough storage space, especially if it is receiving data from many sources. This may result in either the discarding of frames or denial of service. 4. To prevent the receiver from becoming flooded with frames, we must tell the sender to slow down. 5. There must be feedback from the receiver to the sender. 6. We have unidirectional communication for data frames, but auxiliary ACK frames (acknowledgment) travel from the other direction. We add flow control to the Simplest protocol. We use a half-duplex link.
  • 6. Prof. Mukesh N Tekwani mukeshtekwani@hotmail.com 6 Data Link Control Sender-side Algorithm for Stop-And-Wait Protocol: Receiver-side Algorithm for Stop-And-Wait Protocol: 9. Discuss the Stop-And-Wait Automatic Repeat Request Protocol for a noisy channel. 1. The Stop-and-Wait Automatic Repeat Request (Stop-and-Wait ARQ) is a modification of the Stop-and-Wait protocol. It adds a simple error control mechanism to the Stop-and-Wait Protocol. 2. Redundancy Bits in frame: To detect and correct corrupted frames, we need to add redundancy bits to our data frame. When the frame arrives at the receiver site, it is checked and if it is corrupted, it is discarded. 3. Error detection by not responding: No response from the receiver implies that it has detected some errors. 4. Frame numbering: Lost frames are more difficult to handle than corrupted ones. In other protocols such as Simplest and Stop-and-Wait, there was no way to identify a frame. The received frame could be the correct one, or a duplicate, or a frame out of order. We now number the frames. When the receiver receives a data frame that is out of order, this means that frames were either lost or duplicated. 5. The corrupted and lost frames must be resent in this protocol. If the receiver does not respond when there is an error, how can the sender know which frame to resend? To solve this problem, the sender keeps a copy of the sent frame. At the same time, it starts a timer. If the timer expires and there is no ACK for the sent frame, the frame is resent, the copy is held, and the timer is restarted. Since the protocol uses the stop-and-wait mechanism, there is only one specific frame that needs an ACK even though several copies of the same frame can be in the network. 6. Numbering the ACK frames: Since an ACK frame can also be corrupted and lost, it also needs redundancy
  • 7. mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani 7Chap 11: Data Link Control bits and a sequence number. The ACK frame for this protocol has a sequence number field. The sender discards a corrupted ACK frame. 7. Sequence Numbers: We want to minimize the frame size and therefore we look for the smallest range of sequence numbers for numbering the frames. If the sequence number field is m bits long, the sequence number can go from 0 to 2m – 1, and then wrap around. If we have used x as a sequence number then the next frame will have x + 1 as the sequence number. 8. Acknowledgement Number: The acknowledgment numbers always announce the sequence number of the next frame expected by the receiver. For example, if frame 0 has arrived safe and sound, the receiver sends an ACK frame with acknowledgment 1 (meaning frame 1 is expected next). If frame 1 has arrived safe and sound, the receiver sends an ACK frame with acknowledgment 0 (meaning frame 0 is expected). 9. Inefficient: This protocol is very inefficient if the channel has a large bandwidth (thick) and if the round-trip delay is long. The product of these two parameters is called bandwidth-delay product. 10. Pipelining: Pipelining means beginning a task before the previous task has ended. In this protocol there is no pipelining because we have to wait for a frame to reach the destination, and receive the acknowledgment before the next frame is sent. Protocol Design Issues: 1. The sending device keeps a copy of the last frame sent until it receives an ACK for that frame. It can retransmit the lost or damaged frames . 2. The Sender has a control variable Sn which is the sequence number of the next frame to send. 3. Similarly, the Receiver has a control variable Rn which holds the sequence number of the next frame that is expected. 4. When a frame is sent, the value of Sn is incremented (modulo – 2), (if it is 1 it becomes 0, and vice- versa. 5. When a frame is received, the value of Rn is incremented (modulo – 2), (if it is 1 it becomes 0, etc) 6. A data frame 0 is acknowledged by ACK 1 frame indicating that the receiver has got the frame 0 and is now expecting data frame 0. Sender-side Algorithm: Sn = 0; //frame 0 should be sent first canSend = true; while(true) { WaitforEvent(); //sleep until an event occurs if (Event (RequestToSend) AND canSend) { GetData () ;
  • 8. Prof. Mukesh N Tekwani mukeshtekwani@hotmail.com 8 Data Link Control MakeFrame (Sn) ; StoreFrame(Sn); SendFrame(Sn) ; StartTimerO; Sn = Sn + 1; canSend = false; } WaitforEvent(); if (Event (ArrivaINotification) { ReceiveFrame(ackNo); if(not corrupted AND ackNo == Sn) //valid ACK { Stoptimer(); PurgeFrame(Sn-l); //copy is not needed canSend = true; } } if (Event (TimeOot) { StartTimer(); ResendFrame(Sn-l); } } Receiver Side Algorithm: Rn = 0; //frame 0 expected to arrive first while (true) { WaitForEvent(); //sleep until an event occurs if(Event(Arriva1Notification)) //data frame arrices { ReceiveFrame(); if(corrupted(frame)) sleep (); if (seqNo == Rn) //valid data frame { ExtractData(); De1iverData(); //deliver data Rn = Rn + 1; } SendFrame (Rn) ; //send an ACK } } 10. Assume that, in a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 ms to make a round trip. a) What is the bandwidth-delay product? b)If the system data frames are 1000 bits in length, what is the utilization percentage of the link? c) If the protocol can send 15 frames before stopping and waiting for the ACK, what is the utilization? a) The bandwidth-delay product is : (1 x 106 Mbps) x (20 x 10-3 s) = 20,000 bits b) The system can send 20,000 bits during the time it takes for the data to go from the sender to the receiver and then back again. But, the system sends only 1000 bits. Thus, the link utilization is only 1000/20,000, or 5 percent. For this reason, for a link with a high bandwidth or long delay, the use of Stop-and-Wait ARQ wastes the capacity of the link. c) The system can send 15 frames = 15 x 1000 bits = 15,000 bits. The utilization now becomes 15000/20000 = 75%.
  • 9. mukeshtekwani@hotmail.com Prof. Mukesh N. Tekwani 9Chap 11: Data Link Control