3: Transport Layer Flashcards

1
Q

What is the transport layer?

A

The layer in the layered model responsible for providing an abstraction over end-end communications between applications running on different hosts.

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

What are logical communications?

A

Communications abstracted over between two hosts that are not physically connected that can be carried out as if they were physically connected.

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

What are message segments?

A

The discrete units that messages are split into before they are passed to the network layer, which provides logical communication between hosts (but not applications on hosts - that is the job of the transport layer).

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

What is the difference between the network and transport layers?

A

The network layer provides logical communication between hosts, whereas the transport layer provides logical communication between applications on hosts.

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

What is the differnece between TCP and UDP?

A

TCP provides reliable transport, flow control, and congestion control, and is connection-oriented. UDP does not provide any of these features. Neither provides security, timing, or a guarantee of a minimum throughput.

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

What is multiplexing?

A

Methods of splitting analogue or digital signals into distinguishable channels that allow for multiple signals to be sent as one over a single shared physical medium.

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

What is demultiplexing?

A

When you reverse multiplexing: splitting a single signal combining multiple other signals into the multiple original signals that combined to form it.

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

What are IP datagrams?

A

Individual data units sent as part of the IP protocol, that are of a set format of header and payload.

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

How are message segments directed in TCP?

A

With IP addresses and port numbers.

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

What is connectionless demultiplexing?

A

With UDP, no connection in sockets so you may have multiple sockets at the same IP and port number when you demultiplex an Internet signal at a host.

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

What is connection-oriented demultiplexing?

A

With TCP, there are connections in sockets so you have a dedicated pipe between two IP addresses and port numbers. You therefore only get datagrams from one other socket to a socket on a host when demultiplexing TCP signals.

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

How are TCP sockets uniquely identified?

A

IP address and port.

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

What does it mean for UDP to be connectionless?

A

There is no handshake between the sender and receiver nodes in UDP, and no guarantee of data delivery. The absence of a guaranteed connection means each UDP segment or datagram is handled by itself, independently of all the others.

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

Why is UDP used?

A

It removes the overhead from TCP that provides reliability so can be faster for some uses.

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

What are UDP checksums used for?

A

To detect errors in transmitted data to ensure its integrity.

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

What is reliable data transfer?

A

The concept of providing integrity and certain delivery to data transmission.

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

How can you implement reliable data transfer over an unreliable channel?

A

Using handshakes, acknowledgements, sequence numbers, handshakes and ECCs.

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

How can you recover from channels with bit errors?

A

Use ECCs to correct them or detect with parity bets and checksums, and request retransmissions with negative acknowledgements.

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

What are acknowledgements?

A

Specialised messages specifying that certain other messages and packets were received successfully.

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

What are negative acknowledgements?

A

Specialised messages specifying that certain other messages and packets were received unsuccessfully, with errors.

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

How is reliable data transfer specified with FSMs?

A

One state waits for a call from elsewhere for data transfer; in the receiver, then just wait for data, then verify with a checksum and send ack/negative ack accordingly. The sender will send the next sequence after the last it gets a positive acknowledgement for, or else backtrack if a negative acknowledgement exists, resending the packet that wasn’t correctly received.

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

What is rdt?

A

A specification of how communications protocols can facilitate reliable data control over unreliable links and channels.

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

What is the flaw of rdt2.0?

A

It can’t handle corrupted acknowledgements (positive or negative), so sender discards since can’t assume negative: may cause duplicate transmissions. So synchronisation may be lost.

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

What is the concept of stop and wait?

A

Sender sending one packet at a time to the receiver, only sending the next one once the receiver responds with an acknowledgement.

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

How can you handle duplicate transmissions?

A

Use sequence numbers to ensure you don’t mistakenly process/use the same data twice.

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

What are sequence numbers?

A

Unique identifiers added to packets being sent which allow them to be distinguished, facilitating order preservation.

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

What are the differences between rdt versions 1.0, 2.0, 2.1, 2.2, and 3.0?

A

rdt1.0 is the most simple, just sending and receiving packets. rdt2.0 adds ACKS to handle bit errors. rdt2.1 handles the possibility of corrupted ACKs with sequence numbers to maintain synchronisation. rdt2.2 removes negative ACKs, only using positive ones, but implements the same functionality as rdt2.1. rdt3.0 handles bit errors and packet loss by adding time limits to waiting to receive packets.

28
Q

How can you find the utilisation of a link using rdt3.0?

A

Sender utiliation = fraction of time sender is sending data = [L/R] / [RTT + (L/R)]

RTT = round trip time
L = packet size
R = maximum capacity

L / R = Dtrans = transmission delay

29
Q

What is pipelining?

A

When you send multiple packets between acknowledgements, rather than 1 at a time in stop-and-wait.

30
Q

What are the 2 main forms of pipelining?

A

Go-Back-N and selective repeat

31
Q

What is Go-back-N pipelining?

A

N packets can be in a pipe at once: N more between each acknowledgement, and the receiver sends cumulative acks. The sender has a timer to resend all unacked packets (up to N more) if no ack received.

32
Q

What is Selective Repeat pipelining?

A

Limited number of packets in a pipe at once, with receiver sending individual acks for each received packet. The sender has time to retransmit each unacked packet.

33
Q

What is a cumulative acknowledgement?

A

When you ack all packets up to and including a certain sequence number rather than all individually, reducing the number of acks needing to be sent

34
Q

How does Go-back-N pipelining work?

A

Sequence nos in packets, receiver sends cumulative acks for all packets successfully received up to and including a certain sequence no, sender retransmits a sequence after a certain timeout without an ack received.

35
Q

How does Selective Repeat pipelining work?

A

Sequence numbers in packets; receiver acknowledges all packets received successfully; resend any not received successfully.

36
Q

What is TCP?

A

Transmission Control Protocol is a transport-layer protocol facilitating the reliable transmission of data between two endpoints on a computer network.

37
Q

What are the key features of TCP?

A

TCP is point-to-point, pipelined, reliable, in order, full duplex, connection-oriented, and has flow control.

38
Q

What is the structure of a TCP segment?

A

Header of source and dest port and IP address, seq no, checksum, etc. Then payload.

39
Q

How do you set the timeout value for a TCP segment?

A

Timeout interval = EstimatedRTT + 4*DevRTT

DevRTT is the safety margin

DevRTT = (1-β)*DevRTT + β*|SampleRTT-EstimatedRTT|
β = weight of new sampled RTT over past safety margin
EstimatedRTT = (1- α)*EstimatedRTT + α*SampleRTT
α = weight of sample RTT vs past ones ~ 0.125
40
Q

How do you find the estimated RTT of a TCP segment?

A

EstimatedRTT = (1- α)EstimatedRTT + αSampleRTT

α = weight of sample RTT vs past ones ~ 0.125

41
Q

What is a timeout interval?

A

The amount of time a packet can be travelling for until it is dropped and transmission ceases.

42
Q

What are sender events?

A

A point in the control flow of a networking app in a sender which necessitates action being taken; they include receiving data from a network app to send, timeouts for acks, and receiving acks.

43
Q

When does TCP retransmit packets?

A

If either the packets aren’t received successfully by the receiver, or if they are but the acknowledgement of such from the receiver back to the sender isn’t received successfully, due to either data loss/corruption a premature timeout waiting for an ack in the sender.

44
Q

How does TCP acknowledgement generation vary depending upon different events at the receiever?

A

If data as normal wait for next packet, if none then ack highest currently received seq no. Receiving as normal with another ack pending, then send cumulative ack for both. If seq no received higher than expected, so out of order, send duplicate ack to ask for specific next packet. If a gap filled by a packet, send an ack that covers segment to resync, as long as packet means now all seq nos up to and including it have been received successfully.

45
Q

What is fast retransmission in TCP?

A

If receiver sends 3 duplicate acks requesting the same data then immediately resend all the unacked segments, starting from the smallest sequence number.

46
Q

What is flow control?

A

Methods for a receiver to manage the rate of data transmission from a sender to prevent a fast-sending sender overwhelming a slow-processing receiver’s buffer.

47
Q

How is flow control implemented in TCP?

A

rwnd value in header in packets from receiver define space remaining in buffer; packets are sent such that their data don’t overflow this limit, so buffer in receiver guaranteed to not overflow.

48
Q

What is connection management?

A

The methods by which network connections are opened and maintained in such a manner to ensure they are suitable for data transmission.

49
Q

What is a handshake?

A

An agreement between hosts to establish a connection that seeks to ensure both are aware it is established.

50
Q

When may a 2-way handshake fail?

A

If client times out and retransmits but the server didn’t timeout and the connection is established, then the retransmitted connection reaches the server after the true connection closes, and there could also be data lagging as well that could interfere with state too.

51
Q

How are TCP connections closed?

A

Both sides must say they are finished sending data and then receive an acknowledgement of this from the other client.

52
Q

What is congestion?

A

The reduced performance of network infrastructure when they attempt to handle more data than they can.

53
Q

What are some causes of congestion?

A

Many users using high-bandwidth services on a network. Sending when buffers nearly full at bottleneck routers. Some loss leading to retransmissions in a vicious circle, and similarly duplicates due to timeouts.

54
Q

What is congestion control?

A

Methods seeking to mitigate congestion on computer networks.

55
Q

What are some costs of congestion?

A

Unnecessary retransmissions, increased latency, increased network strain, more work for given goodput. Waste of capacity on retransmissions.

56
Q

How does TCP implement congestion control?

A

Increase tansmisson rate (window size) additevly (1 MSS) until loss occurs, then deceaseing it multiplicatevely: halving.

57
Q

How does TCP detect and react to loss?

A

Ack isn’t received for packet sent (timeout) or 3x duplicate acks

58
Q

What is the idea of slow start in TCP?

A

Initially set window to 1 MSS then double it every RTT until loss: exponential increase from initial slow rate on start.

59
Q

How can you find the throughput of a TCP connection?

A

TCP throughput = [1.22 . MSS] / [RTT . √L]

MSS = maximum segment size
RTT = round trip time
L = oribability a packet will be lost
60
Q

What is the concept of fairness?

A

Every TCP connection going through a bottleneck link should have equal shares of its rate.

61
Q

Why is TCP fair?

A

All connections will use additive-multiplicative adjustments to tend towards balanced and stable shares of the total rate.

62
Q

What is Explicit Congestion Notification?

A

Overt measures in Internet Protocol that are taken specifically to detect, indicate, and deal with network congestion when it occurs.

63
Q

What is network-assisted congestion control?

A

A part of Explicit Congestion Notification, in which a specialised header flag indicates if a network is congested to trigger mitigating action.

64
Q

How does fairness apply to UDP and multimedia streaming?

A

Often not - they will seek as much throughput as possible even if this means degrading performance for other hosts and even other applications on the same host.

65
Q

What is MSS?

A

The maximum segment size (MSS) is a parameter of the options field of the TCP header that specifies the largest amount of data, specified in bytes, that a computer or communications device can receive in a single TCP segment.