Show Menu
Cheatography

TCP vs UDP Cheat Sheet by

TCP vs UDP, side by side: reliability, speed, headers, the three-way handshake, and real-world use cases — when to use each and why the exam loves asking. Answer the classic comparison questions with confidence. More free study resources at bytebarhq.com.

Side by Side

Full name
Transm­ission Control Protocol (TCP) · User Datagram Protocol (UDP)
Connection
TCP: Connec­tio­n-o­riented (handshake first) · UDP: Connec­tio­nless (fire and forget)
Reliab­ility
TCP: Guaranteed delivery, ordered, error-­checked · UDP: Best effort — no guarantees
Speed
TCP: Slower (overhead) · UDP: Faster (minimal overhead)
Header size
TCP: 20 bytes · UDP: 8 bytes
Use when
TCP: Accuracy matters · UDP: Speed matters
The head-t­o-head every Network+, Security+, and CCNA exam asks about.

The Three-Way Handshake

Step 1: SYN
Client → Server
Step 2: SYN/ACK
Server → Client
Step 3: ACK
Client → Server
Teardown
FIN → FIN-ACK → ACK
SYN flood attacks abuse this by leaving connec­tions half-open.

Use TCP When…

Web browsing
HTTP/HTTPS
Email
SMTP, IMAP, POP3
File transfer
FTP, SFTP
Remote admin
SSH, RDP
Use TCP when accuracy matters.

Use UDP When…

DNS lookups
Port 53
DHCP
Ports 67/68
Streaming / VoIP / gaming
Speed matters more than perfection
NTP / SNMP / TFTP
Ports 123 / 161 / 69
Use UDP when speed matters.

Exam Traps

"­Which is connec­tio­nle­ss?­"
UDP
SYN flood attack
Abuses the TCP handshake (half-open connec­tions)
Sequencing + ACKs
TCP uses them; UDP has neither
DNS transport
UDP for queries, TCP for zone transfers
Read the question twice — these are designed to trick you.
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Basic Cisco IOS Commands Cheat Sheet
          Cisco Switch Configuration Cheat Sheet

          More Cheat Sheets by bytebar

          Common Network Ports Cheat Sheet
          OSI Model Cheat Sheet