Errores ARQ
Errores ARQ
Errores ARQ
ARQ
Chapter 2 1
Protocols and the TCP/IP Suite
◦ Go
Go--back
back--N Protocol
◦ Selective
Selective--reject Protocol (A.K.A. selective repeat)
repeat)
Chapter 2 2
Protocols and the TCP/IP Suite
Stop-and
Stop-and--Wait
Protocol
Stop--and-
Stop and-Wait Protocol
including RN=i
Chapter 2 3
Protocols and the TCP/IP Suite
Stop--and-
Stop and-Wait Protocol
Source waits for ACK until timer expires
Timeout =Tfram+2Tprop+Tack=2(
=2(TTtrans+Tprop)
Stop--and-
Stop and-Wait Protocol
Chapter 2 4
Protocols and the TCP/IP Suite
Stop--and
Stop and--Wait ARQ
Lost Frame
• Source sends Data Frame and waits for ACK
• Data Frame is lost
• No ACK is replied by receiver
•Timer expires
•Source Retransmits the frame
Stop--and
Stop and--Wait ARQ
Damaged Frame at destination
•Destination receives frame 1 in error
•NACK is sent back (No ACK & Timer expires)
• Sender knows Frame 1 is in error
•Source Retransmits frame 1
Chapter 2 5
Protocols and the TCP/IP Suite
Stop--and
Stop and--Wait ARQ
Lost ACK
•Frame1 is received at destination
•Destination sends ACK 0
•Source does not receive ACK 0
•Timer expires
•Source Retransmits Frame 1
•Destination Discards duplicated
Frmae1
Stop--and-
Stop and-Wait Link Utilization
Source sends a single frame and waits for
Tfram+2Tprop+Tack=2(
=2(T
Ttrans+Tprop)
Tprop is large relative to Ttrans
Propagation delay is long relative to transmission time
Transmission of only one frame at a time
Waiting for a long time to receive ACK
Link is mostly idle
Chapter 2 6
Protocols and the TCP/IP Suite
Sliding Window
Protocol
Chapter 2 7
Protocols and the TCP/IP Suite
Chapter 2 8
Protocols and the TCP/IP Suite
Chapter 2 9
Protocols and the TCP/IP Suite
Chapter 2 10
Protocols and the TCP/IP Suite
RR = Receive Ready
Go-Back
Go-Back--N
Protocol
Chapter 2 11
Protocols and the TCP/IP Suite
Go--Back-
Go Back-N Protocol
Most common form of error control based on
Sliding Window
Window size W = N
If frame F is in error
◦ Receiver replies with rejection (REJ F / NACK
NACK)
◦ Receiver discards frame F and all subsequent
frames until it receives frame F correctly
Go--Back-
Go Back-N Protocol
Chapter 2 12
Protocols and the TCP/IP Suite
Go--Back
Go Back--N Protocol
NAK 3 means Retransmit Frame 3 (also tells sender that all
frames before frame 3 were received correctly)
Receiver discards all subsequent frames
Receiver only accepts Correct Frames received in Correct
Order
So, receiver doesn’t need to Buffer any frames (to reorder them)
Go--Back
Go Back--N Protocol
Frame 2 is lost
Receiver is expecting Frame 2, But receives Frame 3
Frame 3 (4,5,…) is discarded (even though correctly received)
NAK is sent for Frame 2
Frame 2 and All Subsequences are Retransmitted
Chapter 2 13
Protocols and the TCP/IP Suite
Go--Back-
Go Back-N Protocol
Piggybacking
• When traffic is Bi
Bi--Directional , ACK can be piggybacked
on packets going in other direction
• Each packet contains a
•SN field indicating the packet sequence number
•RN field ACKs the packet in the other direction
• If there is no packet before timeout, acknowledge RN is sent
Selective Repeat
Protocol
Chapter 2 14
Protocols and the TCP/IP Suite
Window size W
Chapter 2 15
Protocols and the TCP/IP Suite
Chapter 2 16
Protocols and the TCP/IP Suite
Chapter 2 17