0% found this document useful (0 votes)
20 views19 pages

Design Issues of Datalink Layer

Uploaded by

harinihari2097
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views19 pages

Design Issues of Datalink Layer

Uploaded by

harinihari2097
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

2.

1 DATA LINK LAYER DESIGN ISSUES


The main functions and the design issues of this
layer are:

1. Services Provided to the Network Layer


2. Framing
3. Error Control
4. Flow Control
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.1 Services Provided to the Network Layer

• The function of the data link layer is to provide


services to the network layer.

• The principal service is transferring data from the


network layer on the source machine to the
network layer on the destination machine.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.1 Services Provided to the Network Layer
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.1 Services Provided to the Network Layer
The data link layer can be designed to offer various
services. The actual services that are offered vary
fro m p rotoco l to p ro to co l . T hree re a so na bl e
possibilities that we will consider in turn are:

1. Unacknowledged connectionless service.


2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.1 Services Provided to the Network Layer

Unacknowledged connectionless service

Ø No logical connection is established beforehand or


released afterward.
Ø Unacknowledged connectionless service consists of
having the source machine send independent frames to
the destination machine without having the destination
machine acknowledge them.
Ø If a frame is lost due to noise on the line, no attempt is
made to detect the loss or recover from it in the data
link layer.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.1 Services Provided to the Network Layer

Acknowledged connectionless service


Ø When this service is offered, there is no logical
connections used, but each frame sent individually
acknowledged. In this way, the sender knows
whether a frame has arrived correctly or not.
Ø If it has not arrived within a specified time interval,
it can be sent again.
Ø This service is useful over unreliable channels, such
as wireless systems. 802.11 (Wi-Fi) is a good
example.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.1 Services Provided to the Network Layer

Acknowledged connection-oriented service


Ø When connection-oriented service is used, transfers go
through three distinct phases.
Ø In the first phase, the connection is established by
having both sides initialize variables and counters
needed to keep track of which frames have been
received and which ones have not.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.1 Services Provided to the Network Layer

Acknowledged connection-oriented service


Ø In the second phase, one or more frames are actually
transmitted.
Ø In the third and final phase, the connection is released,
freeing up the variables, buffers, and other resources
used to maintain the connection.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.2 Framing
• To provide service to the network layer, the data link
layer must use the service provided by the physical
layer.

• If the channel is noisy, as it is for most wireless and


some wired links, the physical layer will add some
redundancy to its signals to reduce the bit error rate to
a tolerable level.

• The usual approach is for the data link layer to break


up the bit stream into discrete frames, compute a short
token called a checksum for each frame, and include
the checksum in the frame when it is transmitted.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.2 Framing
• When a frame arrives at the destination, the checksum
is recomputed. If the newly computed checksum is
different from the one contained in the frame, the data
link layer knows that an error has occurred and takes
steps to deal with it.
• Breaking up the bit stream into frames, We will look at
four methods:
1. Byte count.
2. Flag bytes with byte stuffing.
3. Flag bits with bit stuffing.
4. Physical layer coding violations.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.2 Framing

Figure : A byte stream. (a) Without errors. (b) With one error.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.2 Framing

• The first framing method uses a field in the header to


specify the number of bytes in the frame. When the data link
layer at the destination sees the byte count, it knows how
many bytes follow and hence where the end of the frame.

• The second framing method gets around the problem of


resynchronization after an error by having each frame start
and end with special bytes, called a flag byte, is used as
both the starting and ending delimiter. The data link layer
on the receiving end removes the escape bytes before giving
the data to the network layer. This technique is called byte
stuffing.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.2 Framing

Figure : (a) A frame delimited by flag bytes. (b) Four examples of byte sequences
before and after byte stuffing.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.2 Framing
• The third method of delimiting the bit stream gets
around a disadvantage of byte stuffing, which is that it
is tied to the use of 8-bits. Framing can be also be
done at the bit level, so frames can contain an
arbitrary number of bits made up of units of any size.
• It was developed for the once very popular HDLC
(High-level Data Link Control) protocol. Each frame
begins and ends with a special bit pattern, 01111110.
• When the receiver sees five consecutive incoming 1
bits, followed by a 0 bit, it automatically de-stuffs (i.e.,
deletes) the 0 bit.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.2 Framing
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.2 Framing
• The last method of framing is ‘‘coding violations’’
to delimit frames. The beauty of this scheme is
that, because it is easy to find the start and end of
frames and there is no need to stuff the data.
• Many data link protocols use a combination of
these methods for safety. A common pattern used
for Ethernet and 802.11 is to have a frame begin
with a well-defined pattern called a preamble.
• The preamble is then followed by a length (i.e.,
count) field in the header that is used to locate the
end of the frame.
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.3 Error Control
The data link layer ensures error free link for data
transmission. The issues it caters to with respect to
error control are −
• Dealing with transmission errors
• Sending acknowledgement frames in reliable
connections
• Retransmitting lost frames
• Identifying duplicate frames and deleting them
• Controlling access to shared channels in case of
broadcasting
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.3 Flow Control
• The data link layer regulates flow control so that a
fast sender does not drown a slow receiver. When
the sender sends frames at very high speeds, a
slow receiver may not be able to handle it. There
will be frame losses even if the transmission is
error-free.
The two common approaches for flow control are −
1. Feedback based flow control
2. Rate based flow control
2.1 DATA LINK LAYER DESIGN ISSUES
2.1.3 Error Control
• In the first one, feedback-based flow control, the
receiver sends back information to the sender
giving it permission to send more data, or at least
telling the sender how the receiver is doing.

• In the second one, rate-based flow control, the


protocol has a built-in mechanism that limits the
rate at which senders may transmit data, without
using feedback from the receiver.

You might also like