Transport Layer Flashcards

1
Q

what are the two transport layer protocols

A

tcp
udp

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

which is more reliable tcp or udp

A

tcp

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

why are tcp packets sent in order

A

needs to be assembled in a particular order

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

what services are not available in the internet transport layer protocols

A

delay guarantees
bandwidth gaurantee

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

what type of services use TCP

A

email, web

because they require that every bit of data which was transferred from the sender to reach the receiver

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

what types of services use UDP

A

fast services like video streaming

because it is not essential that all packets reach the receiver as the receiver can interpret the message with some packets missing, can tolerate some loss

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

what is multiplexing

A

handling data from multiple sockets

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

what is demultiplexing

A

using header info to deliver received segments to the correct socket

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

how many addresses does the typical host have

A

3 addresses

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

how does demultiplexing work

A

host uses source ip address, destination ip address and port numbers to direct segment to appropriate socket

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

what is the 4-tuple that a TCP socket can be identified by

A

source ip address
source port number
destination ip address
destination port number

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

example of a server supporting many simultaneous TCP sockets

A

webserver

gets requested from many different users and everyone’s queries need to get to the right processes

the source IP address will allow the server to differentiate the different machines

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

what does UDP stand for

A

user datagram protocol

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

what does it mean when we say that udp is connectionless

A

no handshaking between udp sender and receiver

each udp segment handles independently of others

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

why is there no connection establishment in udp

A

connection establishment adds delay

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

why is there a udp

A
  • simple (no connections)
  • small header size
  • no congestion control
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what does it mean if the underlying channel is completely reliable

A

no bit errors

all arrives at the end in exact sequence sent

no loss of packets

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

what can cause bit errors

A

noise on the line

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

how to recover from bit errors

A
  • checksum
  • negative acks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what is a negative ack

A

receiver explicitly tells sender that the packet had erros

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

with no timers, what happens if an ack/nack is corrupted

A

sender does not know what happened at the receiver and will wait an infinite amount of time for an ack

it does not want to transmit because there could be a possibility of duplicate packets

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

in protocol with no timers, how can duplicate packets be handled

A

sequence numbers

receiver can discard packets with duplicate sequence number

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

how could a protocol avoid nacks

A

instead of NAK, receiver sends ACK for last packet received ok, stating explicitly the seq #

if the sender received an ACK with a different seq # than expected, it knows to retransmit the packet that it expected to get the ACK for

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

approach for channel where packets can get lost

A

use timers

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

how are duplicates handled in protocols with timers

A

with seq #, duplicates are discarded

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

what is the round trip time

A

time taken to transmit packet and receive ack for this packet

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

what is pipelining

A

multiples packets can be in flight, yet to be acknowledged

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

two forms of pipelined protocols

A

go back n
selective repeat

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

how does the utilization increase as the number of packets allowed in the pipeline increase

A

exponentially

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

why can we not have an indefinite amount of packets allowed in the pipeline

A

buffering problems

overwhelming the network

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

what end points have a buffer in the go back n protocol

A

just sender

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

what is a cumulative ack

A

wait a little longer after receiving packet, see if more come through, if they do then ack them all together

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

in go back n, what does the timer represent

A

the oldest un acked pacl

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

if the timer expires in go back n, what happens

A

all the packets in the window (unacked) are retransmitted

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

which endpoints have buffers in selective repeat

A

both sender and receiver

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

is there cumulative acks in selective repeat

A

no each packet must be acked individually

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

how many timers are there in selective repeat

A

one for each unacked packet

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

why is having one timer per packet in selective repeat more efficient

A

if a timeout occurs, only the unacked pack needs to be retransmitted

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

what does the window size depend on

A

the network situation

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

can out of order packets be received in go back n

A

no

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

what happens with out of order packets in go back n

A

discarded

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

can out of order packets be received in selective repeat

A

yes, because there is a buffer

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

what occurs on timeout on sender side in selective repeat

A

resend packet the timer is associated with

reset the timer

44
Q

what happens in selective repeat when the sender received an ack for a frame within the send base

A

mark packet as received

if the seq # == send base, advance the window forward

45
Q

what happens in selective repeat when the receiver gets a packet that is within its receive base

A

send an ack packet

out of order = buffer

in order = deliver, advance window

46
Q

what happens in selective repeat when the receiver gets a packet that is not within its receive base

A

greater than receive base = ignore

less than receive base = duplicate packet = send another ack for this packet to the sender, other one may have gotten lost

47
Q

what is the dilemma with windows wrapping around in selective repeat

A

receiver see’s no difference between sequence numbers

some retransmissions then can be treated as new data

48
Q

what is the dilemma with windows wrapping around in selective repeat

A

receiver see’s no difference between sequence numbers

some retransmissions then can be treated as new data

49
Q

how can we resolve the wrap around window problem with selective repeat

A

about half of the sequence number typically

50
Q

how can we resolve the wrap around window problem with selective repeat

A

about half of the sequence number typically

51
Q

what does it mean to say TCP is point to point

A

runs only in the end systems, client and server, not the intermediate routers

52
Q

what does MSS stand for

A

maximum segment size

53
Q

what is the MSS

A

MTU minus 40 bytes (TCP and IP header which are 20 bytes each typically)

54
Q

what does it mean to say that TCP is connection orientated

A

handshaking is required before any real data can be transmitted

initialises state on both sides

55
Q

why is there flow control in TCP

A

so that the sender does not overwhelm the receiver

56
Q

in TCP the ack sent also contains

A

the seq # of the next byte expected from the other side

57
Q

what does rtt stand for

A

round trip time

58
Q

if the timer is shorter than the RTT what happens

A

much more unnecessary resending will be done as timeouts are premature

59
Q

what happens if the timers are much longer than the RTT

A

slow reactions to lost segments

60
Q

how do we estimate RTT

A

sampleRTT

measured time from segment transmission until ack receipt(ignoring retransmissions as these do not give a true picture of RTT)

61
Q

what is estimated RTT

A

average of sampleRTTs

62
Q

why is estimatedRTT better than sampleRTT

A

averaging it out as there could be outliers

63
Q

how is the timeout interval calculated

A

estimatedRTT + 4*DevRTT

64
Q

what is the DevRTT

A

deviations of the sampleRTTs from the estimated RTT

65
Q

what is the initial value of the timeout interval in TCP

A

1 second

66
Q

how does the value of the timeout interval change when a timeout occurs

A

value doubles

67
Q

what are retransmissions triggered by in TCP

A

timeouts
duplicate acks

68
Q

what additional services does TCP add on top of IP

A

pipelining
cumulative ACKs
single retransmission timers

69
Q

how is sequence number deciede

A

byte stream number of first data byte in segment

70
Q

how does tcp fast retransmit work

A

lost segments can be detected via duplicate acks

if sender receives 3 Acks for the same data (Triple duplicate acks) => resend unacked segment with smallest seq #

71
Q

why is tcp fast retransmit more efficient

A

saves time rather than waiting for timeout

72
Q

what is default receive buffer space

A

4096

73
Q

what is the free buffer space called in receiver

A

receive window

74
Q

how does the receive window help the sender not overwhelm the receiver

A

sender limits amount of in flight data to receivers rwnd value

75
Q

if receiver window is full and its advertised rwnd = 0, and no data to send from the sender side, what happens

A

each side is waiting for the other to do something

sender will send a single byte every so often to see when things clear up and there is more space in the window

76
Q

how does the sender know the size of the receiver window in TCP

A

the receiver advertises the free buffer space in the TCP header

77
Q

what is a handshake

A

agree to establish connection

agree on connection parameters such as buffer space on each side, ports shared and some other variables

78
Q

what is a synbit

A

synchronisation bit

79
Q

what are the steps involved in a three way handshake

A

client sends tcp syn message , synbit = 1 and seq # = x, initiating the connecyion

server also chooses random seq #, acking the syn message received, synbit = 1, seq # = y, ackbit = 1 , ackNum = x+1 (next expected)

finally the client acks the servers seq # and say what it expected next, (y+1)

80
Q

what side must start the handshake process

A

client

81
Q

what side must start the connection closing process

A

either

82
Q

what is the connection closing process

A

send finbit = 1, seq # =x

other side immediately sends ack, ackbit =1, acknum = x+1

once the receiver has wrapped things up on it’s end, it also sends finbit =1, seq =y

snder acks this

83
Q

what is a syn flood attack

A

attacker sends larger amounts of syn segments and handshakes never get completed

these hanging connections eventually just grind down the server

84
Q

how are syn attacks resolved

A

syn cookies

85
Q

what does a syn cookie consist of

A

src IP address & port
dest IP address & port
secret seed

86
Q

what does ISN stand for

A

initial sequence number

87
Q

what is an initial sequence number the same as

A

syn cookies

88
Q

how does syn cookies work

A

server sends syn ack
nothing is allocated then on the server side until the client returns the ack segment (third part of handshake)

89
Q

how does syn cookies stop illegitimate clients

A

because only legitimate clients will return the ack segment

90
Q

what is congestion control

A

making sure not too many sources are sending too much data for the network to handle

91
Q

how does congestion control differ from flow control

A

flow control makes sure an individual sender does not overwhelm an individual receiver

where as congestion control is a network problem, making sure the network is not overwhelmed

92
Q

how do lost packets occur

A

in routers

buffer overflow

93
Q

how do long delays occur in a network

A

because of queueing happening at routers

94
Q

where are long delays more of an issue

A

time sensitive data

there is no way to know though if the data being transmitted is time sensitive as all packets are treated the same

95
Q

what is end to end congestion control

A

there is no explicit feedback from the network so we must infer what is happening in the network from the packets that are lost and delayed

96
Q

what protocol uses end to end congestion control

A

TCP

97
Q

what is network assisted congestion control

A

router supply feedback to the end systems

eg the routers use a bit to tell to not send any more data until it says so

98
Q

what protocol uses network assisted congestion control

A

ATM, single bit indicating congestion

in the core of the network where fast and high speeds are neede

99
Q

what does AIMD stand for

A

additive increase multiplicative decrease

100
Q

what is aimd

A

keep increasing congestion window by 1 until a lost is detected

multiplicative decrease = cut congestion window size in half after the loss

101
Q

what sort of behaviour will result in a aimd (if graphed)

A

saw tooth behaviour

102
Q

how is the value of the size of the congestion window kept track of

A

a variable on each side as it is not in the header

103
Q

what is tcp slow start

A

every time an ack is received , the congestion window can be increased exponentially (doubled)

104
Q

in slow start what is the intial size of the cwnd

A

1 MSS

105
Q

what is congestion avoidance in TCP

A

cwnd initially 1 MSS

exponential increase up to the threshold then linear

upon loss, the cwnd is cut in half + 3 MSS

then begins growing linear again

106
Q

how is slow start threshold calculated initially

A

cwnd / 2