1/107
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
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
Transport services and protocols provides what
logical communication between app processes running on different hosts
transport protocols run in ___ systems
end
send side:
breaks app messages into segments, passes to network layer
rcv side:
reassembles segments into messages, passes to app layer
network layer
logical communication between hosts
transport
logical communication between processes
transport layer relies on and enhances what?
network layer services
UDP only provides ____ to ____ delivery
process to process
TCP has more services, such as:
flow control, seq #, acks, timers and congestion control
extending host-to-host delivery and process-to-process deliver is called transport layer _______ and _______
multiplexing, demultiplexing
multiplexing at sender
handle data from multiple sockets, add transport header (later used for demultiplexing)
demultiplexing at receiver
use header info to deliver received segments to correct socket
Demultiplexing Step 1:
host receives IP datagrams with source and destination IP address
Demultiplexing Step 2:
each datagram carries one transport-layer segment
Demultiplexing Step 3:
each segment has source, destination port number
Demultiplexing step 4:
host uses IP addresses & port numbers to direct segment to appropriate socket
TCP socket identified by 4-tuple:
Source IP address, source port number, destination IP address, destination port number
demux
receiver uses all four values to direct segment to appropriate socket
server host may support _______ TCP sockets
multiple
web servers have different ________ for each connecting client
sockets
non-persistent HTTP will have _____ _____ for each request
different socket
UDP stands for
User Datagram Protocol
UDP is a ____ _______ service
best effort
UDP segments may be
lost, delivered out of order
Connectionless UDP
no handshaking between UDP sender, receiver
USP uses
streaming multimedia, DNS, SNMP
reliable transfer over UDP:
add reliability at application layer
UDP Segment header
source port #, destination port #, length & checksum. all 16-bit and create a 32 bit header
UDP checksum goal
detect “errors” (e.g., flipped bits) in transmitted segment
UDP Checksum sender step 1:
treat segment contents, including header fields, as sequence of 16-bit integers
UDP checksum sender step 2
checksum: addition (one’s complement sum) of segment contents
UDP Checksum sender step 3:
sender puts checksum value into UDP checksum field
UDP Checksum receiver step 1:
compute checksum of received segment
UDP checksum receiver step 2:
check if computed checksum equals checksum field value
delivering the data in a transport-layer segment to the correct socket is called
demultiplexing