






















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!























































Deals with the algorithms for achieving
reliable, efficient communication between two
adjacent machines at the data link layer.
Adjacent means that the two machines are
Connected by a communication channel that
acts conceptually like a wire.
ERRORS ETC.
The principal service is transferring data from the
network layer on the source machine to the
network layer on the destination machine.
On the source machine is an entity, call it a
process, in the network layer that hands some bits
to the data link layer for transmission to the
destination.
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 there
The data link layer can be designed to offer
various services. The actual services offered
can vary from system to system. Three
reasonable possibilities that are commonly
provided are
1. Unacknowledged connectionless service.
Service consists of source machine send
independent frames to the destination machine
without having the destination machine
acknowledge them.
No logical connection is established beforehand or
released afterward.
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.
This class of service is Appropriate when the error
rate is very low so that recovery is left to higher
layers. It is also appropriate for real-time traffic,
2. Acknowledged connectionless service.
Acknowledgements in the data link layer is just an
optimization, never a requirement.
The network layer can always send a packet and
wait for it to be acknowledged.
If the acknowledgement is not forthcoming before
the timer expires, the sender can just send the
entire message
again.
If the average packet is broken up into, say, 10
frames, and 20 percent of all frames are lost, it may
take a very long time for the packet to get through.
If individual frames are acknowledged and
3. Acknowledged connection-oriented service
With this service, the source and destination
machines establish a connection before any data are
transferred.
data link layer guarantees that each frame sent is
indeed received. Also, it guarantees that each frame
is received exactly once and that all frames are
received in the right order.
With connectionless service, in contrast, it is
conceivable that a lost acknowledgement causes a
packet to be sent several times and thus received
several times.
Connection-oriented service, in contrast, provides
3. 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.
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.
3. 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.
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.
A character stream. (a) Without errors. (b) With one
error
The trouble with this algorithm is that the count can
be garbled by a transmission error. For example,
if the character count of 5 in the second frame of
Fig. becomes a 7, the destination will get out of
synchronization and will be unable to locate the
start of the next frame.
A serious problem occurs with this method when
binary data, such as object programs or floating-
point numbers,
are being transmitted. It may easily happen that the
flag byte's bit pattern occurs in the data. This
situation will
usually interfere with the framing.
One way to solve this problem is to have the
sender's data link layer insert a special escape
byte (ESC) just before each ''accidental'' flag
byte in the data.