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

A

Oldest

25
Q

Sender maintains timer for ___ unacked packet. What happens when timer expires?

A

each. when timer expires, retransmit only that unacked packet

26
Q

What is the disadvantage of Selective Repeat?

A

Duplicate data possible

27
Q

Suppose host A sends to host B, data with Seq = 42, ACK = 79, data = ‘C’. What are the further actions?

A

B sends Seq = 79, ACK = 43, Data = ‘C’ to B

A sends Seq = 43, ACK = 80 to B

28
Q

What is SampleRTT? What is DevRTT? What value of timeout should a system pick?

A

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
Q

What is the flow control in TCP?

A

receiver controls sender, so sender won’t overflow receiver’s buffer by transmitting too much, too fast

30
Q

What do the values rwnd and rcvBuffer mean?

A

rwnd - free buffer space

rcvBuffer - buffered data

31
Q

TCP Flow Control guarantees receive buffer

A

will not overflow

32
Q

Tell the mathematical part of Flow Control? Describe it mathematically

A

Receiver computes rwnd = RcvBuffer-[LastByteRcvd - LastByteRead

Sender computes x = LastByteSent - LastByteAcked
If x<= rwnd then sender can send

33
Q

How is the problem of when rwnd = 0 and receiver has no data to send to sender solved?

A

To solve this problem, sender sends one data byte when rwnd = 0, if the sender receives corresponding ACK => rwnd != 0

34
Q

Tell the step by step process of the handshake? What is handshake in TCP?

A

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
Q

How is the connection closed in TCP?

A

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
Q

Do packet retransmission solves the packet loss? Do they solve the cause of packet loss?

A

Yes. No

37
Q

What is the cause of congestion?

A

Routers can drop the packet, due to the buffer being overflowed.

38
Q

Why the solution of tracking the packet status does not work?

A

Duplicates

39
Q

How does the congestion control work in TCP?

A

Controls the sender rate based on the congestion level in the network
No congestion -> increase rate
Congestion -> decrease rate

40
Q

What is the formula for the rate?

A

Roughly: rate = cwnd / RTT bytes/sec

41
Q

How does the sender limit the transmission?

A

LastByteSent- LastByteAcked <= min{cwnd, rwnd}

42
Q

What is cwnd?

A

congestion window. dynamic, function of perceived network congestion.

43
Q

Describe the approach used for TCP Congestion Control?

A

sender increases transmission rate (cwnd = window size), probing for usable bandwidth, until loss occurs

44
Q

What is the additive increase?

A

increase cwnd by 1 MSS every RTT until loss detected

45
Q

What is the multiplicative decrease?

A

cut cwnd in half after loss

46
Q

What are the three components of TCP congestion control algorithm?

A

Slow Start, Congestion Avoidance, Fast Recovery

47
Q

How does the slow start work?

A

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
Q

How does TCP Congestion Avoidance work?

A

the congestion avoidance algorithm – increment cwnd by 1 MSS

49
Q

How does TCP select whether it should use Slow Start or Congestion Avoidance?

A

The slow start algorithm is used when cwnd < ssthresh, otherwise, the congestion avoidance algorithm

50
Q

How does TCP react to the loss?

A

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
Q

When should the exponential increase switch to linear?

How is that implemented?

A

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
Q

What is the average window size and the throughput?

A

• avg. window size (# in-flight bytes) is ¾ W

avg. thruput is 3/4W per RTT

53
Q

Describe the fairness of TCP? Is it fair? Why?

A

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
Q

Solve Sain’s problem he posted on Piazza

A

ok