Transport Layer Flashcards
what are the two transport layer protocols
tcp
udp
which is more reliable tcp or udp
tcp
why are tcp packets sent in order
needs to be assembled in a particular order
what services are not available in the internet transport layer protocols
delay guarantees
bandwidth gaurantee
what type of services use TCP
email, web
because they require that every bit of data which was transferred from the sender to reach the receiver
what types of services use UDP
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
what is multiplexing
handling data from multiple sockets
what is demultiplexing
using header info to deliver received segments to the correct socket
how many addresses does the typical host have
3 addresses
how does demultiplexing work
host uses source ip address, destination ip address and port numbers to direct segment to appropriate socket
what is the 4-tuple that a TCP socket can be identified by
source ip address
source port number
destination ip address
destination port number
example of a server supporting many simultaneous TCP sockets
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
what does UDP stand for
user datagram protocol
what does it mean when we say that udp is connectionless
no handshaking between udp sender and receiver
each udp segment handles independently of others
why is there no connection establishment in udp
connection establishment adds delay
why is there a udp
- simple (no connections)
- small header size
- no congestion control
what does it mean if the underlying channel is completely reliable
no bit errors
all arrives at the end in exact sequence sent
no loss of packets
what can cause bit errors
noise on the line
how to recover from bit errors
- checksum
- negative acks
what is a negative ack
receiver explicitly tells sender that the packet had erros
with no timers, what happens if an ack/nack is corrupted
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
in protocol with no timers, how can duplicate packets be handled
sequence numbers
receiver can discard packets with duplicate sequence number
how could a protocol avoid nacks
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
approach for channel where packets can get lost
use timers
how are duplicates handled in protocols with timers
with seq #, duplicates are discarded
what is the round trip time
time taken to transmit packet and receive ack for this packet
what is pipelining
multiples packets can be in flight, yet to be acknowledged
two forms of pipelined protocols
go back n
selective repeat
how does the utilization increase as the number of packets allowed in the pipeline increase
exponentially
why can we not have an indefinite amount of packets allowed in the pipeline
buffering problems
overwhelming the network
what end points have a buffer in the go back n protocol
just sender
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
in go back n, what does the timer represent
the oldest un acked pacl
if the timer expires in go back n, what happens
all the packets in the window (unacked) are retransmitted
which endpoints have buffers in selective repeat
both sender and receiver
is there cumulative acks in selective repeat
no each packet must be acked individually
how many timers are there in selective repeat
one for each unacked packet
why is having one timer per packet in selective repeat more efficient
if a timeout occurs, only the unacked pack needs to be retransmitted
what does the window size depend on
the network situation
can out of order packets be received in go back n
no
what happens with out of order packets in go back n
discarded
can out of order packets be received in selective repeat
yes, because there is a buffer