Chapter 3 - Part2 Flashcards
What is the Stop and Wait Protocol
sender sends one packet then waits for a receiver response
- resends packet if no response (time-out)
How is reliable services implemented (for app/transport layer)
Using sockets between the application and transport layer to ensure reliable data transfer protocol
- Works even if the network layer has an unreliable channel (link)
What are some mechanisms provided by the stop-and-wait protocol?
- ACKS
- Retransmissions
- Checksums
- Timeout
- Sequence #’s
What kind of protocol is Sequence numbering found in? TCP, UDP, or both?
TCP ONLY.
For Stop and Wait Protocol, what happens when there is no loss?
Sender: sends pkt 0
Receiver: rcv pkt 0, sends ack 0
For Stop and Wait Protocol, what happens when there is packet loss in the middle of transmission?
Timeout happens and it resends the packet that is lost.
For Stop and Wait Protocol, what happens when there is a packet with bit error?
Receiver detects the error through checksum.
Receiver sends ACK for the last packet received correctly
For Stop and Wait Protocol, what happens when ACK gets lost in the middle of transmission?
Sender doesn’t receive the ACK.
Sender sends the same packet.
Receiver receives DUPLICATE packet
- receiver ignores packet but sends ACK again
For Stop and Wait Protocol, what happens when there is a premature timeout / delayed ACK?
Timeout occurs. Sender resends packet.
Receiver receives DUPLICATE packet and sends ACK again.
Sender receives 2 back-to-back ACKS, ignores it.
Cons of a stop-and-wait operation?
Waste of time during RTT periods, utilization is very low since it only sends 1 packet at a time.
How to solve the Stop-and-wait operation?
Through Pipelined Protocols:
- increases utilization
- More packets per RTT
What are the 2 Pipelined Protocols?
- Go-Back-N
- Selective Repeat
What is Go-Back-N? Key points / window
Key points:
- No buffers for out-of-order packets (Discards them)
- Uses cumulative ACKs (ACK for last in-order packet)
– Ex: receiving ACK2 assumes ACK0 and ACK1 are received
- Retransmits the lost packet and all subsequent packets
Window:
- Only slides when cumulative ACKs are received.
- Sends all packets in a window for lost packet
What is Selective Repeat? key points / window
Key points:
- Buffers out of order packets before delivering them to app layer
- Uses individual ACKs
- Sender only retransmits the packets not received & timer for each unacked packet
Window:
-Slides forward as ACKs are received