1/65
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Problem with stop and wait protocols
ACKing every packet will take a long time
NACK-less channel approach
sender waits âreasonableâ amount of time for an ACK. It will retransmit if the ACK is not received in time
If packet or ACK is delayed and not lost retransmission will be a
duplicate
If retransmission pkt is a duplicate, the ____ will handle this
sequence number
receiver must specify ______ _______ of pkt being ACKed
sequence number
pipelining
sender allows multiple, âin-flightâ, yet-to-be-acknowledged pkts with seq#
two forms of pipelined protocols
go-back-N (GBN), selective repeat
3-packet pipelining formula
(3L / R) / (RTT + (L/R))
Go-Back-N
sender can have up to N unacked packets in pipeline
GBN: receiver only send ______ _____
cumulative ack
Selective Repeat: receiver sends _____ ____ for each packet
individual ack
Selective Repeat
sender can have up to N unacked packets in pipeline
Go-Back-N: sender
k-bit sequence number in packet header
ACK(n):
ACKs all pkts up to, including seq # n -âcumulative ACKâ
timeout(n)
retransmit packet n and all higher seq # pkts in window
GBN receiver Ack-only:
always send ACK for correctly received pkt with highest in-order seq #
out-of-order pkt
discard, dont buffer, re-ACK packet with highest in order seq #
Selective repeat
receiver individually acknowledges all correctly received packets
selective repeat: sender only resends pkts for ______
which ACK wasnât received
Selective repeat: sender window
N consecutive seq #s, limits seq #s of sent unACKED pkts
TCP: point-to-point
one sender, one receiver. no multicasting, NOT circuit-switched
TCP provides
reliable in-order bytes-stream
TCP: pipelined
TCP congestion and flow set the window size
TCP: full duplex data
bi-directional data flow in same connection
MSS
maximum segment size
TCP: connection-oriented
handshaking initializes the sender-receiver state before data exchange
TCP: flow controlled
sender will not overwhelm receiver
TCP Sequence Number
Indicate the position in the byte stream, specifically the number of the first byte of data carried in the segment.
TCP Acknowledgements
Sequence # of next byte expected from other side. cumulative ack
how does the receiver handle out-of-order segments?
TCP spec doesnât say, up to implementor
How to estimate RTT?
SampleRTT: measured time from segment transmission until ACK receipt
To get a more accurate RTT, take _______ measurements
multiple, then average
TCP reliable data transfer
TCP creates rdt service on top of IPs unreliable service
retransmissions are triggered by
timeout events, duplicate acks
TCP sender events: data received from app
Create segment with seq #, seq # is byte-stream number of first data byte in segment, start the timer if not already running
TCP sender events: timeout
retransmit segment that caused timeout, restart timer
TCP sender events: ack rcvd
if ack acknowledges previously unacked segments: update what is known to be ACKed, start timer if there are still unacked segments
Event at receiver: arrival of in-order segment with expected seq #. All data up to expected seq # is already ACKed. What is the TCP receiver action?
delayed ACK, wait up to 500ms for next segment. if no next segment, send ACK
Event at receiver: arrival of in-order segment with expected seq #. One other segment has ACK pending. What is the TCP receiver action?
immediately send single cumulative ACK, ACKing both in-order segments
event at receiver: arrival of out-of-order segment higher-than-expect seq. # . Gap detected. What is the TCP receiver action?
immediately send duplicate ACK, indicating seq. # of next expected byte
Event at receiver: arrival of segment that partially or completely fills gap. What is the TCP receiver action?
immediate send ACK, provided that segment starts at lower end of gap
TCP flow control
receiver controls sender, so sender wonât overflow receiverâs buffer by transmitting too much, too fast
TCP flow control: Step 1
receiver âadvertisesâ free buffer space by including rwnd value in TCP header of receiver-to-sender segments
TCP flow control: step 2
sender limits amount of unacked (âin-flightâ) data to receiverâs rwnd value
TCP flow control: final step
guarantees receive buffer will not overflow
2-way handshake will always work in network: T/F
False
TCP: Closing a connection
client, server each close their side of connection with FIN bit = 1
TCP: closing a connection step 2
Respond to received FIN with ACK
congestion
too many sources sending too much data too fast for network to handle
congestion is different from fflow control: T/F
True
lost packets means
buffer overflow at routers
long delays means
queueing in router buffers
sender limits transmission equation
LastByteSent - LastByteAcked <= cwnd
TCP sending rate equation
(cwnd / RTT)
cwnd is ______
dynamic
TCP slow start
when connection begins, increase rate exponentially until first loss event
TCP slow start: double cwnd every ____
RTT
TCP slow start: done by incrementing ______ for every ACK received
cwnd
TCP Slow start summary
initial rate is slow but ramps up exponentially fast
loss is indicated by
timeout
cwnd is set to
1 MSS
loss indicated by _ duplicate ACKs
3
TCP ______ always sets cwnd to 1
tahoe
when should the exponential increase switch to linear?
when cwnd gets to 1/2 of its value before timeout.
cwnd
congestion window
TCP fairness
if K TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K