Lecture 0: 17th September 2019 Flashcards
TCP Performance
What is TCP?
TCP = Transmission Control Protocol = a protocol for data exchange in the transport layer which seeks to make data exchange reliable, in-order, and with integrity and seeks to control network congestion and flows (flow send rates). It is part of the Internet Protocol suite.
What is TCP used for?
websites (HTTP), email, video streaming; still most widely used transport protocol on the Internet
Why has the design of TCP needed to change over time?
designed to exchange text on a low-speed network in 1988. v different to internet uses today
What are the key features of TCP?
Flow control through windowing and sequence numbers. Guaranteed, in-order delivery with sequence numbers and acknowledgements. Congestion control with “slow start” and “linear increase” phases of throughput probing.
How do sequence numbers work in TCP?
Both hosts maintain a sequence and acknowledgment number. The seq no of one host = the ack no of the other host. Sequence and ack numbers refer to the number of bytes rather than packet number so if some of a packet is received then don’t have to resend the whole thing. The packet is sent with the last received ack number as its sequence number and ack number of the receiver will increase by how many bytes received successfully. The sequence number of the sender then increases to that ack number.
What is the PAWS RFC?
PAWS = Protection Against Wrapped Sequence Numbers = a RFC that uses sequence numbers and timestamps to identify packets.
Why is the PAWS RFC needed?
If a file is large enough then the number of bytes (sequence number) will be larger than the maximum sequence number, leading to an overflow. This is especially true as TCP sequence numbers begin at a random number rather than 0.
How is the number of the first sequence number in TCP generated? Why is this method used?
It’s randomly generated.
This minimises the predictability of connections: it makes it harder for attackers to know where 2 hosts are in a connection. This knowledge would make faking packets easier.
What is idle-RQ? What is its disadvantage?
It is when you send 1 packet at a time, waiting until you get 1 back (i.e. window size of 1 packet). It is simple and doesn’t require sequence numbers but doesn’t allow you to approach the channel’s capacity: it is often idle.
What is continuous-RQ?
When you have a window size > 1, i.e. send multiple packets at once (pipelining) continually for the RTT up to capacity. Sequence numbers and acks are needed, and you need to know the RTT and channel capacity.
What is pipelining?
When you keep sending packets even though haven’t got an ack for the first one (strictly, first ack itself).
What is the bandwidth delay product of a channel? How do you calculate it?
BDP is a measurement of how many bits can fill up a network link. It gives the maximum amount of data that can be transmitted by the sender at a given time before waiting for acknowledgment. Thus it is the maximum amount of unacknowledged data.
BDP = data rate x RTT
What is the main feedback loop in TCP?
Transmitting then waiting for a response (in acks)
What does continuous-RQ require that idle-RQ does not?
Sequence numbers, RTT, and channel capacity.
What’s the difference between congestion control and flow control?
Congestion control is controlling the rate of transmissions due to network strain whereas flow control controls it due to receiver strain.
What is end-to-end flow control?
When the receiver signals the sender to control the window size. End-to-end: within the connection.
What is the difference between per-flow and per receiver flow control? Which does TCP use?
Per-receiver as total window across multiple connections(?). Per-flow as the receiver window within a connection. TCP uses per-flow: the receiver window, rwnd.
What is the TCP receiver window?
Receiver window, rwnd, is how much data a receiver can receive at most before needing to send an acknowledgement. Its size will depend on how fast it can process data it receives.
How does the receiver window size constrain sending rate?
Since it is the most that can be received, sending any more - even with a larger capacity or sending window - means the extra will not be processed and essentially wasted.
What is an extension header?
A header added to those found in the original version of protocols containing supplementary information to solve unforseen problems.
What is the Window Scale Option RFC?
The way by which an extension header is used to increase the size of the receiver window by a scale (multiplication) factor.
Why is the Window Scale Option RFC needed?
The original maximum size of rwnd was ~0.07MB, which is insufficient for a lot of modern applications. It extends the maximum receiver window size to > 1GB.
What is delay-toggled networking?
Network protocols in which changes in delay alter the state and actions of the protocol (?)
What is inter-planetary networking?
Network protocols designed to facilitate interplanetary communications. This must accommodate a frequently partitioned wireless backbone fraught with error-prone links and delays ranging from tens of minutes to even hours, even when there is a connection. A store-and-forward mechanism should be used: wait until can get a hop closer to destination in a connection and then send it.
How does an increase in load affect throughput in normal network operation?
throughput increases linearly
How does an increase in load affect throughput when a network is congested?
smaller further increases than those seen in operation on an uncongested network
What is congestion collapse?
when the load on a network causes a level of congestion that prevents or severely limits useful communication
How does an increase in load affect throughput during congestion collapse?
any further increase leads to a very rapid decrease of throughput, to ~ 0. This very rapid increase is congestion collapse.
How does congestion control work in TCP (in words)?
Initially, start at a low bandwidth and increase it exponentially by doubling it until an acknowledgement is delayed or dropped. From that point, past the last successful bandwidth (slow start threshold), probe with linear bandwidth increase between the last received and dropped ack point to find the largest possible bandwidth. Probe up til then exponentially.
What is the algorithm for congestion control in TCP?
wnd = min(cwnd, rwnd)
On first congestion at end of exponential increase after slow start, ssthresh = wnd/2, cwnd = 1
Then for each further ack received from then on:
if cwnd <= ssthresh, cwnd = cwnd+1
else cwnd = cwnd + 1/cwnd
What is cwnd?
congestion window = sender window
What is rwnd?
receiver window
What is wnd?
effective window, equal to the minimum of cwnd and rwnd
How are wnd, cwnd, and rwnd related?
wnd = min(cwnd, rwnd)
What is ssthresh?
The last bandwidth value during the exponential increase in the slow start phase in which an acknowledgement was received. It will be the penultimate bandwidth value.
What does TCP do after a problem during its linear increase phase?
Halve the window size - same as in slow start as well
What is data rate?
The amount of data sent over a flow per unit time.
How are data rate, the number of segments, segment size, and RTT related?
data rate, r = data sent / time = window size / RTT = (mean segment size * num segments per window) / RTT
How are data rate and RTT related? What are the consequences of this relationship?
data rate, r = data sent / time = window size / RTT = mean segment size * num segments per window) / RTT
So data rate, r is inversely proportional to RTT. This means that over high-delay (geographically long) connections, the data rate will be limited even with a high bandwidth.
What is the slow start phase of TCP congestion control? Why is it a bad name?
When the bandwidth starts at a small bandwidth and increases exponentially, doubling each window, until an acknowledgement is dropped. It should be “low start” because the channel capacity starts at one but increases exponentially, doubling until a dropped or missed ack.
Why is it recommended that the Window Scale Option RFC is only used in conjunction with PAWS?
Even with an extended window from the Window Scale Option, with very large files, and considering an initial sequence number of > 0, sequence numbers could still wrap around otherwise.
What are the effects of network congestion?
Higher end-to-end delay, lost packets, network instability, loss of service
What are the causes of network congestion?
buffer overflow in routers, unpredictable traffic patterns, route changes, time-of-day traffic, big real world events (SuperBowl), etc
How are the number of RTTs in the slow start phase of TCP congestion control, the data rate, segment size, and RTT related?
Let the initial slow start take N RTTs
Before the back off, data rate, r = 2 ^ N * s / RTT since w = no segments per window = 2 ^ N
replace N with however many steps taken for each probing increase rather than just infal one
How are the number of segments and number of RTTs needed to get to them related? How is the relationship derived?
There are 2 ^ (num of RTTs) segments in a window during the slow start phase because the number doubles at each step
How can you find the number of segments during the TCP slow start phase?
w = 2 ^ n on nth RTT since in this phase it doubles each time.
What is congestion avoidance?
Measures taken to prevent and mitigate network congestion by controlling the bandwidth of a flow
How is congestion avoidance implemented in TCP?
the congestion control algorithm of a slow start and subsequent linear increases above the threshold from the slow start
How can you find the time to recover a data rate that halved after a dropped packet in TCP?
Total recovery time for data rate, TR = [2 ^ (N-1)] * TRTT
How are throughput and the probability of a packet loss related in TCP? What does this relationship imply?
throughput is inversely proportional to the cube of the probability of a packet loss, i.e. packet loss rate. This shows that packet loss has a huge impact on throughput in TCP.
What is selective acknowledgement?
An RFC in which TCP acknowledgments are made selectively rather than cumulatively to identify and fix “holes” - dropped packets
What is fairness on a network?
The degree to which the network resources available to different users is uniform and proportionate. The degree to which the actions of some users, which contribute to congestion more, impedes the service to others.
Why do the multiple flavours of TCP cause issues with fairness?
They use different congestion control algorithms and so will send at different data rates under the same conditions. This means that different TCP flavours on the same network will send at different rates, being unfair.
What is Jain’s Fairness Index?
A metric used to measure the degree of fairness in a computer network.
How do you calculate Jain’s Fairness Index?
JFI = [sum of each throughputs] ^ 2 / N * [sum of: (each throughput ^ 2)]
What are the issues with Jain’s Fairness Index?
JFI assumes that resources can be consumed equally by systems/flows being measured; strictly 0 to 1 but in practice, almost all values between 0.5 and 1 in a dropoff similar to a normal distribution curve; its values are hard to read and interpret
When are TCP segments fragmented?
When their payloads are > the maximum transmission size
Why should we avoid TCP segment fragmentation?
a loss of 1 IP packet means all effectively lost, so have to retransmit all; have to reorder packets on receipt; each IP packet subject to loss and misordering
How does TCP avoid segment fragmentation?
use path MTU discovery (PMTUD) to find the MTU on the network to avoid needing to use IP fragmentation
Compare TCP and IP based fragmentation of a TCP packet.
IP fills each packet to full and then the remainder in last one => max size packets and also more in number => congestion
Why is plain TCP insufficient for media streaming?
Need a description of the media. Need an adaption mechanism to cope with different client/terminal devices and network capability.
What are the 4 main types of video streaming and the differences between them? Use examples.
interactive, real-time: skype call
interactive, non-real-time: bandersnatch
non-interactive, real-time: news broadcast
non-interactive, non-real-time: youtube video
What is quality of service?
Quality of service (QoS) is the description or measurement of the overall performance of a service, such as a telephony or computer network or a cloud computing service, particularly the performance seen by the users of the network.
What is quality of experience?
Quality of Experience (QoE) is a measure of the overall level of customer satisfaction with a vendor owing to human-perceptible changes in the performance of the service. QoE is related to but differs from Quality of Service(QoS), which embodies the notion that hardware and software characteristics can be measured, improved and perhaps guaranteed.
What is QUIC?
Quick UDP Internet Connections = a general-purpose transport layer network protocol intended to replace TCP. It encapsulates connections between hosts in UDP.
What happens to different connections on a network over time?
Data rates normalise and balance to become fair (?)
What is a flow on a network?
A unidirectional sequence of packets from a source computer to a destination, which may be another host, a multicast group, or a broadcast domain.
What is the capacity of a channel?
The tight upper bound on the rate at which information can be reliably transmitted over a communication channel.
What is the throughput of a channel?
The rate of successful message delivery over a communication channel.
What is the bandwidth of a channel?
The maximum rate of data transmission across a channel.
What is the difference between data rate, capacity, BDP, throughput, and bandwidth?
Bandwidth = maximum rate of data transmission
Throughput = the current rate of successful data delivery
Capacity = upper bound of throughput
Data rate = the amount of data sent over a flow per unit time
BDP = a measurement of how many bits can fill up a network link. It gives the maximum amount of data that can be transmitted by the sender at a given time before waiting for an acknowledgment. Thus it is the maximum amount of unacknowledged data.
BDP = data rate x RTT