* Sushama Deshmukh 1
Course :
Computer Network (CSE 252)
Ms. Sushama Deshmukh
Assistant Professor in Computer Science & Engineering
Course Instructor
Unit III
Data Link Layer
* 3
| Sushama Deshmukh
Index
⮚ Data Link Layer- Services Provided to the Network Layer, Framing,
⮚ Error Control, Flow Control, Error Detection and Correction, Error-Correcting
Codes, Error-Detecting Codes.
⮚ Elementary data link protocol, A Utopian Simplex Protocol,
⮚ A Simplex Stop-and-Wait Protocol for an Error-Free Channel, A Simplex Stop-and-
Wait Protocol for a Noisy Channel,
⮚ Sliding Window Protocols, A One-Bit Sliding Window Protocol,
⮚ A Protocol Using Go-Back-N, A Protocol Using Selective Repeat.
Introduction
Data Link Layer:
* | Sushama Deshmukh 4
⮚uses the services of the physical layer
⮚It has a number of functions, including:
1. Providing a well-defined service interface to the network layer.
2. Dealing with transmission errors.
3. Regulating the flow of data so that slow receivers are not swamped by
fast senders.
Frame management forms the heart of what the data link layer does.
Provide services to the network layer
The principal service is transferring data from the network layer. At the network
layer, these data frames are basically addressed and routed.
Services Provided to the Network Layer
1. Unacknowledged Connectionless Service
2. Acknowledged Connectionless Service
3. Acknowledged Connection-Oriented Service
1. Unacknowledged Connectionless Service:
⮚ The data link layer of the sending machine sends independent frames to the
data link layer of the receiving machine.
⮚ The receiving machine does not acknowledge receiving the frame.
⮚ No logical connection is set up between the host machines..
⮚ Error and data loss is not handled
⮚ applicable in Ethernet services and voice communications
Types of Services
2. Acknowledged Connectionless Service:
⮚ The data link layer of the sending machine sends independent frames to the
data link layer of the receiving machine
⮚ No logical connection is set between host machines, but each frame sent by the
source machine is acknowledged by the destination machine on receiving
⮚ If the source does not receive the acknowledgment within a stipulated time, then
it resends the frame.
⮚ This is used in Wifi (IEEE 802.11) services.
Types of Services
3. Acknowledged Connection oriented Service:
⮚ Best service offered
⮚ A logical connection is set between host machines, and the data is transmitted along
this logical path.
⮚ The frames are numbered, that keeps track of loss of frames and also ensures that
frames are received in correct order.
⮚ The service has three distinct phases −
• Set up of connection
• Sending frames
• Release connection
⮚ It is appropriate for satellite communications and long-distance telephone circuits
Types of Services
https://www.youtube.com/watch?v=iYdW0B1ol
LE
Data Link Layer Working
⮚In the physical layer, data transmission involves
synchronised transmission of bits from the
source to the destination. The DLL packs these
bits into frames.
⮚DLL takes the packets from the Network Layer
and encapsulates them into frames. If the frame
size becomes too large, then the packet may be
divided into small sized frames. Smaller sized
frames makes flow control and error control
more efficient.
⮚Then, it sends each frame bit-by-bit on the
hardware.
⮚At receiver’s end, DLL picks up signals from
hardware and assembles them into frames.
Frame:
o the digital data transmission unit
o Is a straight-forward network packet in the packet-switched systems
o is a repeating structure that supports time-division multiplexing in other types of
telecommunication systems.
o A frame has been defined as a protocol data unit on the data link layer in the
computer networking OSI model.
A frame moves bit-by-bit serially and consists of a trailer field and header field that
frames the information. These frames are understandable only by the data link layer.
What is framing in data link layer?
Framing is a point-to-point connection between two devices that consists of a wire in
which data is transmitted as a stream of bits.
Framing
⮚Finding the Beginning of the frame: All stations should be able to find the frame
when it is transmitted. Station finds many frames by seeing out for a unique series of
bits that points to the starting of the frame such as SFD (Starting Frame Delimeter).
⮚How station finds a frame: All stations listen to connected for SFD style by a
sequential circuit. These sequential circuits inform the station when SFD is found.
Station inspects destination address to reject or accept a frame.
⮚Finding End of the Frame: When to finish reading a frame.
Framing Problems
Parts of a Frame
A frame has the following parts −
Frame Header − It contains the source and the destination addresses of the frame.
Payload field − It contains the message to be delivered.
Trailer − It contains the error detection and error correction bits.
Flag − It marks the beginning and end of the frame.
Types of Frame
Fixed-sized Framing: Here the size of the frame is fixed and so
the frame length acts as delimiter of the frame. Consequently, it
does not require additional boundary bits to identify the start
and end of the frame. Example − ATM cells.(Asynchronous Transfer Mode)
Variable – Sized Framing: Here, the size of each frame to be
transmitted may be different. So additional mechanisms are
kept to mark the end of one frame and the beginning of the
next frame.
It is used in local area networks.
Two ways to define frame delimiters in variable sized framing
are,
Length Field − Here, a length field is used that determines the
size of the frame. It is used in Ethernet (IEEE 802.3).
End Delimiter − Here, a pattern is used as a delimiter to
determine the size of frame. It is used in Token Rings. The
problem with this is that ED can occur in the data, This can be
solved by: Byte Stuffing and Bit Stuffing.
https://www.geeksforgeeks.org/framing-in-data-link-
layer/?ref=lbp
Types of Frame
If the pattern occurs in the message, then two approaches are used to avoid the situation −
Byte – Stuffing − A byte is stuffed in the message to differentiate from the delimiter. This is also called
character-oriented framing.
Bit – Stuffing − A pattern of bits of arbitrary length is stuffed in the message to differentiate from the
delimiter. This is also called bit – oriented framing.
Character/Byte Stuffing: Bit Stuffing
Advantages of Framing in Data Link Layer
⮚ Frames are used continuously in the process of time-division multiplexing.
⮚ It facilitates a form to the sender for transmitting a group of valid bits to a receiver.
⮚ Frames also contain headers that include information such as error-checking
codes.
⮚A Frame relay, token ring, ethernet, and other types of data link layer methods have
their frame structures.
⮚Frames allow the data to be divided into multiple recoverable parts that can be
inspected further for corruption.
⮚ It provides a flow control mechanism that manages the frame flow such that the
data congestion does not occur on slow receivers due to fast senders.
⮚ It provides reliable data transfer services between the layers of the peer network.
Advantages of Framing in DLL
Error Control:
The error control function of the data link layer detects the errors in transmitted
frames and re-transmits all the erroneous frames.
Purpose of Error Control :
The function of error control function of the data link layer helps in dealing with
data frames that are damaged in transit, data frames lost in transit and
acknowledged frames that are lost in transmission.
The method used for error control is called Automatic Repeat Request (ARQ) which
is used for the noisy channel.
Example – Stop & Wait ARQ and Sliding Window ARQ
Error Control and Flow Control
Flow Control: It is an important function of the Data Link Layer. It refers to a set of
procedures that tells the sender how much data it can transmit before waiting for
acknowledgment from the receiver.
Purpose of Flow Control :
Any receiving device has a limited speed at which it can process incoming data and
also a limited amount of memory to store incoming data. If the source is sending the
data at a faster rate than the capacity of the receiver, there is a possibility of the
receiver being swamped. The receiver will keep losing some of the frames simply
because they are arriving too quickly and the buffer is also getting filled up.
This will generate waste frames on the network. Therefore, the receiving device must
have some mechanism to inform the sender to send fewer frames or stop
transmission temporarily. In this way, flow control will control the rate of frame
transmission to a value that can be handled by the receiver.
Example – Stop & Wait Protocol
Error Control and Flow Control
* © Copyright | Sushama Deshmukh 19
Web References
• https://www.tutorialspoint.com/what-are-the-data-link-layer-services-provided-to-the-network-layer
• https://www.youtube.com/watch?v=VBAuzvVzOQU
• https://www.youtube.com/watch?v=N1apF49Ih28
• https://www.youtube.com/watch?v=NhpzBldHOYo (Framing 1)
• https://www.youtube.com/watch?v=ckcRxFxeOs4 (Framing 2)
• https://www.youtube.com/watch?v=8sV_fOzJoqI (Framing 3)
• https://www.youtube.com/watch?v=EMrY-8m8D1E (Error Detection and Correction)
• https://www.codingninjas.com/codestudio/library/framing-in-computer-networking
• https://www.tutorialspoint.com/framing-in-data-link-layer
• https://www.geeksforgeeks.org/framing-in-data-link-layer/
20
Thank You
* © Copyright | Sushama Deshmukh

III_UNIT.pptx

  • 1.
    * Sushama Deshmukh1 Course : Computer Network (CSE 252) Ms. Sushama Deshmukh Assistant Professor in Computer Science & Engineering Course Instructor
  • 2.
  • 3.
    * 3 | SushamaDeshmukh Index ⮚ Data Link Layer- Services Provided to the Network Layer, Framing, ⮚ Error Control, Flow Control, Error Detection and Correction, Error-Correcting Codes, Error-Detecting Codes. ⮚ Elementary data link protocol, A Utopian Simplex Protocol, ⮚ A Simplex Stop-and-Wait Protocol for an Error-Free Channel, A Simplex Stop-and- Wait Protocol for a Noisy Channel, ⮚ Sliding Window Protocols, A One-Bit Sliding Window Protocol, ⮚ A Protocol Using Go-Back-N, A Protocol Using Selective Repeat.
  • 4.
    Introduction Data Link Layer: *| Sushama Deshmukh 4 ⮚uses the services of the physical layer ⮚It has a number of functions, including: 1. Providing a well-defined service interface to the network layer. 2. Dealing with transmission errors. 3. Regulating the flow of data so that slow receivers are not swamped by fast senders.
  • 5.
    Frame management formsthe heart of what the data link layer does.
  • 6.
    Provide services tothe network layer The principal service is transferring data from the network layer. At the network layer, these data frames are basically addressed and routed. Services Provided to the Network Layer
  • 7.
    1. Unacknowledged ConnectionlessService 2. Acknowledged Connectionless Service 3. Acknowledged Connection-Oriented Service 1. Unacknowledged Connectionless Service: ⮚ The data link layer of the sending machine sends independent frames to the data link layer of the receiving machine. ⮚ The receiving machine does not acknowledge receiving the frame. ⮚ No logical connection is set up between the host machines.. ⮚ Error and data loss is not handled ⮚ applicable in Ethernet services and voice communications Types of Services
  • 8.
    2. Acknowledged ConnectionlessService: ⮚ The data link layer of the sending machine sends independent frames to the data link layer of the receiving machine ⮚ No logical connection is set between host machines, but each frame sent by the source machine is acknowledged by the destination machine on receiving ⮚ If the source does not receive the acknowledgment within a stipulated time, then it resends the frame. ⮚ This is used in Wifi (IEEE 802.11) services. Types of Services
  • 9.
    3. Acknowledged Connectionoriented Service: ⮚ Best service offered ⮚ A logical connection is set between host machines, and the data is transmitted along this logical path. ⮚ The frames are numbered, that keeps track of loss of frames and also ensures that frames are received in correct order. ⮚ The service has three distinct phases − • Set up of connection • Sending frames • Release connection ⮚ It is appropriate for satellite communications and long-distance telephone circuits Types of Services
  • 10.
    https://www.youtube.com/watch?v=iYdW0B1ol LE Data Link LayerWorking ⮚In the physical layer, data transmission involves synchronised transmission of bits from the source to the destination. The DLL packs these bits into frames. ⮚DLL takes the packets from the Network Layer and encapsulates them into frames. If the frame size becomes too large, then the packet may be divided into small sized frames. Smaller sized frames makes flow control and error control more efficient. ⮚Then, it sends each frame bit-by-bit on the hardware. ⮚At receiver’s end, DLL picks up signals from hardware and assembles them into frames.
  • 11.
    Frame: o the digitaldata transmission unit o Is a straight-forward network packet in the packet-switched systems o is a repeating structure that supports time-division multiplexing in other types of telecommunication systems. o A frame has been defined as a protocol data unit on the data link layer in the computer networking OSI model. A frame moves bit-by-bit serially and consists of a trailer field and header field that frames the information. These frames are understandable only by the data link layer. What is framing in data link layer? Framing is a point-to-point connection between two devices that consists of a wire in which data is transmitted as a stream of bits. Framing
  • 12.
    ⮚Finding the Beginningof the frame: All stations should be able to find the frame when it is transmitted. Station finds many frames by seeing out for a unique series of bits that points to the starting of the frame such as SFD (Starting Frame Delimeter). ⮚How station finds a frame: All stations listen to connected for SFD style by a sequential circuit. These sequential circuits inform the station when SFD is found. Station inspects destination address to reject or accept a frame. ⮚Finding End of the Frame: When to finish reading a frame. Framing Problems
  • 13.
    Parts of aFrame A frame has the following parts − Frame Header − It contains the source and the destination addresses of the frame. Payload field − It contains the message to be delivered. Trailer − It contains the error detection and error correction bits. Flag − It marks the beginning and end of the frame.
  • 14.
    Types of Frame Fixed-sizedFraming: Here the size of the frame is fixed and so the frame length acts as delimiter of the frame. Consequently, it does not require additional boundary bits to identify the start and end of the frame. Example − ATM cells.(Asynchronous Transfer Mode) Variable – Sized Framing: Here, the size of each frame to be transmitted may be different. So additional mechanisms are kept to mark the end of one frame and the beginning of the next frame. It is used in local area networks. Two ways to define frame delimiters in variable sized framing are, Length Field − Here, a length field is used that determines the size of the frame. It is used in Ethernet (IEEE 802.3). End Delimiter − Here, a pattern is used as a delimiter to determine the size of frame. It is used in Token Rings. The problem with this is that ED can occur in the data, This can be solved by: Byte Stuffing and Bit Stuffing. https://www.geeksforgeeks.org/framing-in-data-link- layer/?ref=lbp
  • 15.
    Types of Frame Ifthe pattern occurs in the message, then two approaches are used to avoid the situation − Byte – Stuffing − A byte is stuffed in the message to differentiate from the delimiter. This is also called character-oriented framing. Bit – Stuffing − A pattern of bits of arbitrary length is stuffed in the message to differentiate from the delimiter. This is also called bit – oriented framing. Character/Byte Stuffing: Bit Stuffing
  • 16.
    Advantages of Framingin Data Link Layer ⮚ Frames are used continuously in the process of time-division multiplexing. ⮚ It facilitates a form to the sender for transmitting a group of valid bits to a receiver. ⮚ Frames also contain headers that include information such as error-checking codes. ⮚A Frame relay, token ring, ethernet, and other types of data link layer methods have their frame structures. ⮚Frames allow the data to be divided into multiple recoverable parts that can be inspected further for corruption. ⮚ It provides a flow control mechanism that manages the frame flow such that the data congestion does not occur on slow receivers due to fast senders. ⮚ It provides reliable data transfer services between the layers of the peer network. Advantages of Framing in DLL
  • 17.
    Error Control: The errorcontrol function of the data link layer detects the errors in transmitted frames and re-transmits all the erroneous frames. Purpose of Error Control : The function of error control function of the data link layer helps in dealing with data frames that are damaged in transit, data frames lost in transit and acknowledged frames that are lost in transmission. The method used for error control is called Automatic Repeat Request (ARQ) which is used for the noisy channel. Example – Stop & Wait ARQ and Sliding Window ARQ Error Control and Flow Control
  • 18.
    Flow Control: Itis an important function of the Data Link Layer. It refers to a set of procedures that tells the sender how much data it can transmit before waiting for acknowledgment from the receiver. Purpose of Flow Control : Any receiving device has a limited speed at which it can process incoming data and also a limited amount of memory to store incoming data. If the source is sending the data at a faster rate than the capacity of the receiver, there is a possibility of the receiver being swamped. The receiver will keep losing some of the frames simply because they are arriving too quickly and the buffer is also getting filled up. This will generate waste frames on the network. Therefore, the receiving device must have some mechanism to inform the sender to send fewer frames or stop transmission temporarily. In this way, flow control will control the rate of frame transmission to a value that can be handled by the receiver. Example – Stop & Wait Protocol Error Control and Flow Control
  • 19.
    * © Copyright| Sushama Deshmukh 19 Web References • https://www.tutorialspoint.com/what-are-the-data-link-layer-services-provided-to-the-network-layer • https://www.youtube.com/watch?v=VBAuzvVzOQU • https://www.youtube.com/watch?v=N1apF49Ih28 • https://www.youtube.com/watch?v=NhpzBldHOYo (Framing 1) • https://www.youtube.com/watch?v=ckcRxFxeOs4 (Framing 2) • https://www.youtube.com/watch?v=8sV_fOzJoqI (Framing 3) • https://www.youtube.com/watch?v=EMrY-8m8D1E (Error Detection and Correction) • https://www.codingninjas.com/codestudio/library/framing-in-computer-networking • https://www.tutorialspoint.com/framing-in-data-link-layer • https://www.geeksforgeeks.org/framing-in-data-link-layer/
  • 20.
    20 Thank You * ©Copyright | Sushama Deshmukh