Transport Layer Flashcards

1
Q

What is the relation between Transport Layer and Application Layer

A

Transport Layer provides services to the application layer

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

What is the relation between Transport Layer and Network Layer?

A

Transport Layer uses services to the Network Layer

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

What does transport layer do?

A

provide logical communication between app processes running on different hosts. Breaks app messages into segments

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

What is multiplexing?

A

handle data from multiple sockets, add transport header

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

What is demultiplexing?

A

use header info to deliver received segments to correct socket

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

Explain how demultiplexing works?

A

Host received IP datagrams, each datagram has destination and source IP address. Each segment has port. Use IP addresses and port to

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

Is the segment of UDP dependent on other segments?

A

No

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

Why one should use UDP?

A

Fast and simple

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

Explain actions of sender and receiver in rdt1.0

A

Wait for call from above and do the operations

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

What is the difference between rdt1.0 and rdt2.0?

A

RDT2.0 has checksum to check for errors, and acknowledgments to recover from errors

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

How one recovers from bit errors?

A

Acknowledgments

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

What are the actions of sender and receiver in rdt2.0

A

Sender: Send, do the operations and wait for the acknowledgments. If NAK, resend

Receiver: if received packet is corrupt, send NAK

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

What is wrong with NAK?

A

Could be lost and the system could never knew if the packet was lost or delayed

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

Why was sequence number added?

A

Possible way to solve problem of corrupted ACK/NAK

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

What is the difference between rdt2.0 and rdt2.1

A

Sequence number is added

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

What is the difference between rdt2.1 and rdt2.2

A

2.2 is NAK-free

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

What is the difference between rdt2.2 and rdt3.0

A

3.0 has countdown timer

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

Calculate utilization_sender of rdt3.0. 1 Gbps link, 10 ms prop. delay, 8000 bit packet. 3000km distance

A

0.00039

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

How does pipelining improve? If 3 bits were sent from sender? Give examples of existing pipelining protocols?

A

Improves the utilization almost three times. Go-back-N and selective repeat

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

Understand Go-back-N

A

?done?

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

Understand Selective Repeat

A

?done?

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

In Go-Back-N, the receiver only sends ___

ack

A

Cumulative

23
Q

In Selective, the receiver only sends ___

ack

A

Individual

24
Q

In Go-Back-N, sender has timer for ___ unacked packet

25
Sender maintains timer for ___ unacked packet. What happens when timer expires?
each. when timer expires, retransmit only that unacked packet
26
What is the disadvantage of Selective Repeat?
Duplicate data possible
27
Suppose host A sends to host B, data with Seq = 42, ACK = 79, data = 'C'. What are the further actions?
B sends Seq = 79, ACK = 43, Data = 'C' to B | A sends Seq = 43, ACK = 80 to B
28
What is SampleRTT? What is DevRTT? What value of timeout should a system pick?
SampleRTT: measured time from segment transmission until ACK receipt. DevRTT: SampleRTT deviation ``` EstimatedRTT = (1- a)*EstimatedRTT + a*SampleRTT, usual value of A = 1/8 DevRTT = (1-b)*DevRTT + b * |SampleRTT - EstimatedRTT| ``` TimeoutInterval = EstimatedRTT + 4*DevRTT
29
What is the flow control in TCP?
receiver controls sender, so sender won’t overflow receiver’s buffer by transmitting too much, too fast
30
What do the values rwnd and rcvBuffer mean?
rwnd - free buffer space | rcvBuffer - buffered data
31
TCP Flow Control guarantees receive buffer
will not overflow
32
Tell the mathematical part of Flow Control? Describe it mathematically
Receiver computes rwnd = RcvBuffer-[LastByteRcvd - LastByteRead Sender computes x = LastByteSent - LastByteAcked If x<= rwnd then sender can send
33
How is the problem of when rwnd = 0 and receiver has no data to send to sender solved?
To solve this problem, sender sends one data byte when rwnd = 0, if the sender receives corresponding ACK => rwnd != 0
34
Tell the step by step process of the handshake? What is handshake in TCP?
Handshake is the process of establishing the connection Sender sends SynBit = 1, Seq = x, where x is the sequence number Receiver sends the acknowledgment: SynBit = 1, Seq = y, ACKBit = 1, ACKNum = x + 1 Sender sends to receiver back: ACKBIT = 1, ACKNum = y + 1
35
How is the connection closed in TCP?
Sender sends FINBit = 1, seq = x to receiver Receiver sends ACKBit = 1, ACKNum = x + 1 After finishing sending the data, receiver sends FINbit=1, seq=y. After that sender sends ACKbit=1; ACKnum=y+1
36
Do packet retransmission solves the packet loss? Do they solve the cause of packet loss?
Yes. No
37
What is the cause of congestion?
Routers can drop the packet, due to the buffer being overflowed.
38
Why the solution of tracking the packet status does not work?
Duplicates
39
How does the congestion control work in TCP?
Controls the sender rate based on the congestion level in the network No congestion -> increase rate Congestion -> decrease rate
40
What is the formula for the rate?
Roughly: rate = cwnd / RTT bytes/sec
41
How does the sender limit the transmission?
LastByteSent- LastByteAcked <= min{cwnd, rwnd}
42
What is cwnd?
congestion window. dynamic, function of perceived network congestion.
43
Describe the approach used for TCP Congestion Control?
sender increases transmission rate (cwnd = window size), probing for usable bandwidth, until loss occurs
44
What is the additive increase?
increase cwnd by 1 MSS every RTT until loss detected
45
What is the multiplicative decrease?
cut cwnd in half after loss
46
What are the three components of TCP congestion control algorithm?
Slow Start, Congestion Avoidance, Fast Recovery
47
How does the slow start work?
when connection begins, increase rate exponentially until first loss event: • initially cwnd = 1 MSS • double cwnd every RTT • done by incrementing cwnd for every ACK received initial rate is slow but ramps up exponentially fast
48
How does TCP Congestion Avoidance work?
the congestion avoidance algorithm – increment cwnd by 1 MSS
49
How does TCP select whether it should use Slow Start or Congestion Avoidance?
The slow start algorithm is used when cwnd < ssthresh, otherwise, the congestion avoidance algorithm
50
How does TCP react to the loss?
loss by timeout: cwnd set to 1MSS loss by 3 duplicates: 1. TCP Reno - cwnd is cut in half window and adds 3 MSS 2. TCP Tahoe - set to 1
51
When should the exponential increase switch to linear? | How is that implemented?
When cwnd gets to 1/2 of its value before timeout. Implementation: 1. variable ssthresh 2. on loss event, ssthresh is set to 1/2 of cwnd just before loss event
52
What is the average window size and the throughput?
• avg. window size (# in-flight bytes) is ¾ W | avg. thruput is 3/4W per RTT
53
Describe the fairness of TCP? Is it fair? Why?
if K TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K. Yes. Because two competing sessions: 1. additive increase gives slope of 1, as throughout increases 2. multiplicative decrease decreases throughput proportionally
54
Solve Sain's problem he posted on Piazza
ok