Unit 2
Data Link Layer
Q1) Explain the design issues of data link layer?
A1)
The Design issues with data link layer are:
The data link layer act as service interface to the network layer. The principle service is transferring data from network layer on sending machine to the network layer on destination machine. This transfer also takes place via DLL (Dynamic Link Library).
2. Frame synchronization
Flow control is used to prevent the flow of data frame at the receiver end. The source machine must not send data frames at a rate faster than the capacity of destination machine to accept them.
4. Error control –
Error control is done to prevent duplication of frames. The errors introduced during transmission from source to destination machines must be detected and corrected at the destination machine.
Q.2 Explain framing methods?
A2)
At data link layer it extracts message from sender and provide it to the receiver by providing sender’s and receiver’s address.
The advantage of using frames is that data is broken up into recoverable chunks that can easily be checked for corruption.
Q3) Explain the types of framing?
A3)
Types of framing – There are two types of framing:
1. Fixed size – The frame is of fixed size and there is no need to provide boundaries to the frame, length of the frame itself acts as delimiter.
2. Variable size – In this there is need to define end of frame as well as beginning of next frame to distinguish.
This can be done in two ways:
Q4) Explain the phases of error control?
A4)
Phases in Error Control
The error control mechanism in data link layer involves the following phases −
- Positive ACK − On receiving a correct frame, the receiver sends a positive acknowledge.
- Negative ACK − On receiving a damaged frame or a duplicate frame, the receiver sends a negative acknowledgment back to the sender.
Q5) Explain flow control?
A5)
Flow control in computer networks is defined as the process of managing the rate of data transmission between two systems(nodes), this mechanism ensures that the rate of data (transmitted by the sender) is within the receiving capacity of the receiver node.
Flow control Protocol
From the figure there are two protocols, Stop & Wait and a sliding window.
In stop & wait the sender node sends one frame and then waits for the feedback from the receiver node.
On the other hand, in the sliding window protocol, the sender node keeps on sending frames to the receiver node without waiting for any feedback and it re-sends the frame which is/are damaged or suspected.
The efficiency of stop &wait protocol is less, while the efficiency of the sliding window protocol is more than stop & wait protocol.
The stop & wait protocol is half-duplex whereas sliding window protocol is full duplex.
Q6) Explain elementary data link protocols?
A6)
Data link protocols are divided into two categoriesdepending on whether the transmission channel is noiseless or noisy.
Q7) Explain the noiseless channels?
A7)
Simplex Protocol
The Simplex protocol is designed for unidirectional data transmission over an ideal channel .It has distinct procedures for sender and receiver. The sender simply sends all its data available onto the channel as soon as they are available its buffer. The receiver is assumed to process all incoming data instantly. It is hypothetical since it does not handle flow control or error control.
Stop – and – Wait Protocol
Stop – and – Wait protocol is for noiseless channel too. It provides unidirectional data transmission without any error control facilities. However, it provides flow control so that fast sender does not drown a slow receiver.
The receiver has a finite buffer size with finite processing speed. The sender can send a frame only when it has received indication from the receiver that it is available for further data processing.
Q8) Explain noisy channels?
A8)
Stop – and – Wait ARQ
Stop – and – wait Automatic Repeat Request (Stop – and – Wait ARQ) is a variation of the above protocol with added error control mechanisms which is appropriate for noisy channels. The sender keeps a copy of the sent frame. It then waits for a finite time to receive a positive acknowledgement from receiver. If the timer expires or a negative acknowledgement is received, the frame is retransmitted. If a positive acknowledgement is received, then the next frame is sent.
Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgement for the first frame. It uses the concept of sliding window, and so is also called sliding window protocol. The frames are sequentially numbered, and a finite number of frames are sent. If the acknowledgement of a frame is not received within the time-period, all frames starting from that frame are retransmitted.
Selective Repeat ARQ
This protocol is used for sending multiple frames before receiving the acknowledgement for the first frame. The erroneous or lost frames are retransmitted, while the good frames are received and buffered.
Q9) Explain sliding window ?
A9)
Sliding Window
The sliding window is an abstract concept that defines the range of sequence numbers that is the concern of the sender and receiver.
The sender and receiver need to deal with only part of the possible sequence numbers. The range which is the concern of the sender is called the send sliding window; the range that is the concern of the receiver is called the receive sliding window.
The sender does not worry about these frames and keeps no copies of them. The second region, colored in Figuredefines the range of sequence numbers belonging to the frames that are sent and have unknown status.
The window itself is an abstraction in which three variables define its size and location at any time.
These variables Sf(send window, the first outstanding frame), Sn (send window, the next frame to be sent), and Ssize (send window, size).
The variable Sf defines the sequence number of the first (oldest) outstanding frame. The variable Sn holds the sequence number that will be assigned to the next frame to be sent. Finally, the variable Ssize defines the size of the window, which is fixed in our protocol.
The receive window makes sure that the correct data frames are received and that the correct acknowledgments are sent. The size of the receive window is always 1.
Q10) Explain Go Back and Selective Repeat?
A10)
Go-Back-N ARQ simplifies the process at the receiver site. The receiver keeps track of only one variable, and there is no need to buffer out-of-order framesthey are discarded.
However, this protocol is very inefficient for a noisy link. In a noisy link a frame has higher probability of damage, which means the resending of multiple frames. This resending uses up the bandwidth and slows down the transmission.
Windows
The Selective Repeat Protocol also uses two windows: a send window and a receive window.
First, the size of the send window is much smaller it is 2m- 1.
Second, the receive window is the same size as the send window.
The send window maximum size can be 2m- 1.
For example, if m = 4, the sequence numbers go from 0 to 15, but the size of the window is just 8 .The smaller window size means less efficiency in filling the pipe, but the fact that there are fewer duplicate frames can compensate for this.
The receive window in Selective Repeat is different from the one in Go Back- N. First, the size of the receive window is the same as the size of the send window (2m- 1). The figure shows the receive window in this protocol. Those slots inside the window that are coloured define frames that have arrived out of order and are waiting for their neighbours to arrive before delivery to the network layer.
Receive window for Selective Repeat ARQ