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
how are duplicates handled in protocols with timers
with seq #, duplicates are discarded
26
what is the round trip time
time taken to transmit packet and receive ack for this packet
27
what is pipelining
multiples packets can be in flight, yet to be acknowledged
28
two forms of pipelined protocols
go back n selective repeat
29
how does the utilization increase as the number of packets allowed in the pipeline increase
exponentially
30
why can we not have an indefinite amount of packets allowed in the pipeline
buffering problems overwhelming the network
31
what end points have a buffer in the go back n protocol
just sender
32
what is a cumulative ack
wait a little longer after receiving packet, see if more come through, if they do then ack them all together
33
in go back n, what does the timer represent
the oldest un acked pacl
34
if the timer expires in go back n, what happens
all the packets in the window (unacked) are retransmitted
35
which endpoints have buffers in selective repeat
both sender and receiver
36
is there cumulative acks in selective repeat
no each packet must be acked individually
37
how many timers are there in selective repeat
one for each unacked packet
38
why is having one timer per packet in selective repeat more efficient
if a timeout occurs, only the unacked pack needs to be retransmitted
39
what does the window size depend on
the network situation
40
can out of order packets be received in go back n
no
41
what happens with out of order packets in go back n
discarded
42
can out of order packets be received in selective repeat
yes, because there is a buffer
43
what occurs on timeout on sender side in selective repeat
resend packet the timer is associated with reset the timer
44
what happens in selective repeat when the sender received an ack for a frame within the send base
mark packet as received if the seq # == send base, advance the window forward
45
what happens in selective repeat when the receiver gets a packet that is within its receive base
send an ack packet out of order = buffer in order = deliver, advance window
46
what happens in selective repeat when the receiver gets a packet that is not within its receive base
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
what is the dilemma with windows wrapping around in selective repeat
receiver see's no difference between sequence numbers some retransmissions then can be treated as new data
48
what is the dilemma with windows wrapping around in selective repeat
receiver see's no difference between sequence numbers some retransmissions then can be treated as new data
49
how can we resolve the wrap around window problem with selective repeat
about half of the sequence number typically
50
how can we resolve the wrap around window problem with selective repeat
about half of the sequence number typically
51
what does it mean to say TCP is point to point
runs only in the end systems, client and server, not the intermediate routers
52
what does MSS stand for
maximum segment size
53
what is the MSS
MTU minus 40 bytes (TCP and IP header which are 20 bytes each typically)
54
what does it mean to say that TCP is connection orientated
handshaking is required before any real data can be transmitted initialises state on both sides
55
why is there flow control in TCP
so that the sender does not overwhelm the receiver
56
in TCP the ack sent also contains
the seq # of the next byte expected from the other side
57
what does rtt stand for
round trip time
58
if the timer is shorter than the RTT what happens
much more unnecessary resending will be done as timeouts are premature
59
what happens if the timers are much longer than the RTT
slow reactions to lost segments
60
how do we estimate RTT
sampleRTT measured time from segment transmission until ack receipt(ignoring retransmissions as these do not give a true picture of RTT)
61
what is estimated RTT
average of sampleRTTs
62
why is estimatedRTT better than sampleRTT
averaging it out as there could be outliers
63
how is the timeout interval calculated
estimatedRTT + 4*DevRTT
64
what is the DevRTT
deviations of the sampleRTTs from the estimated RTT
65
what is the initial value of the timeout interval in TCP
1 second
66
how does the value of the timeout interval change when a timeout occurs
value doubles
67
what are retransmissions triggered by in TCP
timeouts duplicate acks
68
what additional services does TCP add on top of IP
pipelining cumulative ACKs single retransmission timers
69
how is sequence number deciede
byte stream number of first data byte in segment
70
how does tcp fast retransmit work
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
why is tcp fast retransmit more efficient
saves time rather than waiting for timeout
72
what is default receive buffer space
4096
73
what is the free buffer space called in receiver
receive window
74
how does the receive window help the sender not overwhelm the receiver
sender limits amount of in flight data to receivers rwnd value
75
if receiver window is full and its advertised rwnd = 0, and no data to send from the sender side, what happens
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
how does the sender know the size of the receiver window in TCP
the receiver advertises the free buffer space in the TCP header
77
what is a handshake
agree to establish connection agree on connection parameters such as buffer space on each side, ports shared and some other variables
78
what is a synbit
synchronisation bit
79
what are the steps involved in a three way handshake
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
what side must start the handshake process
client
81
what side must start the connection closing process
either
82
what is the connection closing process
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
what is a syn flood attack
attacker sends larger amounts of syn segments and handshakes never get completed these hanging connections eventually just grind down the server
84
how are syn attacks resolved
syn cookies
85
what does a syn cookie consist of
src IP address & port dest IP address & port secret seed
86
what does ISN stand for
initial sequence number
87
what is an initial sequence number the same as
syn cookies
88
how does syn cookies work
server sends syn ack nothing is allocated then on the server side until the client returns the ack segment (third part of handshake)
89
how does syn cookies stop illegitimate clients
because only legitimate clients will return the ack segment
90
what is congestion control
making sure not too many sources are sending too much data for the network to handle
91
how does congestion control differ from flow control
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
how do lost packets occur
in routers buffer overflow
93
how do long delays occur in a network
because of queueing happening at routers
94
where are long delays more of an issue
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
what is end to end congestion control
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
what protocol uses end to end congestion control
TCP
97
what is network assisted congestion control
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
what protocol uses network assisted congestion control
ATM, single bit indicating congestion in the core of the network where fast and high speeds are neede
99
what does AIMD stand for
additive increase multiplicative decrease
100
what is aimd
keep increasing congestion window by 1 until a lost is detected multiplicative decrease = cut congestion window size in half after the loss
101
what sort of behaviour will result in a aimd (if graphed)
saw tooth behaviour
102
how is the value of the size of the congestion window kept track of
a variable on each side as it is not in the header
103
what is tcp slow start
every time an ack is received , the congestion window can be increased exponentially (doubled)
104
in slow start what is the intial size of the cwnd
1 MSS
105
what is congestion avoidance in TCP
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
how is slow start threshold calculated initially
cwnd / 2