Transport Layer Flashcards

1
Q

What are the four primary functions of the Transport Layer

A

Addressing and Packetisation
Connection(less) Service
Reliable Data Transfer
Flow and Congestion Control

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

Does the Transport Layer work with IP addresses or URLs? How do sender processes address other processes? What does the Transport Layer do in terms of packetisation?

A

IP addresses

Through their socket addresses

Multiplexing and Demultiplexing

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

What do socket addresses include?

A

The IP address and port numbers

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

What is transport layer multiplexing?

A

The receiving of data from sender processes AND
their encapsulation into transport layer segments by adding transport layer headers to them
AND
the passing of these segments to the network layer

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

What is transport layer demultiplexing?

A

The segments are passed back from the network layer to the transport layer
AND
data is extracted fromt hese
AND directed to their respective destination process

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

What values can a port number take? What is ICANN? Which port numbers are reserved from applications such as FTP, HTTP, SMTP?

A

Any value between 0 and 65535

The authority that reserves oprt numbers to various applications

0-1023

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

Can multiple processes listen on the same port number?

A

Yes, as, for example, a web server can run multiple processes listening on port number 80, and when a segment with destination port number 80 arrives to this server, the extracted data is sent to one of these web server processes.

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

Can there be multiple network sockets per process?

A

Yes, there can, each with a unique identifier

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

Can a destination process receive packets from multiple source hosts on a single socket?

A

Yes, this is possible with UDP, but not with TCP.

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

What does the transport layer depend on for process-to-process data delivery?

A

The host-to-host delivery service of the network layer, which in turn depends on the node-to-node data delivery service of the data link layer

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

What is the primary function of the “Connection(less) Service” of the Transport Layer?

What two mechanisms does it have in place for this?

What do connection services involve that connectionless services do not?

What do connectionless services involve that connection services do not?

A

Ensuring that the packets arrive at the receiving process in the same order that they were sent

Buffering and Reordering

The establishing of private connections between nodes.

Sending of messages individually and in any order.

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

What is buffering?

A

The temporary storage of data packets by the Transport Layer to manage the flow and ensure efficient delivery

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

What is reordering?

A

The rearranging of data packets by the Transport Layer to correct sequence discrepancies and ensure proper delivery

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

What is another important property of connection-oriented services?

A

That they are stateful, i.e., remember details such as the order in which the packets are sent and the list of packets already received

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

What is an example of a connection-oriented transport layer protocol?

A

TCP

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

What is the Three Way Handshake? What its steps? How does a connection termination procedure differ?

A

A message exchange procedure used to establish a connection between processes

  1. Host A sends a connection request to Host B
  2. Host B sends an acknowledgement
  3. Host B sends a connection request to Host A
  4. Host A sends an acknowledgement

It is the same only that instead of connection requests, there are connection release requests.

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

What is an important property for connectionless services?

A

They are stateless

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

What is an example of a connectionless transport layer protocol?

A

UDP

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

What is UDP? What services does it provide?

A

A connectionless transport layer protocol

Only multiplexing and demultiplexing

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

What are some of its advantages?

A

Small header sizes due to simplicity, leading to very small communication overhead

No congestion control, meaning that UDP applications can utilise the full speed of the communication channel

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

What are UDP sockets identified by?

A

Pair of destination IP address and destination port number

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

What is a word?

A

a fixed-length sequence of bits, with the length chosen according to the unit of computation in a certain computer architecture

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

What is the UDP packet format?

A

Header, has 8 bytes of data, and is followed by the data

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

What four things does the Header contain, and how many bits do each of them have?

A

Source Port Number, Destination Port Number, Total Length, Checksum

16 bits each

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

What do the 16 bits of Total Length in the header show?

A

the length of the entire UDP datagram, including the header and data

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

What is the checksum used for? How is it computed? How can it be used to check whether a segment is corrupt?

A

A check of integrity, i.e., whether there are bit errors or not

The pseudo IP header, UDP header, and payload are considered as a sequence of 16-bit integers. These sequences of 16-bit integers are added together, and then the complement of the sum is taken. The resulting checksum value is placed in the checksum field of the UDP header.

Checksum value calculated by receiver and if it differs from the value in the UDP header, then the segment is condluded to be corrupt.

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

What is the Transmission Control Protocol (TCP)? What services does it provide? What services does it not provide?

A

A connection-oriented transport protocol

Multiplexing, Demultiplexing, Connection Setup, Connection Maintenance, Connection Termination, Reliable Data Transfer, Flow Control, Congestion Control

Timing, throughput or security guarantees

28
Q

What does a TCP socket define? What 4-tuple is a TCP socket identified by? What does this identification by 4 components allow?

A

A connection

The Source Port Number
The Destination Port Number
The Source IP Address
The Destination IP address

Connections from different users at the same port number

29
Q

What is the TCP packet format?

A

Source Port Address (16 bits)
Destination Port Address (16 bits)
Sequence Number (32 bits)
Acknowledgement Number (32 bits)
HLEN Bits (4 bits)
6 flags (6 bits)
Window Size (16 bits)
Checksum (16 bits)
Urgent Pointer (16 bits)
Options and Padding (as long as 10 words)

30
Q

What is the Sequence Number in the TCP packet format?

A

The index of the first bit of the segment within the whole byte stream

31
Q

What is the acknowledgement number in the TCP packet format?

A

The index of the next byte in the stream that is expected by the receiver (i.e., the next byte that it has not yet received)

32
Q

What does the HLEN field indicate?

A

Total length of TCP header in number of words

33
Q

What are the six flags?

A

If urgent pointer field is used
If acknowledgement field is used
If sender wants receiver to push already buffered data portion to the receiving process
For reset of TCP connection
1 for first packet of byte stream (new connection)
Used for terminating an active connection

34
Q

What is the window size field?

A

Indicates the number of bytes that the receiver is willing to receive under flow control

35
Q

What is the urgent pointer field? When is it used?

A

Denotes the boundary of urgent data within the TCP stream (bit from which data stops being urgent)

if URG flag is set

36
Q

What are the four function calls in Reliable Data Transfer (RDT)? Who can call these functions?

A

rdt_send() - called by the application layer to send data that needs to be delivered to the receiver’s application

udt_send() - called by the RDT protocol to send a packet across an unreliable channel

rdt_rcv() - called by receiver side of RDT protocol when a packet arrives from the sender

deliver_data() - called by the receiver side of the RDT protocol to deliver the received data to the upper layer

Both the sending and receiving sides

37
Q

What is rdt version 1 characterised by? Describe the steps in it:

A

An asusumption that the underlying channel is perfectly reliable and that the protocol thus does not need to do anything to achieve reliability

Call from above of rdt_send(data).

Consequently, packet = make_pkt(data) and udt_send(packet) are called, making packets from the data and sending them across the unreliable channel.

On the receiving side, when the packets arrive from the layer below, rdt_rcv(packet) is called, consequently extracting the data from the packet through extract(packet,data), and delivering the data to the above application layer through deliver_data(data)

38
Q

What does rdt version 2 assume? What does it make use of due to its assumption? What happens in case of no errors being detected? What happens if an error is detected?

A

That the underlying channel does not lose any packets, but that it may introduce bit errors.

Some error checking mechanism, such as checksum

An acknowledgement (ACK) packet is sent

A negative acknowledgement packet is sent (NAK)

39
Q

How do the steps of rdt version 2 differ from those of version 1?

A

When making the packets, a checksum calculation is included too.

Depending on whether the packets are corrupt, the receiving side send ACK or NAK packets.

If the sender side receives a NAK, they resend the packets.

If they receive an ACK, they do nothing.

40
Q

What could be an issue with the sending of ACK and NAK in version 2? What could be a solution? What is a downside of this solution?

A

The acknowledgement packets may also suffer from bit errors

Sending duplicates of acknowledgement packets just in case

Could confuse receiver since they wouldn’t know that the two are duplicates

41
Q

What is the new aspect brought by rdt version 2.1? What is the downside of this?

A

Sequence number in sender packets so that the receiver can distinguish a brand new packet with no errors from a duplicate.

Doubles the number of states both at sender and receiver, and processing in each state becomes more complex.

42
Q

What is the new aspect brought by version 2.2?

A

Receiver does not need to utilise both positive and negative acknowledgements.

Instead, receiver sends an ACK for last packet that was correctly received by including the sequence number of that packet in the ACK.

E.g., if the sender expects an ACK with sequence number 1 but receives an ACK with sequence number 0, it just retransmits the last sent packet, knowing that the receiver can deal with duplicates.

43
Q

What is the new aspect brought by rdt version 3? How does it deal with this aspect?

A

No longer assumes that the channel does not lose any packets

Uses a countdown timer to retransmit packets when there is a loss or when the ACK packet’s arrival at the sender takes too long

44
Q

What are some reasons for losing packets?

A

Router queues, Overflowing, and Packet Collisions

45
Q

In rdt version 3, what are the three posibilities when the timer runs out? What will happen in all three cases?

A

Packet may have been lost
Packet was received but the ACK is lost
Packet was received, ACK sent back, but this is taking too long

A retransmission will take place that is a duplicate, but the sequence numbers will allow the receiver to handle the duplicate appropriately

46
Q

What is the stop-and-wait operation used by RDT protocols? What is its downside? What

A

One packet is sent, an ACK message is awaited, and then the next packet is sent

Delay performance consequences, leading to very low utilisation of channel capacity

47
Q

How is the performance of rdt version 3 mathematically?

A

Sender takes L/R time to transmit L bits at R bps.

Time taken for trip of data to and back (for acknowledgement) takes RTT

Then, amount of time the sender is busy transmitting is (L/R / RTT).

In a mathematical example, this can be as low as 0.00027.

48
Q

What is an alternative to the stop-and-wait operation? What is the name of such protocols?

A

Allowing multiple not yet acknowledged packets to be in transit.

Pipelined reliable data transfer protocols

49
Q

What are the two primary Pipelined RDT protocols?

A

Go-Back-N
Selective Repeat

50
Q

What does the Go-Back-N protocol involve? What does acknowledging a packet mean about the ones before? What type of timer does the sender maintain? What happens when a timer runs out?

A

Involves the receiving side of the protocol sending cumulative acknowledgements

If the receiver acknowledges a packet, it acknowledges all packets that came before it

A timer for the oldest not-yet-acknowledged packet

All in-transit, not-yet-acknowledged packets are retransmitted

51
Q

What does the Selective Repeat Protocol involve? What type of timers does the sender use?

A

The receiving side buffering packets that are received out of order and sending individual acknowledgements for packets that are received

Individual timers for each in-transit packet

52
Q

What are the methods used by TCP for Reliable Data Transfer?

What do TCP receivers do with corrupted segments and duplicates?

How do receivers confirm the reception of bytes?

How do receivers deal with out-of-order segments?

What does the sender side rely on for making decisions to retransmit segments or not?

A

Source-to-destination retransmissions
Buffering
Sequence numbers
TCP checksum
Cumulative Acknowledgements

Detect and discard them

By sending cumulative acknowledgements

Through buffering and only delivering data to the destination process after filling in gaps to maintain order

Duplicate acknowledgements and TCP retransmission timer

53
Q

What are the four types of TCP timers?

A

Retransmission Timer - initiates retransmission of unacknowledged segments

Persistence Timer - controls the sending of window updates when the sender’s window is zero

Keepalive Timer - checks for activity on idle connections by periodically sending probes to ensure that the connection remains active

Time-Wait Timer - ensures reliable connection termination by keeping a connection in the TIME-WAIT state for a specified duration to handle delayed segments

54
Q

Besides when the timer runs out, when else does the TCP sender retransmit a packet?

A

When it receives 3 acknowledgements pointing to the first byte of the lost segment

55
Q

What is TCP flow control used for?

A

Used to ensure that the rate of data transmission from sender to receiver matches the receiver’s ability to process and receive data

56
Q

How does the receiver influence the data transmission rate in TCP?

A

The receiver sets the window size field in TCP segments, indicating to the sender how many bytes it can currently accept

57
Q

What happens if the receiver’s window size in TCP is set to zero?

A

Sender stops sending data and starts a persist timer

58
Q

What does the sender do when the persist timer expires in TCP?

A

Sender sends a small packet to probe the receiver’s window size

59
Q

What is congestion? What does it lead to?

A

A result of increasing network traffic, where the number of packets pumped into the network is getting close to the overall network capacity, or has even exceeded it

Packets experiencing delays or even having to be dropped

60
Q

What do TCPs assume is the case of a retransmission? What does it consequently do?

A

Congestion

Slows down its sending

61
Q

What is the Slow Start and Additive Increase Phase for TCP senders? When does this phase end? What follows this phase?

A

TCP senders start with a congestion window (cwnd) of 1 segment (of size Maximum Segment Size MMS).

For each acknowledgement received, it increases its congestion window size by 1 segment

When the cwnd reaches a threshold value

The Congestion Avoidance Phase

62
Q

What is the congestion avoidance phase?

A

cwnd is increased by 1/cwnd segments for each successful acknowledgements until cwnd is equal to the receiver window size

63
Q

What is the Multiplicative Decrease Phase, upon a retransmission timeout?

A

The cwnd size is reset to 1 segment and the threshold set to cwnd/2

64
Q

What happens in TCP Tahoe when three duplicate ACKs are received?

A

The sender does a fast retransmission and goes back into the slow start phase with threshold set to cwnd/2

65
Q

What happens in TCP Reno when three duplicate ACKs are received?

A

The sender does a fast retransmission and goes into the fast recovery phase with threshold set to cwnd/2.

This phase skips the slow start, and the cnwd is increased by 1/cwnd segments for each succesfully received acknowledgement until cwnd is equal to the receiver window size

66
Q

What is the name of this algorithm applied by the TCP congestion?

A

Additive Increase, Multiplicative Decrease (AIMD)