Lecture 4 Flashcards

Transport Layer

1
Q

What does a reliable channel do?

A

It appears to the sending and receiving processes as a logical connection at the transport layer, to transfer messages.

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

What is channels are data sent through?

A

Data needs to be sent through a reliable channel, but also needs to traverse an unreliable channel which the processes don’t know about.

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

What is the job of the RDT protocol?

A

To mask the unreliability of the underlying channel and deal with any issues that arise from said channel.

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

Name the 4 main commands that are called when data is sent through a channel?

A

rdt_send()
udt_send()
rdr_rcv()
deliver_data()

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

What does rdt_send() do?

A

It is called by the process from the sending side to send the data.

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

What does udt_send() do?

A

It is called by the RDTP (Reliable data transfer protocol) to send the packet.

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

What does rdt_rcv() do?

A

It is called when the packet arrives in the receiving side.

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

What does deliver_data() do?

A

It is called by the RDTP on the receiving side to send the data to the application for use.

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

How do we deal with corrupt packets?

A

We use positive or negative acknowledgement (ACK or NAK) to let the sending side know if the data was corrupt or not.

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

What happens if a ACK or NAK message gets corrupted during transmission?

A

It is treated as a NAK, and it calls for a retransmission of the packet. This can lead to packet duplication if the receiver actually did receive the first packet.

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

What to consider when building our RDT protocol, rdt v1.0?

A

It will use only unidirectional data transfer. We also assume that the underlying channel is reliable.
It uses the base method calls of rdt_send(), udt_send(), rdt_rcv(), and deliver_data() to send data.

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

What is wrong with rdt v1.0?

A

Data in packets can be corrupted or lost in transfer, rdt v1.0 does not deal with this.

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

What extra protocol capabilities does rdt v2.0 add to rdt v1.0?

A

Error detection - By sending extra checksum data
Receiver feedback - In the form of the receiver sending acknowledgements or non-acknowledgements of a received packet.
Retransmission - If a packet is corrupted or lost, the sender must retransmit it.

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

What is falwed about rdt v2.0?

A

Since ACK and NAK responses are packets, they can also get corrupted. This means the sender might not know if the ACK OR NAK sent by the receiver was correct.

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

What solution does rdt v2.1 implement to fix rdt v2.0 ACK/NAK problem?

A

It adds a sequence number to each packet sent. If the receiver receives a duplicate packet due to a corrupted ACK message, it knows its a duplicate because the sequence numbers match.

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

What does rdt v2.2 do differently from rdt v2.1?

A

It gets rid of NAK packets. Instead of sending a NAK it sends an ACK message for the last successfully received packet, which since the ACK for the successful packet has been sent before, it is treated as a duplicate and the sender then treats it as a NAK instead.

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

How does rdt v3.0 fix the problem of packets being lost?

A

The sbeder waits a specific amount of time for an ACK from the receiver. If it doesn’t receive one once the countdown has ended, the sender retransmits the packet.
If an ACK is received after the retransmission, the sender will treat the ACK as a duplicate.

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

What is pipelining?

A

When a sender can send multiple packets without having to wait for an ACK before sending the next packet, thus allowing for more throughput.
The packets should still be ACKed though, and if not they are stilled retransmited.

19
Q

Why use pipelining instead of stop and wait?

A
  • More throughput of packets

- Faster networks

20
Q

What two things does pipelining need, that we should consider?

A
  • The range of sequence numbers for packets must be increased - each packet must be indentifiable
  • The sender and receiver have to buffer more packets - more packets will be coming an leaving.
21
Q

Name 2 pipeline techniques.

A
  1. Go-Back-N (GBN)

2. Selective Repeat

22
Q

What is Go-Back-N (GBN)?

A
  • Out of all packets sent to the receiver, there are N number of packets unacknowledged. As more packets are acknowledged, the window of N packets moves along to newer packets.
  • Multiple packets ACKed at once - If one packet is ACKed then all unacknowledged packets before it in the N window are ACKed too.
  • There is a single timer for all unacknowledged packets to be retransmitted.
23
Q

What happens if there is an out of order packet in GBN on the receiver side?

A

The packet is discarded and an ACK is sent for the highest order sequence number packet.

24
Q

What does Selective repeat do?

A
  • ACK each packet individually
  • The sender only retransmits packets that went unacknowledged
  • Sender window (Number N consecutive sequence numbers), limits the number of packets that haven’t been ACKed
25
Q

What does the receiver do in selective repeat?

A
  1. Packet is received by the receiver
  2. Send an ACK message for packet
  3. Buffer if packet is out of order
  4. If packet is in order, send all received in-order packets that have yet to be delivered
26
Q

What does Selective repeat do if it receives a packet and it’s window of unacknowledged packets is already full?

A

It sends an lost ACK for the packet, so that it can be sent again once there is space for it, then ignores it.

27
Q

Name 7 facts about TCP.

A
  1. It uses pipelining
  2. It is a point-to-point protocol (One sender and receiver)
  3. Reliable
  4. In-order byte system
  5. Both sides have packet buffers
  6. Connection oriented
  7. A full duplex service (Data can be sent from both sides simultaneously)
28
Q

What in in a TCP segment (message) structure?

A
  • Source and Destination port numbers
  • Sequence order for in-order delivery
  • Acknowledgement number, which the receiver will sent back to acknowledge the packet.
  • A Receive window used for flow control
  • Checksum for error detection
  • Extra option fields (Not often used)
  • Variable amount of data
29
Q

How does TCP view data?

A

Unstructured by ordered section of bytes.

30
Q

TCP uses a cumulative ACK system. What does this mean?

A

That the ACK number efers to the next expected byte in the data stream.

31
Q

What two parts of the TCP segment are the most important?

A

The sequence number and the acknowledgement number.

32
Q

What do sequence numbers refer to?

A

The byte stream number of of the first byte in the segment. It allows for unique identification of the packet.

33
Q

What does the acknowledgement number do?

A

It is sent with the packet to the receiver, when the receiver receives the packet, it sents the acknowledgement number back to the client to show that it got the packet.

34
Q

What are retransmission of packets triggered by in TCP?

A
  • Timeout events (The timer running out etc.)

- Duplicate ACK messages

35
Q

What is flow control?

A

A speed matching service used to the send rate to the drain rate.
Send rate - is the rate at which data is sent.
Drain rate - is the rate at the received data is drained from the buffer after coming into the receiver.

36
Q

What is RcvBuffer?

A

It is the size of the buffer.

37
Q

What is LastByteRead?

A

It is the number of the latest byte to be consumed (Taken into) the buffer/process in the application layer.

38
Q

What is the LastByteReceived?

A

It is the number of the last byte in the receive buffer.

39
Q

How do we make sure the buffer is not overflowing?

A

We check that:
LastByteReceived - LastByteRead <= RcvBuffer

As the amount between the two should be what is in the buffer.

40
Q

What is rwnd?

A

It is the amount of spare room in the buffer. Rwebd is dymanic because it always changing.

41
Q

How is the flow of data controlled at the receiver in TCP?

A

The receiver sends the current rwnd)(Free space in buffer) in the header of each segment it sends. The sender needs to keep track of LastByteSent and LastByteAcked, the different between then must be less than the rwnd. The sender cannot send more data if it will overflow the free buffer space. If rwnd is 0, then th buffer is full.

42
Q

Explain how a TCP connection is established.

A
  1. Client sends SYN segment to server, and specifies client initial sequence number
  2. Server receives the SYN and replies with a SYNACK, whilst allocating buffers and specifying server initial sequence number
  3. Client receives SYNACK and replies with ACK and can start sending some data.
43
Q

Explain how a TCP connection is closed.

A
  1. Client sends FIN segment to server, signalling the client wishes to close the connection
  2. Server receives FIN and replies with ACK, then starts timer to close the connection and sends a FIN
  3. Client receives FIN and replies with an ACK, then it enters ‘timed wait’ period waiting for the server to close
  4. Server receives the ACK and the connection is closed