transport layer Flashcards

1
Q

goal of the transport layer

A

provide logical communication between application processes running on different hosts

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

what happens on sender side

A

breaks app messages into segments and passes to network layer

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

what happens on receiver side

A

reassembles segmnets into messages and passes to app layer

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

explain multiplexing at sender

A

handle data from multiple sockets and add transport header

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

explain what is meant by demultiplexing at receiver

A

use header to deliver received segments to correct socket

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

how does demultiplexing work?

A
  • host receives IP datagram - each has src ip and dest ip address, each contains trans layer segments, each segment contains dest port no
  • host uses IP address and port no to direct segment to appropriate socket
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain how connectionless demultiplexing happens

A
  • socket created at local port
  • when host receives UDP segment: checks dest port, directs udp segment to socket with same port n #
  • IP datagrams with same dest port # directed to same sockets
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain how connection-orientated demux happens

A

TCP socket identified by-tuple: src ip & port, dest ip and & port
- receiver uses all 4 values to direct to correct socket
server hose may support many simultaneous TCP sockets

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

TCP allows full duplex data - what does this mean

A

Bi-directional data flow in same connection and MSS (max segment size)

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

what are sequence numbers

A

byte stream number of first byte in segments data

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

what are acknowledgements

A

seq# of next byte expected from other side - cumulative ack

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

will 2 way handshake always work?

A
variable delays
retransmitted messages
message loss
message reordering
cant see other side
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how can a two-way handshake fail?

A

1.) retransmitted connection request is delayed, client disconnects because it ack for inital message, server receives retransmitted connection request - establishes another connection with the client (who is disconnected)

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

Explain a three-way hand shake

A

c - choose initializing seq number x - send tcp syn messahe to establish connection (synbit = 1, seq = x)
s - choose initializing seq # = y, send synAck to client
- synbit = 1, seq = y, ackBit = 1, Ack# = x+1
c - send ack for synack to server (may also contain data)
- Ackbit = 1, Ack# = y+1

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

Explain how closing a tcp connection happens

A

c - close client socket (can no longer send but can still receive) - FinBit = 1, seq = x
s - can still send data to client - Ack = 1, Ack# = x+1 - client waits for server to close
s - Finbit - 1 seq = y – can now no longer send data but can still receive
c - acknowledges server close - Ackbit = 1, ack# = y+1

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

how do we disambiguate the rtt for tcp

A

use time stamps and echo

17
Q

What to consider when setting the TCP timeout value?

A

Longer than RTT
if too short - premature timeout - unecessary retransmissions
too long - slow reaction to segment loss

18
Q

Estimated RTT formula

A

(1-a)estimatedRTT + asampleRTT

a is usually 0.125

19
Q

what is the timeout interval

A

estimatedRTT + safety margin … large variation in RTT = larger safety margin

20
Q

Timeout interval calculation

A

Deviation = (1-b)average of previous devs + b|samplertt-estimatedrtt|, typically b = 0.25
Timeout interval = EstimatedRTT + 4*DevRTT

21
Q

Define flow control

A

receiver controls sender so that sender doesn’t overflow receiver’s buffer by transmitting too much too fast

22
Q

Explain how flow control works

A

receiver advertises free buffer space by including a receiver window (rwnd) value in tcp header of receiver-sender segments
sender limits amount of unacked data to receivers rwnd value
guarantees that buffer will not overflow

23
Q

what is congestion

A

too many sources sending too much data too fast for network to handle

24
Q

manifestations of congestion

A

lost packets - buffer overflow at routers

long delays - queuing in router buffers

25
What are two broad approaches to congestion control?
end-to-end congestion control | network assisted congestion control
26
Explain network assisted cong control
routers provide feedback to end systems single bit indicating congestion explicit rate for sender to send at
27
Explain end-to-end cong control
no explicit feedback from network congestion inferred from end-system observed loss/delay approach taken by tcp
28
What does TCP use for cong control?
additive increase multiplicative decrease
29
explain additive increase and multiplicative decrease
sender increases transmission rate (window size) probing for usable bandwith until loss occurs - add increase - increase sending window by 1 mss every RTT until loss - mult decrease - decrease sending window (cwnd) by half everyloss
30
TCP sending rate formula
rate = cwnd/rtt bytes per second (sent and not acked cannot exceed cwnd)