Pipelining, Flow Control and TCP Flashcards

1
Q

What are ACKs?

A

Acknowledgements. This tells the sender that the received packet is okay

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

What are NAKs?

A

Negative acknowledgments. This tells the sender that the packet had errors

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

What happens if the sender recieves a NAK?

A

The sender retransmits the packet that had the error.

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

What is ARQ?

A

Automatic repeat reQuest protocol. Used to resent packets that had errors in them.

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

What are the issues with acknowledgements?

A

> What is the ACK/NAK messages are corrupted?

> What if a packet is lost?

> Chance of duplication and out of order delivery.

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

What is the protocol used during reliable data transfer protocol?

A

Sender: Sends packet

Receiver: Sends ACK

Sender: Waits ‘reasonable’ amount of time to get ACK. When ACK received it sends the next packet. [IMAGE]

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

What is the protocol used during reliable data transfer protocol when a packet is lost?

A

Sender: Sends packet *Packet lost*

Receiver: Does NOT send ACK

Sender: Waits ‘reasonable’ amount of time to get ACK. When no ACK is received and the timer times out then it resents the packet. [IMAGE]

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

What is the protocol used during reliable data transfer protocol when an acknowledgment is lost?

A

Sender: Sends packet

Receiver: Send ACK *ACK Lost*

Sender: Waits ‘reasonable’ amount of time to get ACK. When no ACK is received and the timer times out then it resends the packet.

Receiver: Receives packet and detects duplicate packets. The detection would be because sequence numbers may be used. [IMAGE]

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

What happens when there is a premature timeout of the timer for the protocol used during reliable data transfer protocol because an ACK takes too long to arrive?

A

Sender: Sends packet

Receiver: Send ACK *ACK Takes a while*

Sender: Waits ‘reasonable’ amount of time to get ACK. When no ACK is received and the timer times out then it resends the packet.

Sender: Recieves ACK The timings get messed up: [IMAGE 1]

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

What is the equation to calculate the utilization of a link from a single sender sending a single packet and receiving ACK? How can this be turned into a percentage? [IMAGE]

A

U[sender] = (L/R) / ( RTT + (L/R) )

% = 100 × (L/R) / ( RTT + (L/R) )

U[sender] = Usage

L = Packet size

R = Rate of transmission

RTT = 2×Propagation delay

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

For a large file transfer how can the implementation of ACK be improved for better link utilisation and for faster file transfer speeds?

A

Pipelining is used. Without it, waiting the acknowledgments of a single packet before sending the next takes too long.

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

What is pipelining?

A

This is where you send multiple packets in a row and then wait for multiple ACKs.

This increases the amount of utilisation of the link.

Once each packet is released them an individual ACK is sent for each packet. When the sender receives an ACK it can send another packet. [IMAGE 2]

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

What is the equation to calculate utilisation when pipelining is used?

A

U[sender] = N × (L/R) / ( RTT + (L/R) )

% = 100 × N × (L/R) / ( RTT + (L/R) )

U[sender] = Usage

N = Number of packets

L = Packet size

R = Rate of transmission

RTT = 2×Propagation delay

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

What is the rule for utilisation with multiple packets?

A

N packet pipelining multiplies the usage by N when compared to single packet pipelining.

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

What is a window?

A

This is the number of packets that are not ACKed at any given time and are being moved between sender and receiver. [IMAGE 3]

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

How does the timing work for pipelining?

A

A timer is set for each packet sent and if an ACK is not received when the timer expires then that specific packet is sent next

17
Q

What happens when a packet is lost during pipelining?

A

> No new packet is sent until the timer for that packet has expired and we know for certain that it has been lost.

> Then just that packet (that was lost) is sent and the ACK is waited upon before the whole process can continue [IMAGE 4]

18
Q

What is TCP?

What does it stand for?

A

Transmission control protocol

It is a point-to-point transmission standard (one sender, one receiver).

Uses a reliable, in-order byte stream Uses pipelining

19
Q

What is the format of a TCP packet?

A

16-bit Source port

16-bit Destination port

32-bit Sequence number

32-bit acknowledgment number

Flags including:

URG = Urgent data

ACK = ACK number valid

RST,SYN,FIN = connection estabilshment

16-bit = Receiver window (number of bytes the receiver will accept)

16-bit Checksum

Urg data pointer

Variable length Options

Variable length application data

20
Q

How is the time out interval calculated for TCP pipelining?

A

Time out interval = EstimatedRTT + ‘Safety Margin’

21
Q

How can the safety margin be calculated?

A

Safety margin = 4 × DevRTT

22
Q

What is DevRTT?

A

This is the deviation of the RTT

23
Q

What is MSS? How are segments labeled so they are kept in order?

A

This is the maximum segment size. e.g. for 500kb of data with an MSS of 2kb, you will need 250 segments They are not numbered in number order of the segments, they are numbered based off the byte number at the start of the segment. so for the example above: 0000,2000,4000,6000 etc

24
Q

How can the EstimatedRTT be calculated?

A

CurrentEstimatedRTT = ( 1 - α )PreviouseEstimatedRTT + α×SampleRTT Current = (1-α)Past + αCurrentSample

25
Q

How does TCP decide the window size for pipelining? What is this called?

A

This is flow control The receiver sends the amount of free buffer space to the sender and so the sender will limit the amount of unACKed data that is ‘in-flight’ accordingly so the buffer does not overflow

26
Q

What happens to the throughput of the link as you increase the load a link?

A

> It increases linearly until maximum throughput it reached.

> Then buffers will start to fill up and the throughput will be at max.

> Then the buffers will become so full that packets are dropped and the throughput collapses to zero because retransmissions for dropped packets etc. [IMAGE 5]

27
Q

How does TCP control congestion?

A

> TCP increases window size by increasing the number of MSS sent at any one time

> If a packet is lost for any reason, the window size is halved immediately This is called additive increase, multuplicatuve decrease