3: Transport Layer Flashcards

1
Q

what is the role of the transport layer?

A

to provide logical communication between app processes running on different hosts
transport protocols run in end systems - breaks app messages into segments, passes them down

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

how does role of the T layer compare to the role of the N layer?

A
network layer:
logical
communication
between hosts
transport layer:
logical
communication
between
processes
12 kids in Anne’s house
sending letters to 12 kids
in Bill’s house:
• hosts = houses
• processes = kids
• app messages = letters in
envelopes
• transport protocol = Anne
and Bill who demux to inhouse siblings
• network-layer protocol =
postal service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is Multiplexing/demultiplexing?

A
multiplexing at sender:
handle data from multiple
sockets, add transport
header (later used for
demultiplexing)
demultiplexing at receiver:
use header info to deliver
received segments to
correct socket
host uses IP addresses & port
numbers to direct segment to
appropriate socket

extending the host-to-host delivery service provided by the network layer to a process-to-process delivery service for applications, basically

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

how do connection oriented and connectionless mulitplexing differ?

A

connectionless: socket is IDd by dest port and ip address, so two packets can go to the same process
connection: socket IDd by 4 tuple of source ip port dest ip port, and all as used to demux

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

what applications does UDP have? why do we have UDP?

A
streaming multimedia
apps (loss tolerant,
rate sensitive)
DNS
SNMP
no connection
establishment (which can
add delay)
simple: no connection
state at sender, receiver
small header size
no congestion control:
UDP can blast away as
fast as desired
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

describe the UDP header

A
64 bits, 16 bits (2bytes) each:
source port
dest port
length
checksum
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

describe the UDP checksum

A

goal is to detect bit errors e.g. flipped bits

sender treats the segment as a sequence of 16bit ints. the checksum is the addition of the segment’s contents, and puts the one’s compliment (inversion) of the number into the UDP checksum field. overflow wraps around

receiver computes the checksum and compares it to checksum field.

errors are still possible though

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

what is a pipelined protocol? give two forms of pipelines

A

pipelining: sender allows multiple, “in-flight”, yet-to-beacknowledged pkts
• range of sequence numbers must be increased
• buffering at sender and/or receiver

go-Back-N, selective
repeat

Go-back-N:
• sender can have up to N
unacked packets in pipeline
• receiver only sends
cumulative ack
• doesn’t ack packet if there’
s a
gap
• sender has timer for oldest
unacked packet
• when timer expires, retransmit
all unacked packets
Selective Repeat:
• sender can have up to N
unack’ed packets in pipeline
• rcvr sends individual ack for
each packet
• sender maintains timer for each
unacked packet
• when timer expires, retransmit only
that unacked packet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what features does TCP boast?

A
• point-to-point:
• one sender, one receiver
• reliable, in-order byte steam:
• no
“message boundaries”
• pipelined:
• TCP congestion and flow
control set window size
 full duplex data:
• bi-directional data flow in same
connection
• MSS: maximum segment size
 connection-oriented:
• handshaking (exchange of
control msgs) inits sender,
receiver state before data
exchange
 flow controlled:
• sender will not overwhelm
receiver
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

how does TCP deal with out of order segments?

A

It provides sequence numbers, but TCP spec doesn’t define how they are handled. This is up to the implementor.

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

how is TCP timeout calculated?

A

EstimatedRTT = (1 - a) * EstimatedRTT + a*SampleRTT
a typically is 0.125

then the timeout value is the EstimatedRTT plus safety margin. uses an exponential weighted moving average

DevRTT = (1 - B)DevRTT + B|SampleRTT-EstimatedRTT|

recall that |x| is the absolute value of x

typically B = 0.25

recall that a and B are actually alpha and beta

then

timeoutinterval = estimatedRTT + 4*devRTT

this 4 x Dev is the safety margin

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

does TCP use NACKs? what do?

A

no

it instead reACKS the previously received packet.

if the sender receives 3 ACKS for the same data, it resends the next smallest sequence number packet before its timeout occurs: fast retransmit

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

describe TCP flow control

A

receiver controls sender, so
sender won’t overflow
receiver’s buffer by
transmitting too much, too fast

the sender limits the amount of unacked “in flight” data to the receive window value: a value that the receiver “advertises” declaring how much free buffer space it has

this stops buffer overflow

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

what are the problems with a 2 way handshake? describe some failure scenarios

how does 3 way handshake work? how opened how closed?

A

if the client sends a request, and the ack for the request isnt received quickly, they may send another. then, if the ack for the 1st comes through, and then completes, the server may receive the 2nd request later and be left with a half open connection (no client)

client makes connection request
server acks request
client acks the ack

C and S both send a FINbit, and an ACK for that. doesnt matter the order

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

how does TCP congestion control work?

A

additive increase multiplicative decrease aka sawtooth probing

the sender increases transmission rate by 1 MSS (max segment size) every RTT until loss is detected

then cuts transmission rate in half after loss

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

what is TCP slow start?

A

TCP starts with one segment then exponentially increases until first loss event

17
Q

how does the fairness of UDP and TCP compare? what incentives does this give

A
Fairness, parallel TCP
connections. TCP connection R is divided amongst the users
 application can open multiple
parallel connections between
two hosts
 web browsers do this
 e.g., link of rate R with 9
existing connections:
• new app asks for 1 TCP, gets
rate R/10
• new app asks for 11 TCPs,
gets R/2 
Fairness and UDP
 multimedia apps often do not
use TCP
• do not want rate throttled by
congestion control
 instead use UDP:
• send audio/video at constant
rate, tolerate packet loss
18
Q

what is explicity congestion notification?

A

2 bits in the IP datagram header are used for ECN. indicates congestion has occured. once packet has arrived at reciepient, recip notifies the sender that congestion has occured