Professional Documents
Culture Documents
Unit 3 Data Link layer
Unit 3 Data Link layer
addressing, Stop & Wait protocol ,Go back N ARQ ,selective repeat ARQ ,piggybacking and
pipelining ,HDLC LAN Protocol stack-Logical link control and Media Access Control sublayer, IEEE
802.2 LLC Frame format; MAC layer Protocols- static and dynamic allocation, Pure and slotted ALOHA,
Carrier sense multiple access, Persistent and non-persistent CSMA, IEEE standard 802.3, 802.4, 802.5,
FDDI.
Data-link layer
It is the second layer after the physical layer.
The data link layer is responsible for maintaining the data link between two hosts or nodes.
The data link layer is divided into two sub-layers :
1. Logical Link Control Sub-layer (LLC) –
Provides the logic for the data link, Thus it controls the synchronization, flow control, and error
checking functions of the data link layer. Functions are –
(i) Error Recovery.
(ii) It performs the flow control operations.
(iii) User addressing.
Framing
Data-link layer 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, data link layer picks up signals
from hardware and assembles them into frames.
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.
Flow control is a technique that allows two stations working at different speeds to communicate with each
other. It is a set of measures taken to regulate the amount of data that a sender sends so that a fast sender
does not overwhelm a slow receiver. In data link layer, flow control restricts the number of frames the
sender can send before it waits for an acknowledgment from the receiver.
Data link layer uses feedback based flow control mechanisms. There are two main techniques −
Stop and Wait
Sliding Window
This protocol improves the efficiency of stop and wait protocol by allowing multiple frames to be
transmitted before receiving an acknowledgment.
The working principle of this protocol can be described as follows −
Both the sender and the receiver has finite sized buffers called windows. The sender and the receiver
agrees upon the number of frames to be sent based upon the buffer size.
The sender sends multiple frames in a sequence, without waiting for acknowledgment. ances the
window anWhen its sending window is filled, it waits for acknowledgment. On receiving
acknowledgment, it advd transmits the next frames, according to the number of acknowledgments
received.
Physical addressing:
After creating frames, the Data link layer adds physical addresses (MAC addresses) of the sender and/or
receiver in the header of each frame.
Go Back N ARQ –
The sender sends N packets which are equal to the window size. Once the entire window is sent, the
sender then waits for a cumulative acknowledgement to send more packets. On the receiver end, it
receives only in-order packets and discards out-of-order packets. As in case of packet loss, the entire
window would be re-transmitted.
Introduction to Piggybacking
Piggybacking is a process of attaching the acknowledgment with the data packet to be sent.
Ex. Suppose there is two-way communication between two devices A and B. When the data frame is
sent by A to B, then device B will not send the acknowledgment to A until B does not have the next
frame to transmit. And the delayed acknowledgment is sent by the B with the data frame. The method
of attaching the delayed acknowledgment with sending the data frame is known as piggybacking.
Flow Diagram of Pipelined Data Transmission
The following flow diagram depicts data transmission in a pipelined system versus that in a non-pipelined
system. Here, pipelining is incorporated in the data link layer, and four data link layer frames are
sequentially transmitted.
High-level Data Link Control (HDLC) is a group of communication protocols of the data link layer for
transmitting data between network points or nodes. Since it is a data link protocol, data is organized into
frames. A frame is transmitted via the network to the destination that verifies its successful arrival. It is a
bit - oriented protocol that is applicable for both point - to - point and multipoint communications.
HDLC supports two types of transfer modes, normal response mode and asynchronous balanced mode.
Normal Response Mode (NRM) − Here, two types of stations are there, a primary station that send
commands and secondary station that can respond to received commands. It is used for both point - to
- point and multipoint communications.
Asynchronous Balanced Mode (ABM) − Here, the configuration is balanced, i.e. each station can
both send commands and respond to commands. It is used for only point - to - point communications.
Open Systems Interconnection (OSI) model with LLC and MAC sub layers:
Logical link control (LLC) sub layer
It is a unique address that is allocated to the NIC of the device. It is used as an address to transmit
data within ethernet or Wi-Fi.
The main responsibility of the MAC layer is encapsulates the frames during transmission .
The MAC layer identifies and verifies the address of source stations and destinations. MAC layer
performs multiple access resolution when there are more data frames.
MAC layer coordinates with the physical layer to seize a shared channel by using multiple MAC entities
to avoid collisions.
ALOHA : ALOHA is a system for coordinating and arbitrating access to a shared communication
channel. It was developed in the 1970s at the University of Hawaii. The original system used terrestrial
radio broadcasting, but the system has been implemented in satellite communication systems.
A shared communication system like ALOHA requires a method of handling collisions that occur when
two or more systems attempt to transmit on the channel at the same time.
In the ALOHA system, a node transmits whenever data is available to send. If another node transmits at
the same time, a collision occurs, and the frames that were transmitted are lost. However, a node can
listen to broadcasts on the medium, even its own, and determine whether the frames were transmitted.
FDDI
Fibre Distributed Data Interface (FDDI) is a set of ANSI and ISO standards for transmission of data in
local area network (LAN) over fiber optic cables.
It is applicable in large LANs that can extend up to 200 kilometers in diameter.
Features
FDDI uses optical fiber as its physical medium.
It operates in the physical and medium access control (MAC layer) of the Open Systems
Interconnection (OSI) network model.
It provides high data rate of 100 Mbps and can support thousands of users.
It is used in LANs up to 200 kilometers for long distance voice and multimedia communication.
It uses ring based token passing mechanism and is derived from IEEE 802.4 token bus standard.
It contains two token rings, a primary ring for data and token transmission and a secondary ring that
provides backup if the primary ring fails.
FDDI technology can also be used as a backbone for a wide area network (WAN).
The following diagram shows FDDI −