End to End Flashcards

1
Q

what layer is end to end

A

transport

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

limitations of network layer

A
  • best effort basis so it can:
  • drop msgs
  • send dup msg
  • limit size of msg
  • deliver after delay
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

requirements from some applications

A
  • guaranteed delivery
  • delivered in the same order as sent
  • msg delivered at most once
  • no limit on msg size
  • flow control
  • congestion control
  • multiple connections per host
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does UDP work

A
  • uses demultiplexing to direct datagrams to correct socket based on the port
  • best effort
  • connectionless
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is multiplexing

A

gather data chunks from source node and encapsulate with header, create segments, and pass to network layer

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

what is demultiplexing

A
  • host gets IP datagram
  • host uses the protocol + port to direct the segment to the correct socket
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

datagram vs segment

A

datagram:
- IP
- network layer
- contains a segment as the payload

segment:
- transport layer
- has the app data + source port, dest port in the header

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

setup and teardown of TCP

A

3 way handshake setup:
1) client sends syn seg to server with random seq # J
2) server responds with syn-ack with random seq # K and ack # = J+1
3) client sends ACK to server Ack # K+1

4 way teardown:
1) client sends FIN seg to server with seg # J
2) server sends ACK with ack # J+1
3) server sends FIN with seg # K
4) client sends ACK with ack # K+1

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

pros of UDP

A
  • smaller RTT
  • smaller header
  • simple
  • no flow control
  • can support lots of clients
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

const of UDP

A
  • no guarteed delivery
  • best effort basis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

why is TCP transport layer

A

if it was in network layer than all routers would need to do tcp things like flow control, congestion control and would be complex

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

TCP data transport

A
  • sender process writes bytes to the TCP send buffer
  • sends a segment once it has MSS bytes from the process
  • receiver gets bytes into TCP recv buffer and gives them to the reveicer process as needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is MSS

A
  • the max segment size
  • max amount of DATA in a segment

MSS = MTU - (TCP header + IP header)

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

what is MTU

A
  • max transmit unit
  • max packet size including headers
  • ex: MTU = 1500B for ethernet
  • 20B is for IP header and 20B is for TCP header, so TCP segment can have 1460B of DATA
    so MSS = 1460B
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is flow control

A

ensure that the sender does not overwhelm the receiver by sending more segments than it can handle

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

TCP flow control (sender side)

A
  • use a variable window size
  • gets window size from reciever ack msg
  • can send # segments = window size / seg size until we wait for an ack
  • can slide window out of a seg once an ack arrives for that seg
17
Q

TCP flow control (receiver side)

A
  • defines the size of ad window
  • AW = (max recieve buffer) - (next byte expected - next byte read)
  • shrinks as data arrives
  • grows as process consumes data from buffer
18
Q

problem of AW going to 0

A

senders buffer will fill up, so now it cant receive updates from receiver to know that the window has changed

19
Q

solution to AW to 0

A

sender periodicly sends 1 byte segments to trigger response

20
Q

what is silly window syndrome

A
  • when the sender sends lots of really small segments
  • very ineficient
21
Q

solution to silly window

A
  • Nagles algorithm
22
Q

what is nagles alg

A
  • clock based solution

if availible data >= MSS and window >= MSS then send full segment

else: if there is unacked data in flight:
buffer data until ack arrives
else: send data now

basicly wait until segment is full until sending data

23
Q

why would you want to disable nalges

A
  • if your application requires low latency or instant feedback, but does not require to send a lot of data

ex: voice calling, keyboard strokes

24
Q

what is the sequence number in a TCP segment

A
  • it represents the number of the first byte of data in the segment
25
how to calc the wrap around time for a sequence number
- given the seq # field is 32 bits - there are 2^32 possible seq #s - each seq # represents 1 byte - so 2^32 bytes need to be consumed for the wrap time = 2^32 * 8 (bits)/ bandwidth (bps)
26
advertised window
- must be large enough to keep the pipe full - AWS >= RTT * bandwidth
27
problem with the AWS and solution
- AD field is only 16-bits so max it can be 2^16 B which is too small for lots of apps solution: use a scaling factor to shift the window
28
how to clac the scaling factor
1) find DBP (bytes) 2) let x = DBP (bytes) / 2^16 (bytes) 3) let y be smallest power of 2 such that 2^y >= x 4) y is the scaling factor
29
TCP re-transmission
segment gets sent again if ack is not received in a time frame timeout = 2*RTT
30
what is karn alg
- to measure the sample RTT for segments that only sent once - measures RTT by the time at which the segment was sent and the time in which the ack for that segment was received - only uses segments that only sent once