Sei sulla pagina 1di 11

Elementary Data Link Protocols:

When the data link layer accepts a packet, it encapsulates the packet in a frame by
adding a data link header and a trailer to the frame .Frame consists of an embedded packet which
contains control information and a check sum.

When a frame arise at receiver, the hardware computes check sum .If it is found error ,it
is informed to the data link layer .If there is no error, it just checks control information in the
header and passes the packet to the network layer.

A frame consists of 4 fields.


1) Kind
2) Sequence
3) Acknowledgement
4) Information
The first 3 contain control information and 4th contains actual data to be transferred. These
control fields are collectively called as ‘Frame Header’.

The kind field tells whether there are any data in the frame, because some of the protocols
distinguish frames containing only control information from those containing data as well. The
seq and ack fields are used for sequence numbers and acknowledgements, respectively. The info
field of a data frame contains a single packet.

1) Unrestricted Simplex Protocol.


Assumptions:

1. Data is transmitted only in one direction.


2 .Both transmitting and receiving layers are always busy.
3. Processing time is ignored.
4. Infinite buffer space is available.
5. No chance of damaged frames.
6. This protocol consists of 2 separate procedures i.e.,sender1 and receiver1.

In this case, the only event is frame arrival. In sender’s procedure, packet is collected from
network layer and the frame is forwarded to the physical layer.

In receiver’s procedure, the frame is collected from the physical layer and
converted in to packets, then forwarded to network layer. It is a very simple
protocol and highly unrealistic, imaginary protocol.
2) Simplex Stop-and-Wait Protocol
Assumptions:
1)One direction flow of data from sender to receiver.
2) The receiver has only finite buffer capacity.
3) Communication is error free.
4) The receiver has a finite processing speed.
 The advantage of this protocol is that it is able to prevent the sender from flooding the
receiver with fastest data rate, than it can handle.
 The sender procedure has one frame which is made from the packet received from
network layer and forwarded to physical layer. But, the physical layer would be waiting
for the acknowledgement frame from the previously transmitted frame from the receiver.
 The receiver procedure has two frames. One for the frame received from the physical
layer to be converted to a packet and forwarded to the network layer. The other frame is
sent to the physical layer as acknowledgement to the sender for the already transmitted
frame.

Disadvantages:

1) Sender always waits for the acknowledgement frame to send the next frame.
2)If the acknowledgement frame gets corrupted,the sender cannot perform anymore.

3) Simplex Protocol for a Noisy Channel:


Assumptions:
1) Data transfer is only in one direction.
2) Separate sender and receiver.
3) Finite processing capacity and speed at the receiver.
4) Since it is a noisy channel , errors in the data frames or acknowledgement frames are
expected.
5) Every frame has an unique sequence number.
6) After a frame has been transmitted, timer is started for a finite time. Before the timer expires,
if the acknowledgement is not received, the frame gets retransmitted.
7) When the acknowledgement gets corrupted or the sent data frame gets damaged, how long the
sender should wait to transmit the next frame is infinite.
This protocol is also called as “Positive Acknowledgement with Retransmission (PAR)” or
“Automatic Repeat Request Protocol (ARQ)”.

Sliding Window Protocols:


1. Piggy Backing
2. One Bit Sliding Window Protocol
In the data link protocols, data frames transmitted in one direction only, where as in
sliding window protocols, the data is transmitted in both the directions.
1.Piggy Backing:
When a data frame arrives,instead of immediately sending the acknowledgement
frame,the receiver waits for the next data packet and the acknowledgement ia attached to the
outgoing frame.
When no data packet from receiver ,the receiver should send an acknowledgement
to the sender before the time elapses at the sender to avoid retransmission of data.
2.One Bit Sliding Window Protocol:
In this protocol, each frame contains a sequence number ranging from 0 to 1.In
general, the sequence numbers will be from 0 to 2^ (n-1),where n is the sequence number bit
field. This protocol is similar to elementary data link protocols except the direction of
communication. Next frame to send tells which frame the sender is trying to send .The frame
expected tells which frame the receiver is expecting. In both the cases, 0 and 1 are the only
possibilities.

The Acknowledgement field contains the number of last frame received without

error. If this number agrees with the sequence number of the frame, the sender is trying to send ,
the sender knows it is received correctly. The next frame stored in the buffer can be fetched from

the network layer. If the sequence number disagrees, it must continue to send the same frame.
SLIDING WINDOW PROTOCOLS:
1. Pipelining
2. Round Trip Time
3. Protocol 5(Go Back N)
4. protocol 6(Selective Repeat)

1.Pipelining:
In all the previous protocols,the rule is that a sender has to wait for an
acknowledgement before sending another frame.It is a technique which includes parallelism in
the protocols and allows the sender to transmit more than one frame before blocking.With an
appropriate choice,how many frames sender will be able to continuously transmit frames for a
time equal to round trip time.

2.Round Trip Time:


Sum of the times taken from the sender to receiver and from receiver to sender for a
frame to transmit.

3.Protocol 5(Go Back N protocol):

One of the pipelining protocol which deals with errors. The receiver simply
discards all subsequent frames sending no acknowledgements for the discarded frames. The data
link layer refuses to accept any frame except the next one it must give to the network layer. If the
sender’s window fills up before the timer runs out, the pipeline begins to empty and the sender
retransmit all the unacknowledged frames in order starting with the lost frame.
Advantages:
i. Minimum Buffer management is required.
ii. It requires minimum buffer space.

Disadvantages:

i. More retransmissions in case of high error rate.


ii. Most of the band width is wasted.
4.Protocol 6(Selective Repeat):

This is the another data link layer flow control protocol, which handles
transmission errors with pipelining technique. When the pipelining technique is used, a bad
frame that is received is discarded but good frames received after it are buffered. When the
sender’s time is out, the unacknowledged frame is transmitted. If that frame arrives correctly,
the receiver can deliver to the network layer in sequence. Selective Repeat Protocol is often
combined with negative acknowledgements when it detects an error.

Advantages:

i. Lot of Band Width is saved.


ii. Minimum no.of retransmissions.
iii. Highest efficiency is required.

Disadvantages:

1. It requires large amount of buffer space at the receiver end.

Potrebbero piacerti anche