Discussion 6
1
CS 168, Spring 2026 @ UC Berkeley
Slides credit: Sylvia Ratnasamy, Rob Shakir, Peyrin Kao, Iuniana Oprescu
Reliable Delivery, TCP 📆
Logistics
TCP
Reliability
Go-Back-N
Kurose Ross, Computer Networking: A Top-down Approach, Chapter 3
Not what TCP does, but useful as a starting point to figure out something better.
Go-Back-N w/o Errors
Window
S=1
S=2
S=3
S=4
A=1
A=2
A=3
A=4
Go-Back-N w/o Errors
Window
S=1
S=2
S=3
S=4
A=1
A=2
A=3
A=4
S=5
Go-Back-N w/o Errors
Window
S=1
S=2
S=3
S=4
A=1
A=2
A=3
A=4
S=5
S=6
Go-Back-N w/o Errors
Window
S=1
S=2
S=3
S=4
A=1
A=2
A=3
A=4
S=5
S=6
S=7
A=5
Go-Back-N w/o Errors
Window
S=1
S=2
S=3
S=4
A=1
A=2
A=3
A=4
S=5
S=6
S=7
S=8
A=5
A=7
A=8
A=6
…
Go-Back-N w/ Errors
S=1
S=2
S=3
S=4
A=1
A=2
A=3
A=4
S=5
S=6
S=7
S=8
A=5
A=5
A=5
Packet 6 timeout
S=9
S=6
S=7
S=8
S=9
A=6
A=7
A=8
A=9
Window: {1 2 3 4}
{1 2 3 4}
{1 2 3 4}
{1 2 3 4}
{2 3 4 5}
{3 4 5 6}
{4 5 6 7}
{5 6 7 8}
{6 7 8 9}
Review
TCP
Destination port
Sequence Number number
Acknowledgment
Advertised window
HdrLen
Flags
0
Checksum
Urgent pointer
Options (variable)
Data
Source port
TCP Header
Source port
Destination port
Sequence Number
Acknowledgement Number
HdrLen 0 Flags
Advertised window
Checksum
Urgent
Options
Data
TCP Header
Source port
Destination port
Sequence Number
Acknowledgement Number
HdrLen 0 Flags
Advertised window
Checksum
Urgent
Options
Data
TCP Header
Source port
Destination port
Sequence Number
Acknowledgement Number
HdrLen 0 Flags
Advertised window
Checksum
Urgent
Options
Data
TCP Header
Source port
Destination port
Sequence Number
Acknowledgement Number
HdrLen 0 Flags
Advertised window
Checksum
Urgent
Options
Data
TCP Header
Source port
Destination port
Sequence Number
Acknowledgement Number
HdrLen 0 Flags
Advertised window
Checksum
Urgent
Options
Data
TCP Header
Source port
Destination port
Sequence Number
Acknowledgement Number
HdrLen 0 Flags
Advertised window
Checksum
Urgent
Options
Data
TCP Segments
TCP/IP packet: IP packet with TCP header and TCP data inside.
Size limits:
TCP Header
TCP Payload (Segment)
IP Header
IP Payload
Limit MTU bytes
Limit MSS bytes
TCP
Three Way Handshake
Three Way Handshake
Three Way Handshake
Connection Establishment
Connection Establishment
TCP
Two Teardown Methods
Normal Teardown
TCP Reset
TCP
Reliability
Timeout
Timeout
Duplicate ACKs
Worksheet
Question 1: TCP in Action
Question 1: TCP in Action
Question 1: TCP in Action
D100
D200
D300
X
A200
Timer start (A200)
A200
D400
A200
.
.
.
TO
D200
A500
Time-out! Retransmit
1 RTT
1 RTT
Note: The question assumes each batch is sent/received at the same time, but they are shown separately for readability
Question 1: TCP in Action
1 RTT
A600
D500
A700
D600
D700
X
Timer start (A700)
A700
D800
A700
D900
D700
A1000
Time-out! Retransmit
TO
1 RTT
.
.
.
Note: The question assumes each batch is sent/received at the same time, but they are shown separately for readability
Question 1: TCP in Action
1 RTT
A1100
D1000
Total Time = RTT + TO + RTT + RTT + TO + RTT + RTT
= 5 * RTT + 2 * TO
= 6.05 seconds
Worksheet
Question 2: TCP Calculations
Question 2: TCP Calculations
Question 2: TCP Calculations
Worksheet
Question 3: Reliable Transport
Question 3: Reliable Transport
Question 3: Reliable Transport
Question 3: Reliable Transport
Questions?
Feedback Form: https://tinyurl.com/cs168-su25-disc-feedback