Transport Layer Flashcards

1
Q

What is the transport layer?

A

Provides logical communication between app processes running on different hosts.

UDP and TCP

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

Where do transport protocols run?

A

In end systems, applications break messages into segments and passes it to the network layer.

Receiver then reassembles segments into messages and passes up the stack

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

What plex happens at the sender?

A

Multiplexing.

Handle data from multiple sockets, add transport header which will be used for demultiplexing

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

What plex happens at the receiver?

A

Demultiplexing.

User header information to deliver received segments to the correct socket (application)

Uses datagram IP and source/destination port to find socket.

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

What is the 4-tuple of a TCP socket?

A

Source IP
Source Port
Destination IP
Destination Port

Demultiplexer uses these to steer datagrams to correct socket.

Can run multiple sockets.

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

What is UDP?

A

User Datagram Protocol, barebones transport protocol.

Connectionless, no handshake and each segment handled independently. Sent on “best hope”

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

When is UDP used?

A

Streaming multimedia
DNS

Basically, used when loss is acceptable to the application

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

When is UDP reliable?

A

It’s never reliable in itself, but reliability can be baked in at the application layer.

Can have application-specific recovery.

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

What is the header of a UDP packet?

A

Source Port, Destination Port, length in bytes, checksum, payload

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

What is the benefits of using UDP?

A

No connection establishment overheads

Simple, no state

Small header size

No congestion control, UDP can blast packets

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

What does the UDP checksum do?

A

Detect errors in transmits

sender performs 16 bit integer hash contents and header fields and adds them together. Putting the answer in the header.

Receiver computes checksum and compares. If checksum is fine, doesn’t mean packet is fine. drops failures

Can optimise by hashing the whole file, not each packet.

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

What is the reliable data transfer protocol and is it enough to ensure packets make it to the other side?

A

No, as the underlying channel is what carries the bits - not the protocol

sender - rdt_send() - called when data passed dow, then calls udt_send() if channel unreliable - send over channel

reciver: rdt_rcv() - called on packet receipt, deliver_data() - called to pass up stack

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

What is a pipelined protocol?

A

Sender allows multiple “in-flight” yet to be acknowledged packets, with a range of sequence numbers which must be increased.

Fill gaps in the network by flingin loads of information down the pipe.

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

What is Go-Back-N?

A

Sender can have up to N unacked packets in the pipeline

Receiver only sends cumulative ack - for all packets.

Sender has timer for oldest unacked packet and retransmits when timer runs out.

window size is N long, new window is from unacked packet onwards.

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

What is selective repeat?

A

Sender can have up to N unacked packets in pipeline, and receiver acks individual packets

Sender maintains timer for each unacked packet and retransmits only that packet on timeout.

Window size of N consecutive seqs. Moves to next not yet-received pkt.

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

What is done with out of order packets?

A

Buffered while waiting for correct packets, passed up in order.

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

What is done with packets not in the window size?

A

They are discarded.

18
Q

What is the structure of a TCP packet?

A

Source port, destination port, seq number, ack number, header len, flags, rcv window, checksum, urg data pointer, options, application data.

19
Q

What are the TCP flags?

A

Urgent, Ack, Push, RST, SYN, FIN

20
Q

What are the sequence and acknowledgement numbers used for?

A

Seq number: Byte stream number of first byte in the segment

Ack number: Seq # of the next byte expected from other side.

21
Q

How is the TCP timeout value set?

A

Sample RTT is measured, time from segment transmission until ack receipt - ignoring retransmissions. We estimate RTT in order to give a smoother timeout as RTT varies.

Safety margin added to estimated RTT, it’s the deviation from actual RTT

22
Q

How is TCP reliable?

A

Creates RDT service on top of IP’s unreliable service using:
Pipelined segments
cumulative acks
Single retransmission timer

23
Q

What triggers retransmissions in TCP?

A

Timeout events

duplicate acks

24
Q

What happens at the TCP sender when the transport layer received application data?

A

Creates segment with sequence number, which is the byte-stream number of first data byte in segment.

Start timer if not running

Pass down to other layers.

25
Q

What happens when the TCP sender times out?

A

Retransmit the segment that caused the timeout and restart the timer

26
Q

What happens when the TCP sender receives an ack?

A

If ack acknowledges previously unacked segments then update what is acked and start timer if there are still unacked segments.

27
Q

What happens when a packet is received that shouldn’t have been?

A

Send single cumulative ack for both acks when waiting for another ack.

Send duplicate acc when higher than expected sequence number is seen.

Send ack when a segment is received that partially or completely fills a gap.

28
Q

What is TCP fast retransmit and what does it deal with?

A

Detect lost segments via duplicate Acks.

if sender receives 3 acks for same data then resend unacked segment with smallest sequence number.

29
Q

What is flow control?

A

Receiver controls sender so that sender won’t overflow receiver’s buffer by transmitting too much too fast.

30
Q

How does TCP flow control work?

A

Receiver advertises free buffer space by including rwnd value in RcvBuffer.

Sender limits amount of unacked “in-flight: data to receiver’s rwnd value to gaurantee no buffer overflow.

31
Q

How are connections managed in TCP?

A

3-way Handshake before exchange of data.
Syn - I want to connect
syn ack - you may connect
ack - I will connect

Closed with Fin and Ack for Fin

32
Q

What is congestion?

A

Congestion occurs when too many sources are sending too much data too fast for the network to handle

buffer overflow at routers causes lost packets

Queueing in router buggers causes long delays

33
Q

What is goodput?

A

Packets that have been received once.

34
Q

What is the costs of congestion?

A

More work having to be done due to retransmits. Sometimes links can carry multiple copies of same packet, decreasing goodput

When packets are dropped, upstream transmission capacity was also wasted.

35
Q

What issue arrises when using multiple routers?

A

Hard to see where loss occurs as there’s multiple points of failure

36
Q

How does TCP deal with congestion control?

A

Additive increase multiplicative decrease, AIMD.

Sender increases window size (transmission rate) and probes the usable bandwidth until loss occurs.

Additive increase: increase cwn by 1 MSS every RTT until loss detected. When loss is detected, cut in half or to threshold.

Graph is tooth like.

37
Q

What is cwnd?

A

Control window, the number of segments to be sent by TCP at any given time.

Dynamic, function of perceived network congestion.

38
Q

What is the rate of transmission like in a TCP connection?

A

Starts off slow, and ramps up exponentially once handshake is done. Then backs off when there’s loss.

39
Q

How is loss indivated by TCP?

A

Timeout

3 duplicate ACKs

40
Q

Is TCP fair? If so, how?

A

Loss can occur when the sender can’t transmit, so all of the links being cut in half results in the removal of bottlenecks.

41
Q

What is Explicit Congestion Notification?

A

IP header is marked by router to indicate congestion, carried to receiving host.

Receiver sets ECE bit on return packet to let sender know there’s congestion.