Lecture - 11 - Chapter 3 - 01 Oct 2024
Lecture - 11 - Chapter 3 - 01 Oct 2024
Lecture 11
Chapter 3
1. [0, base -1] are packets with sequence numbers sent & ACKed.
2. [base, nextseqnum - 1] are sequence numbers sent but not yet
ACKed (inflight.)
3. [nextseqnum, base + N - 1] are sequence numbers that can be
sent immediately if more data arrives from the App layer.
4. [>=, base + N] are sequence numbers that can’t be used until an
unACKed packet is ACKed. Transport Layer 3-6
Go-Back-N: receiver
ACK-only: always send ACK for correctly-received packet so far, with
highest in-order seq #
• may generate duplicate ACKs
• need only remember rcv_base
on receipt of out-of-order packet:
• can discard (don’t buffer) or buffer: an implementation decision
• re-ACK pkt with highest in-order seq #
rcv_base
Not received
Transport Layer: 3-7
Go-Back-N in action
sender window (N=4) sender receiver
012345678 send pkt0
012345678 send pkt1
012345678 send pkt2 receive pkt0, send ack0
012345678 send pkt3 Xloss receive pkt1, send ack1
(wait)
receive pkt3, discard,
012345678 rcv ack0, send (re)send ack1
012345678 pkt4
rcv ack1, send receive pkt4, discard,
pkt5 (re)send ack1
ignore duplicate ACK receive pkt5, discard,
(re)send ack1
pkt 2 timeout
012345678 send pkt2
012345678 send pkt3
012345678 send pkt4 rcv pkt2, deliver, send ack2
012345678 send pkt5 rcv pkt3, deliver, send ack3
rcv pkt4, deliver, send ack4
rcv pkt5, deliver, send ack5
pkt0
a dilemma! 0123012
0123012 pkt1 0123012
0123012 pkt2 0123012
X
seq #s: 0, 1, 2, 3 (base 4 counting) 0123012
pkt0 will accept packet
window size=3 (a) no problem
with seq number 0
0123012 pkt0
0123012 pkt1 0123012
0123012 pkt2 X 0123012
X 0123012
X
timeout
retransmit pkt0
0123012 pkt0
will accept packet
with seq number 0
(b) oops!
Transport Layer: 3-13
sender window receiver window
Selective repeat: (after receipt) (after receipt)
pkt0
a dilemma! 0123012
0123012 pkt1 0123012
0123012 pkt2 0123012
X
seq #s: 0, 1, 2, 3 (base 4 counting) 0receiver
123012
can’t
pkt0 will accept packet
window size=3 see sender side with seq number 0
(a) no problem
receiver
behavior
identical in both
cases!
0something’s
123012 pkt0
Q: what relationship is needed 0(very)
1 2 3 0 1wrong!
2 pkt1 0123012
pkt2 X
between sequence # size and 0123012
X
0123012
0123012
window size to avoid problem X
timeout
in scenario (b)? retransmit pkt0
0123012 pkt0
will accept packet
with seq number 0
(b) oops!
Transport Layer: 3-14
Selective repeat: sender window receiver window
- Go Back N
The sender sends N packets which is equal to the window size. Once the
entire window is sent, the sender then waits for a cumulative ACK to
send more packets. On the receiver end, it receives only in-order
packets and discards out-of-order packets. As in case of packet loss,
the entire window would be re-transmitted.
- Selective Repeat
The sender sends packet of window size N and the receiver acknowledges
all packet whether they were received in order or not. In this case,
the receiver maintains a buffer to contain out-of-order packets and
sorts them. The sender selectively re-transmits the lost packet and
moves the window forward.
• At N=1, Go Back N is
effectively reduced to Stop
and Wait
• As Go Back N acknowledges
the packets cumulatively, it
rejects out-of-order packets
options (variable
C, E: congestion notification length)
TCP options
application data sent by
RST, SYN, FIN: connection data application into
management (variable length) TCP socket
(marked by the
Urgent Data
Pointer field.)