Elementary Data Link Protocols
Elementary Data Link Protocols
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Elementary Data Link Protocols
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Elementary Data Link Protocols
...
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Unrestricted Simplex Protocol
• The protocol consists of two procedures.-
• sender and receiver procedure
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Utopian Simplex Protocol
...
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Utopian Simplex Protocol
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Simplex Stop-and-Wait Protocol
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Simplex Stop-and-Wait Protocol
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Simplex Stop-and-Wait Protocol
...
A simplex stop-and-wait protocol.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Simplex Stop-and-Wait Protocol
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
A simplex protocol for noisy channel
14
Data Frame Transmission
• Full-duplex - approach 2
– Same circuit for both directions
– Data and acknowledgement are intermixed
– How do we tell acknowledgement from data?
"kind" field telling data or acknowledgement
– Can it be improved?
• Approach 3
– Attaching acknowledgement to outgoing data
frames
Piggybacking
15
Piggybacking
• Temporarily delaying transmission of outgoing
acknowledgement so that they can be hooked
onto the next outgoing data frame
• Advantage: higher channel bandwidth
utilization
• Complication:
– How long to wait for a packet to piggyback?
– If longer than sender timeout period then
sender retransmit
Purpose of acknowledgement is lost
16
Piggybacking
• Solution for timing complexion
– If a new packet arrives quickly
Piggybacking
– If no new packet arrives after a receiver ack
timeout
Sending a separate acknowledgement frame
17
Sliding window protocols
• 3 bidirectional sliding window protocols:
– One-bit sliding window protocol (1, 1)
– Go back N (>1, 1)
– Selective repeat (>1, >1)
(max sending window size, receiving window size)
• Here, at any instant of time, the sender maintains a set
of sequence nos corresponding to frames it is permitted
to send.
• These frames are said to fall within sending window.
• Similarly receiver maintains receiving window
corresponding to the set of frames it is permitted to
receive.
A one-bit sliding window protocol
• Here max window size is 1.
• Uses stop-and-wait.
• i.e sender sends frame and waits for ack
• Two variables:
• Next_frame_to_send tells which frame the sender is
trying to send.
• Frame_expected tells which frame the receiver is
expecting.
Go Back N
Go back N
• Here after occuring an error, the receiver simply discard
the incoming frames.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011