TCP UDP
Transport layer (4)
16-bit source & destination ports
Multiplex and segment outgoing stream of data from apps (ie. ports) to IP.
Demultiplex incoming packets from IP to apps via ports.
Transmission Control Protocol User Datagram Protocol
PDU: segment PDU: datagram
IP protocol field: 6 IP protocol field: 17
reliable unreliable
guaranteed delivery not guaranteed delivery
Corrects: missing, out-of-order, duplicated, and corrupted segments
connection-oriented connectionless
high overhead. heavyweight value-added to IP low overhead. lightweight port wrapper on top of IP
20 byte header 8 byte header
bidirectional connection Establishment (3-way handshake) & teardown unidirectional
Acknowledgments: sequence & ack numbers. timeouts & retransmission
flow & congestion control: sliding window
checksum optional (unused?) checksum
"file transfer" stuff real-time streaming & short request/response stuff
accuracy speed
web, email, remote login, ftp, buffered stream DNS query, SNMP, DHCP. Real-time audio & video