TCP vs UDP Flashcards
Stands for?
TCP - Transmission Control Protocol
UDP - User Datagram Protocol
Connection
TCP - connection-oriented
UDP- connectionless
Function
TCP - establishes connection, then sends 1 message at a time
UDP - one program can send a bunch of packets to another, –> end of relationship
Usage
TCP - high reliability, less concern with transmission time
UDP - fast, efficient transmission (i.e. games). Servers that answer small queries from a bunch of clients
Examples
TCP -
HTTP, FTP, SMTP, Telnet
UDP -
DNS, SNMP
ORdering of data packets
TCP - rearranges data packets in specified order
UDP - no order, all packets are independent of each other.
Ordering done by application layer
speed of transfer
TCP - slower
UDP - fast, b/c no error checking
Reliability
TCP - absolute guarantee that data is received intact and arrives in order
UDP - no guarantee that packets sent will be received at all
Header size
TCP - 20 bytes
UDP - 8 bytes
Streaming of data
TCP - Data is read as byte stream. Receiver has no indication of segment boundaries
UDP - Packets sent individually, definite boundaries, and checked for integrity only if they arrive
weight
TCP - heavy weight. Requires 3 set-up packets before any user data is sent.
Handles reliability and congestion control
UDP - lightweight. no ordering of messages, no tracking connections
data flow control
TCP - yes.
UDP - no
Error checking
TCP - yes, with recovery
UDP - yes, but no recovery options
Acknowledgement
TCP - yes
UDP - no
Handshake
TCP -
SYN, SYN-ACK, ACK
UDP- none (connectionless)