LECTURE 4-Direct Link Networks PART IV
LECTURE 4-Direct Link Networks PART IV
ENQ / ACK
ENQ / ACK
Line Discipline
Who Should send data
and When ? Poll / Select
• Used primarily between two devices.
Stop-and-wait • A session can be initiated by either station of equal rank.
Flow Control (one frame at a time) • The initiator first transmits a frame called an enquiry (ENQ) asking if the receiver
a set of procedures used to
restrict the amount of data is available to receive the data.
that the sender can send Sliding window
• The receiver must answer with either with an acknowledgement (ACK) frame if it
(several frames at a time)
is ready or with negative acknowledgement (NAK) frame if it is not.
Error Control • When ACK or NAK is not received within a specified time limit, the initiator sends
How can errors be Stop-and-wait ARQ another.
Detected and correct? • At the end of transmission sending system finishes it with end of transmission
Sliding window ARQ (EOT).
147
Go-back-n Selective-reject 148
Prepared by Dr.S.Muralidharan 1
Dept. of EEE CS 65 Computer Networks
Poll / Select
• This method works with topologies where one device is designated as a primary
station and others are secondary stations.
• All the data exchanges must be made through the primary device.
• In such multipoint topology identify each device with an address, poll/select
identify each frame as being either to or from a specific device on the link.
• It is up to the primary to determine which device is allowed to use the channel at a
given time.
• If the primary wants to send data, it asks the target secondary to get ready by
“selecting”. This is done by sending SEL frame containing the intended
secondary. Also primary wait till it gets “acknowledgement” from the target
secondary device.
149 150
151 152
Prepared by Dr.S.Muralidharan 2
Dept. of EEE CS 65 Computer Networks
153 154
• When the receiver sends an ACK, it includes the number of • SENDER SLIDING WINDOW
the next frame it expects to receive. • At the beginning of a transmission, the sender’s window contains n-1 frames.
As frames are sent out, the left boundary of the window moves inward,
• ie. in order to acknowledge the receipt of frames ending in frame 4,
shrinking the size of the window.
the receiver sends acknowledgement containing the number 5.
• Once an ACK arrives, the window expands to allow in a number of new
• This ACK informs the sender about the proper delivery of frames up to frames equal to the number of frames acknowledged by that ACK frame
frame 4. • For a given window size 7, if frames 0 through 4 have been sent and no
• SENDER SLIDING WINDOW acknowledgement has been received, the sender window contains two
• At the beginning of a transmission, the sender’s window contains n-1 frames. frames, numbered 5 and 6.
As frames are sent out, the left boundary of the window moves inward, • If an ACK numbered 4 is received, four frames (0 to 3) are known to have
shrinking the size of the window. arrived undamaged and the sender’s window expands to include the next four
• Once an ACK arrives, the window expands to allow in a number of new frames inside the window.
frames equal to the number of frames acknowledged by that ACK frame
155 156
Prepared by Dr.S.Muralidharan 3
Dept. of EEE CS 65 Computer Networks
157 158
• As the frames 0-4 arrived the window shrinks by 5 from left to right.
shrinks
• As the ACK is sent out, the receiving window expands to include as many
new frames as newly acknowledged.
Expands
159 160
Prepared by Dr.S.Muralidharan 4
Dept. of EEE CS 65 Computer Networks
Prepared by Dr.S.Muralidharan 5
Dept. of EEE CS 65 Computer Networks
Stop-and-wait ARQ: Lost data frame Stop-and-wait ARQ: Lost ACK frame
Prepared by Dr.S.Muralidharan 6
Dept. of EEE CS 65 Computer Networks
Prepared by Dr.S.Muralidharan 7
Dept. of EEE CS 65 Computer Networks
Prepared by Dr.S.Muralidharan 8
Dept. of EEE CS 65 Computer Networks
Sliding Window
Sliding Window - Selective-reject
Go-back-n: Lost ACK
• The sender is not expecting acknowledgement for each • In selective-reject ARQ, only the specific damaged or lost
frame. Instead it expects a ACK signal for a group of frames. frame is retransmitted. NAK will be sent only for the corrupted
• This ACK is expected before the expiry of a timer. frame. Upon retransmission, the receiver must be able to sort
the frames it has and insert the retransmitted frame into its
proper place in the sequence.
• Sending device should have the capability to retransmit only
the requested frame.
• To help in this process, ACK numbers, like NAK numbers,
must refer to the frame received (or lost) instead of the next
frame expected.
Prepared by Dr.S.Muralidharan 9
Dept. of EEE CS 65 Computer Networks
COMPARISON
Selective-reject Go-Back-n
Retransmit only the Retransmit all the
specific damaged or frames following the
lost frame damaged or lost frame
Involves complexity of Complexity of sorting,
sorting and storage requirement of more
required by the storage and selective
receiver. retransmission are not
Sender needs a logic to needed
select and retransmit
the damaged frame
alone
Efficient but Complex Simple but less efficient
Prepared by Dr.S.Muralidharan 10