Lecture-2.1 DLL Design Issues
Lecture-2.1 DLL Design Issues
Lecture-2.1 DLL Design Issues
UNIT-III
Network Layer(Continue): Congestion Control: Principles of congestion control; Congestion prevention policies, Leaky bucket & Token
Bucket Algorithms.
Transport Layer: Services provided to upper layers, Elements of Transport protocols. Addressing, Flow Control & buffering; Example
Transport protocols: TCP, SCTCP & UDP.
Application Layer and Network Security: Domain Name System, Simple Network Management Protocol, Electronic Mail, World Wide
Web, Basics of authentication, Public and Private Key Cryptography, Digital Signatures and Certificates, Firewalls.
2
Data-link layer
• Data-link layer is the second layer after 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 :
• 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.
3
• Media Access Control Sub-layer (MAC) –
It is the second sub-layer of data-link layer. It controls the flow and
multiplexing for transmission medium. Transmission of data packets is
controlled by this layer. This layer is responsible for sending the data
over the network interface card.
Functions are
4
Design issues with data link layer are :
• Services provided to the network layer –
The data link layer act as a 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).
• Frame synchronization –
The source machine sends data in the form of blocks called frames to
the destination machine. The starting and ending of each frame
should be identified so that the frame can be recognized by the
destination machine .
5
Design issues
• Flow control –
Flow control is done 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.
• 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.
6
Error Detection and Correction
• There are many reasons such as noise, cross-talk etc., which may help data to
get corrupted during transmission. The upper layers work on some
generalized view of network architecture and are not aware of actual
hardware data processing.Hence, the upper layers expect error-free
transmission between the systems. Most of the applications would not
function expectedly if they receive erroneous data. Applications such as voice
and video may not be that affected and with some errors they may still
function well.
• Data-link layer uses some error control mechanism to ensure that frames
(data bit streams) are transmitted with certain level of accuracy. But to
understand how errors is controlled, it is essential to know what types of
errors may occur.
7
Store-and-forward
Types of Errors
There may be three types of errors:
• Single bit error
• In a frame, there is only one bit, anywhere though, which is corrupt.
• Multiple bits error
• Burst error
• Frame contains more than1 consecutive bits corrupted.
8
Error control mechanism
Error control mechanism may involve two possible ways:
• Error detection
• Error correction
Error Detection
• Errors in the received frames are detected by means of Parity Check and Cyclic
Redundancy Check (CRC). In both cases, few extra bits are sent along with actual data
to confirm that bits received at other end are same as they were sent. If the counter-
check at receiver’ end fails, the bits are considered corrupted.
Parity Check
• One extra bit is sent along with the original bits to make number of 1s either even in
case of even parity, or odd in case of odd parity.
• The sender while creating a frame counts the number of 1s in it. For example, if even
parity is used and number of 1s is even then one bit with value 0 is added. This way
number of 1s remains even.If the number of 1s is odd, to make it even a bit with value
1 is added.
1.9
• The receiver simply counts the number of 1s in a frame. If the count
of 1s is even and even parity is used, the frame is considered to be
not-corrupted and is accepted. If the count of 1s is odd and odd parity
is used, the frame is still not corrupted.
• If a single bit flips in transit, the receiver can detect it by counting the
number of 1s. But when more than one bits are erro neous, then it is
very hard for the receiver to detect the error.
10
Error correction
• Basic approach used for error detection is the use of redundancy bits,
where additional bits are added to facilitate detection of errors.
• Some popular techniques for error detection are:
1. Simple Parity check
2. Two-dimensional Parity check
3. Checksum
4. Cyclic redundancy check
11
1. Simple Parity check
• Blocks of data from the source are subjected to a check bit or parity
bit generator form, where a parity of :
• 1 is added to the block if it contains odd number of 1’s, and
• 0 is added if it contains even number of 1’s
• This scheme makes the total number of 1’s even, that is why it is
called even parity checking.
1.12
1.13
2. Two-dimensional Parity check :
Parity check bits are calculated for each row, which is equivalent to a
simple parity check bit. Parity check bits are also calculated for all
columns, then both are sent along with the data. At the receiving end
these are compared with the parity bits calculated on the received
data.
1.14
3. Checksum
15
Checksum
16
Cyclic redundancy check (CRC)
17
Cyclic redundancy check (CRC)
18
Sliding Window Protocol
19
Types of Sliding Window Protocol
20
Go-Back-N ARQ
23
Selective Repeat ARQ
• Selective Repeat ARQ is also known as the Selective Repeat Automatic
Repeat Request. It is a data link layer protocol that uses a sliding window
method. The Go-back-N ARQ protocol works well if it has fewer errors.
But if there is a lot of error in the frame, lots of bandwidth loss in sending
the frames again. So, we use the Selective Repeat ARQ protocol. In this
protocol, the size of the sender window is always equal to the size of the
receiver window. The size of the sliding window is always greater than 1.
• If the receiver receives a corrupt frame, it does not directly discard it. It
sends a negative acknowledgment to the sender. The sender sends that
frame again as soon as on the receiving negative acknowledgment. There
is no waiting for any time-out to send that frame. The design of the
Selective Repeat ARQ protocol is shown below.
24
25
26
Difference between the Go-Back-N ARQ and Selective Repeat ARQ?
28