Chapter 3/Lecture 3 Transport Layer Flashcards

1
Q

What’s UDP?

A

Simple protocol for transport of datagrams. No connection establishment, flow control or other frills. Best effort service, as UDP segments may be lost or delivered out of order. Used for streaming of media, DNS and other. Reliability must be implemented in application layer.

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

Describe the UDP headers.

A

“source port #”(16) “destination port #”(16)
“length”(16) “checksum”(16)
payload

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

How is the checksum computed, and what are some alternatives?

A

Originally, it was computed with xor-ing two and two bytes on server side, then placing the 1’s complement of the sum in checksum field. Reciever does the same, including the checksum, and should arrive at all 1’s. Can also do bit addition instead of xor.
Alternatives(more modern methods) are CRC(Cyclic Redundancy check) and FCS(Frame Check Sequence on Ethernet).

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

What’s a simple form of flow control?

A

Stop-and-wait. Send one packet, keep it in a buffer, and keep it until ack is recieved, or timeout is reached. When ack is received, pop sender window, send new packet and place new packet in sender window.

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

What’s the point of timeout? Who handles the timeout, and why?

A

Timeout handles lost and delayed packets, since these cases means that both sender and receiver will wait, which again will cause a deadlock if both is waiting. The sender must handle timeout, because receiver doesn’t know when new packets will arrive, and the sender knows approximately when an ack is due.

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

What’s the difference between data packet and ack packet loss? Does sequence number solve any other problems?

A

On both, sender needs to send the data packet again. On data packet loss, receiver doesn’t notice any difference, while ack packet loss leads to the necessity of sequence number in a packet. The sequence number means that the receiver can decide if it’s a duplicate packet of the last one received(on an ack loss), or a new packet. Receiver also discards duplicate packets, but must still send acks to stop the sender from re-transmitting over and over.
Thus, sequence number solves the problem of ack loss, but also packet delay.

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

How is corrupted bits handled?

A
Repeat ack for previous packet. Ex:
Send packet #3
Recv ack #3
Send packet #4
Recv ack #3
Send packet #4
Recv ack #4
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are pipelined protocols?

A

They are protocols that improves utilization over the stop-and-go protocol. Mainly two protocols, Go-Back-N(GBN) and Selective Repeat(SR).
GBN: Sender sends N packets before waiting for an ack. The ack sent is cumulative for the packets received since last ack. Timeout is kept for oldest unacked packet, and if time runs out, all packets are sent.
SR: Receiver sends ack for each packet, and timeout is kept for each packet. Sliding window doesn’t slide until earliest packet is acked.

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

How is flow control fixed?

A

Receiver advertises free buffer space by including rwnd value in TCP header. Sender must respect this.

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

How is congestion control fixed? What is slow start? What’s the difference between TCP Reno and TCP Tahoe?

A

Varying congestion window(cwnd). Additive increase(add 1 MSS(Maximum segment size) every RTT) until loss detected, then multiplicative decrease(cut cwnd in half).
Slow start means that the connection starts with a small cwnd, then increase it exponentially until loss is encountered.
TCP Tahoe goes back to slow start when loss is encountered, and linearly increases when treshold is met, while TCP Reno halfs cwnd then increases it linearly. Treshold is set to half of cwnd when loss was encountered.

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