Lecture 0: 17th September 2019 Flashcards

TCP Performance

1
Q

What is TCP?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is TCP used for?

A

websites (HTTP), email, video streaming; still most widely used transport protocol on the Internet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why has the design of TCP needed to change over time?

A

designed to exchange text on a low-speed network in 1988. v different to internet uses today

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the key features of TCP?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do sequence numbers work in TCP?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the PAWS RFC?

A

PAWS = Protection Against Wrapped Sequence Numbers = a RFC that uses sequence numbers and timestamps to identify packets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is the PAWS RFC needed?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is the number of the first sequence number in TCP generated? Why is this method used?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is idle-RQ? What is its disadvantage?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is continuous-RQ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is pipelining?

A

When you keep sending packets even though haven’t got an ack for the first one (strictly, first ack itself).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the bandwidth delay product of a channel? How do you calculate it?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the main feedback loop in TCP?

A

Transmitting then waiting for a response (in acks)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does continuous-RQ require that idle-RQ does not?

A

Sequence numbers, RTT, and channel capacity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What’s the difference between congestion control and flow control?

A

Congestion control is controlling the rate of transmissions due to network strain whereas flow control controls it due to receiver strain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is end-to-end flow control?

A

When the receiver signals the sender to control the window size. End-to-end: within the connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the difference between per-flow and per receiver flow control? Which does TCP use?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the TCP receiver window?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How does the receiver window size constrain sending rate?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is an extension header?

A

A header added to those found in the original version of protocols containing supplementary information to solve unforseen problems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the Window Scale Option RFC?

A

The way by which an extension header is used to increase the size of the receiver window by a scale (multiplication) factor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Why is the Window Scale Option RFC needed?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is delay-toggled networking?

A

Network protocols in which changes in delay alter the state and actions of the protocol (?)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is inter-planetary networking?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

How does an increase in load affect throughput in normal network operation?

A

throughput increases linearly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

How does an increase in load affect throughput when a network is congested?

A

smaller further increases than those seen in operation on an uncongested network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is congestion collapse?

A

when the load on a network causes a level of congestion that prevents or severely limits useful communication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

How does an increase in load affect throughput during congestion collapse?

A

any further increase leads to a very rapid decrease of throughput, to ~ 0. This very rapid increase is congestion collapse.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

How does congestion control work in TCP (in words)?

A

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.

30
Q

What is the algorithm for congestion control in TCP?

A

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

31
Q

What is cwnd?

A

congestion window = sender window

32
Q

What is rwnd?

A

receiver window

33
Q

What is wnd?

A

effective window, equal to the minimum of cwnd and rwnd

34
Q

How are wnd, cwnd, and rwnd related?

A

wnd = min(cwnd, rwnd)

35
Q

What is ssthresh?

A

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.

36
Q

What does TCP do after a problem during its linear increase phase?

A

Halve the window size - same as in slow start as well

37
Q

What is data rate?

A

The amount of data sent over a flow per unit time.

38
Q

How are data rate, the number of segments, segment size, and RTT related?

A

data rate, r = data sent / time = window size / RTT = (mean segment size * num segments per window) / RTT

39
Q

How are data rate and RTT related? What are the consequences of this relationship?

A

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.

40
Q

What is the slow start phase of TCP congestion control? Why is it a bad name?

A

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.

41
Q

Why is it recommended that the Window Scale Option RFC is only used in conjunction with PAWS?

A

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.

42
Q

What are the effects of network congestion?

A

Higher end-to-end delay, lost packets, network instability, loss of service

43
Q

What are the causes of network congestion?

A

buffer overflow in routers, unpredictable traffic patterns, route changes, time-of-day traffic, big real world events (SuperBowl), etc

44
Q

How are the number of RTTs in the slow start phase of TCP congestion control, the data rate, segment size, and RTT related?

A

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

45
Q

How are the number of segments and number of RTTs needed to get to them related? How is the relationship derived?

A

There are 2 ^ (num of RTTs) segments in a window during the slow start phase because the number doubles at each step

46
Q

How can you find the number of segments during the TCP slow start phase?

A

w = 2 ^ n on nth RTT since in this phase it doubles each time.

47
Q

What is congestion avoidance?

A

Measures taken to prevent and mitigate network congestion by controlling the bandwidth of a flow

48
Q

How is congestion avoidance implemented in TCP?

A

the congestion control algorithm of a slow start and subsequent linear increases above the threshold from the slow start

49
Q

How can you find the time to recover a data rate that halved after a dropped packet in TCP?

A

Total recovery time for data rate, TR = [2 ^ (N-1)] * TRTT

50
Q

How are throughput and the probability of a packet loss related in TCP? What does this relationship imply?

A

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.

51
Q

What is selective acknowledgement?

A

An RFC in which TCP acknowledgments are made selectively rather than cumulatively to identify and fix “holes” - dropped packets

52
Q

What is fairness on a network?

A

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.

53
Q

Why do the multiple flavours of TCP cause issues with fairness?

A

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.

54
Q

What is Jain’s Fairness Index?

A

A metric used to measure the degree of fairness in a computer network.

55
Q

How do you calculate Jain’s Fairness Index?

A

JFI = [sum of each throughputs] ^ 2 / N * [sum of: (each throughput ^ 2)]

56
Q

What are the issues with Jain’s Fairness Index?

A

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

57
Q

When are TCP segments fragmented?

A

When their payloads are > the maximum transmission size

58
Q

Why should we avoid TCP segment fragmentation?

A

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

59
Q

How does TCP avoid segment fragmentation?

A

use path MTU discovery (PMTUD) to find the MTU on the network to avoid needing to use IP fragmentation

60
Q

Compare TCP and IP based fragmentation of a TCP packet.

A

IP fills each packet to full and then the remainder in last one => max size packets and also more in number => congestion

61
Q

Why is plain TCP insufficient for media streaming?

A

Need a description of the media. Need an adaption mechanism to cope with different client/terminal devices and network capability.

62
Q

What are the 4 main types of video streaming and the differences between them? Use examples.

A

interactive, real-time: skype call
interactive, non-real-time: bandersnatch
non-interactive, real-time: news broadcast
non-interactive, non-real-time: youtube video

63
Q

What is quality of service?

A

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.

64
Q

What is quality of experience?

A

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.

65
Q

What is QUIC?

A

Quick UDP Internet Connections = a general-purpose transport layer network protocol intended to replace TCP. It encapsulates connections between hosts in UDP.

66
Q

What happens to different connections on a network over time?

A

Data rates normalise and balance to become fair (?)

67
Q

What is a flow on a network?

A

A unidirectional sequence of packets from a source computer to a destination, which may be another host, a multicast group, or a broadcast domain.

68
Q

What is the capacity of a channel?

A

The tight upper bound on the rate at which information can be reliably transmitted over a communication channel.

69
Q

What is the throughput of a channel?

A

The rate of successful message delivery over a communication channel.

70
Q

What is the bandwidth of a channel?

A

The maximum rate of data transmission across a channel.

71
Q

What is the difference between data rate, capacity, BDP, throughput, and bandwidth?

A

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