Transport Layer Part 2 Flashcards

1
Q

Principles of Reliable Data Transfer

Reliable Service Implementation

A

Unreliable channel with reliable transport protocol creates reliable service

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

Principles of Reliable Data Transfer

Reliable Service Abstraction

A

Reliable channel creates reliable service

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

Principles of Reliable Data Transfer

RDT

A

Reliable data transfer

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

RDT Interfaces

RDT Interfaces

A
  • rdt_send()
  • udt_send()
  • deliver_data()
  • rdt_rcv()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

RDT Interfaces

rdt_send()

A
  • Called from upper layer (e.g. app)
  • Passes data that has to be delivered to receiver
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

RDT Interfaces

deliver_data()

A
  • Called by rdt
  • Delivers data from lower to upper layer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

RDT Interfaces

udt_send()

A
  • Called by rdt
  • Transfers packet over unreliable channel to receiver
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

RDT Interfaces

rdt_rcv()

A

Called when packet arrives on receiver side of channel

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

rdt 1.0

rdt 1.0

A
  • Reliable transfer over reliable channel
  • Separate processes for sender, receiver
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

rdt 1.0

rdt 1.0 Sender FSM

A
  • enter to wait for call
  • loop with rdt_send(data) > packet = make_pkt(data) > udt_send(packet)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

rdt 1.0

rdt 1.0 Receiver FSM

A
  • enter to wait for call from below
  • loop with rdt_rcv(packet) > extract(packet, data) > deliver_data(data)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

rdt 2.0

rdt 2.0

A
  • unreliable channel (bit errors)
  • recovers from errors using acknowledgements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

rdt 2.0

ACKs

A

Acknowledgements, receiver explicitly tells sender that packet was received okay

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

rdt 2.0

NAKs

A

Negative acknowledgements, receiver explicitly tells sender that packet had errors. Sender retransmits packet on receipt of NAK

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

rdt 2.0

Stop and Wait

A

Sender sends one packet, then waits for receiver response

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

rdt 2.0

rdt 2.0 Fatal Flaws

A
  1. corrupted ACK/NAKs
  2. handling duplicates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

rdt 2.0

Review rdt 2.0 FSM Specifications

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

rdt 2.1

What if ACK/NAK corrupted?

A
  • sender doesn’t know what happened at receiver
  • can’t retransmit in case of duplicates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

rdt 2.1

Handling Duplicates

A
  • if ACK/NAK corrupted, sender retransmits packet
  • sender adds sequence number to each packet
  • receiver discards duplicates using sequence numbers
19
Q

rdt 2.1

Sequence Number

A

Added to each packet to identify duplicates

20
Q

rdt 2.1

Sender Process

A
  • seq # added to packet (1 or 0)
  • must check to know if ACK/NAK is corrupted
  • adds twice as many states to FSM
21
Q

rdt 2.1

Receiver Process

A
  • must check if received packet is duplicate
  • doesn’t know if its last ACK/NAK was received at sender
22
Q

rdt 2.2

rdt 2.2

A
  • NAK-free protocol, only uses ACKs
  • receiver must explicitly include seq # of packet being ACKed
23
Q

rdt 2.2

Review rdt 2.2 FSM Specifications

A
24
Q

rdt 2.1

Review rdt 2.1 FSM Specifications

A
25
Q

rdt 2.2

rdt 2.2 Fatal Flaw

A

Packets can be lost, not just corrupted

26
Q

rdt 3.0

rdt 3.0

A
  • Channel with errors and loss
  • Sender retransmits if no ACK received in reasonable amount of time
  • If packet just delayed, then will be duplicate but will be handled by seq #s
  • Receiver must specify seq # of packet being ACKed
27
Q

rdt 3.0

Sender Utilization

A

Fraction of time the sender is busy sending

U_sender = (L/R) / (RTT + L/R)

28
Q

rdt 3.0

Pipelining

A
  • Sender allows multiple, “in-flight”, yet-to-be-ACKed packets.
  • # of packets depends on window size.
  • Increases sender utilization
29
Q

rdt 3.0

Window Size

A

Maximum number of “in-flight” packets allowed.

30
Q

Go-Back-N: Sender

Go-Back-N: Sender

A
  • Has window of up to N consecutive transmitted but unACKed packets
  • timer for oldest in-flight packet
  • upon receiving an ACK, move forward to begin at N+1
31
Q

Go-Back-N: Sender

Cumulative ACK

A

ACKs all packets up to, including seq # N

32
Q

Go-Back-N: Sender

timeout(n)

A

Retransmits packet N and all higher seq # packets in window

33
Q

Go-Back-N: Receiver

Go-Back-N: Receiver

A
  • Only sends ACKs
  • Has buffer holding sequence numbers
34
Q

Go-Back-N: Receiver

ACK-Only

A
  • always send ACK for correctly received packet so far, with highest in-order seq #
  • may generate duplicate ACKs
  • need only remember rcv_base (next sequence number)
35
Q

Go-Back-N: Receiver

On receipt of out-of-order packet…

A
  • Can discard or buffer (implementation decision)
  • Re-ACK packet with highest in-order seq #
36
Q

Selective Repeat

Selective Repeat: Sender

A
  • if next seq # avaliable, send packet
  • if packet times-out (front of window), then sender retransmits that packet
  • if first seq # in window is ACKed, move window up
  • sender window: N consecutive seq #s
37
Q

Selective Repeat

Selective Repeat: Receiver

A
  • if receive packet n, send ACK(n)
  • out-of-order: buffer
  • in-order: deliver buffered in-order packets, advance window to next not yet received packet
38
Q

Selective Repeat

Selective Repeat

A
  • Unique ACK sent for every received packet
  • if need to retransmit, use previously sent ACKs to determine how many packets to resend (doesn’t resend packets that were received ok)
39
Q

Go-Back-N

Go-Back-N

A
  • Send ACK for each received packet
  • If packet lost, discard all following packets and all following ACKs will have lost packet’s sequence number
  • Resends lost packet and all packets that were sent after lost packet
40
Q

Selective Repeat

Selective Repeat Dilemma

A

If range of seq #s too short, then receiver might not be able to distinguish between a resent packet and new packet (can cause receiver to accept duplicates)

41
Q

TCP

TCP Acknowledgements

A
  • Sends cumulative ACKs
  • Value of ACK should be -> seq # + size of sent data
42
Q

TCP

TCP Sequence Numbers

A

Byte stream number from first byte of segment data
OR
Previous ACK value

43
Q

TCP

TCP Retransmission

A

In case of premature timeout:
* sender retransmits packet
* receiver resends cumulative ACK (informs of all previously received packets)

44
Q

TCP

TCP Fast Retransmit

A
  • If sender receives 3 duplciate ACKs, resend smallest unACKed segment with smallest seq #
  • Don’t wait for timeout