0% found this document useful (0 votes)
0 views

Design Issues of Data Link Layer

The data link layer is responsible for sending and receiving bits over communication channels, providing services to the network layer, and ensuring error detection and flow control. It encapsulates packets into frames for transmission, with various service types including unacknowledged and acknowledged services. Key functions include framing, error control, and flow control mechanisms to manage data transmission rates between sender and receiver.

Uploaded by

anjacboy
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)
0 views

Design Issues of Data Link Layer

The data link layer is responsible for sending and receiving bits over communication channels, providing services to the network layer, and ensuring error detection and flow control. It encapsulates packets into frames for transmission, with various service types including unacknowledged and acknowledged services. Key functions include framing, error control, and flow control mechanisms to manage data transmission rates between sender and receiver.

Uploaded by

anjacboy
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/ 4

Data Link Layer

• The data link layer uses the services of the physical layer to send and receive bits over
communication channels.
• 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.

• The data link layer takes the packets it gets from the network layer and encapsulates
them into frames for transmission.
• Each frame contains a frame header, a payload field for holding the packet, and a
frame trailer

Design Issues of the Data Link Layer

Services Provided to the Network Layer

• The function of the data link layer is to provide services to the network layer.
• The main service is transferring data from the network layer on the source machine to
the network layer on the destination machine.
• The job of the data link layer is to transmit the bits to the destination machine so they
can be handed over to the network layer

The data link layer can be designed to offer various services. The actual services are
1. Unacknowledged connectionless service.
2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service
Unacknowledged connectionless service
• The source machine send independent frames to the destination machine without
having the destination machine acknowledge them.
• The receiving machine does not acknowledge receiving the frame.
• No logical connection is set up between the host machines.
• If a frame is lost, no way to recover it in the datalink layer
• This is used in Ethernet

Acknowledged connectionless service.

• No logical connection is set up between the host machines


• Each frame sent by the source machine is acknowledged by the destination machine
on receiving.
• If a frame has not arrived within a specified time interval, it can be send again
• This is used in Wifi (IEEE 802.11) services.

Acknowledged connection-oriented service

• A logical connection is set up between the two machines


• 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.
• When connection-oriented service is used, transfers go through three distinct phases
• In the first phase, the connection is established
• 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.

Framing
• The data link layer must use the service provided to it by the physical layer.
• Bit stream in physical layer is not guaranteed to error free.
• The number of bits may be less than or more than the number of bits transmitted.
• So the data link layer has to detect and correct errors if necessary.
• The data link layer has to break the bit stream into frames.
• Framing is a process of breaking a bit stream up into discrete frames and compute the
checksum for each frame.

• Framing is done in data link layer. The three framing methods are,
o Character count
o Character stuffing or Byte Stuffing
o Bits stuffing
Character count
• To count total number of characters that is present in frame.
Character Stuffing or Byte Stuff:

• Character stuffing is also known as byte stuffing or character-oriented framing.


• In byte stuffing, special byte that is basically known as ESC (Escape Character) that
has predefined pattern is generally added to data section of the data stream
• frame when there is message or character that has same pattern as that of flag byte.
• But receiver removes this ESC and keeps data part
• The character stuffing is allows 1 additional byte if there is presence of ESC or flag in
text.

Bit stuffing
• Bit stuffing is the insertion of non-information bits into data.
• Extra bits are being added by network protocol designers to data streams.

Example Bit stuffing

• (a) The original data


• (b) The data as they appear on the line after bit stuffing
• (c) The data as they are stored in the receiver’s memory after de-stuffing
Error Control
• The usual way to ensure reliable delivery is to provide the sender with
acknowledgement.
• The acknowledgement can be positive or negative.
• If sender receives positive acknowledgement, it knows the frame has arrived safety.
• If sender receives negative acknowledgement, it knows something has gone wrong
and the frame must transmitted again.

Timer
• When the sender transmit a frame, it starts a timer.
• The timer is set to go off again an interval, which is enough for the frame to reach
destination, be process there and have the acknowledgement back to the sender.
• If either the frame or acknowledgement is lost the timer will go off, just the sender
retransmit the frame again.

Sequence number:
• Sequence numbers are used to avoid duplicate frames.
• Frames may be transmitted multiple times so the receiver may receive duplicate
frames.
• To prevent this, it is necessary to assign sequence numbers.

Flow Control
• Sender may transmit frames faster than the receiver.
• This situation occurs when the sender is running on a fast computer and a receiver is
running on a slow computer.
• The sender sends frame at high rate until the receiver has completely received.
• The usual solution is sender not to send more faster than the receiver.
• The flow control is classified into two categories: Feedback-based flow control and
Rate-based flow control

Feedback-based flow control


• The receiver sends back information to the sender giving it permission to send more
data.
• In data link layer, the sender continues to send frames only after it has received
acknowledgments from the user for the previous frames.
• This is called feedback based flow control.

Rate-based flow control


• When sender sends or transfer data at faster speed to receiver and receiver is not being
able to receive data at the speed
• 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