Transport Layer Flashcards
What is the transport layer?
Provides logical communication between app processes running on different hosts.
UDP and TCP
Where do transport protocols run?
In end systems, applications break messages into segments and passes it to the network layer.
Receiver then reassembles segments into messages and passes up the stack
What plex happens at the sender?
Multiplexing.
Handle data from multiple sockets, add transport header which will be used for demultiplexing
What plex happens at the receiver?
Demultiplexing.
User header information to deliver received segments to the correct socket (application)
Uses datagram IP and source/destination port to find socket.
What is the 4-tuple of a TCP socket?
Source IP
Source Port
Destination IP
Destination Port
Demultiplexer uses these to steer datagrams to correct socket.
Can run multiple sockets.
What is UDP?
User Datagram Protocol, barebones transport protocol.
Connectionless, no handshake and each segment handled independently. Sent on “best hope”
When is UDP used?
Streaming multimedia
DNS
Basically, used when loss is acceptable to the application
When is UDP reliable?
It’s never reliable in itself, but reliability can be baked in at the application layer.
Can have application-specific recovery.
What is the header of a UDP packet?
Source Port, Destination Port, length in bytes, checksum, payload
What is the benefits of using UDP?
No connection establishment overheads
Simple, no state
Small header size
No congestion control, UDP can blast packets
What does the UDP checksum do?
Detect errors in transmits
sender performs 16 bit integer hash contents and header fields and adds them together. Putting the answer in the header.
Receiver computes checksum and compares. If checksum is fine, doesn’t mean packet is fine. drops failures
Can optimise by hashing the whole file, not each packet.
What is the reliable data transfer protocol and is it enough to ensure packets make it to the other side?
No, as the underlying channel is what carries the bits - not the protocol
sender - rdt_send() - called when data passed dow, then calls udt_send() if channel unreliable - send over channel
reciver: rdt_rcv() - called on packet receipt, deliver_data() - called to pass up stack
What is a pipelined protocol?
Sender allows multiple “in-flight” yet to be acknowledged packets, with a range of sequence numbers which must be increased.
Fill gaps in the network by flingin loads of information down the pipe.
What is Go-Back-N?
Sender can have up to N unacked packets in the pipeline
Receiver only sends cumulative ack - for all packets.
Sender has timer for oldest unacked packet and retransmits when timer runs out.
window size is N long, new window is from unacked packet onwards.
What is selective repeat?
Sender can have up to N unacked packets in pipeline, and receiver acks individual packets
Sender maintains timer for each unacked packet and retransmits only that packet on timeout.
Window size of N consecutive seqs. Moves to next not yet-received pkt.
What is done with out of order packets?
Buffered while waiting for correct packets, passed up in order.