By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
TCP/IP is the foundational communication protocol suite that powers the internet and most private networks. It defines how data is packaged, addressed, transmitted, routed, and received between devices. You use TCP/IP every time you browse the web, send an email, or stream a video—it’s the invisible engine behind nearly all digital communication.
TCP/IP enables global connectivity, allowing devices from different manufacturers, operating systems, and locations to communicate reliably. Without it, modern cloud computing, IoT, remote work, and real-time applications wouldn’t exist. It’s the backbone of: - Web browsing (HTTP/HTTPS) - Email (SMTP, IMAP) - File transfers (FTP, SFTP) - Video conferencing (Zoom, Teams) - IoT devices (smart thermostats, security cameras)
Understanding TCP/IP helps you troubleshoot network issues, design scalable applications, and secure data in transit.
TCP/IP simplifies networking into 4 layers (vs. OSI’s 7). Each layer handles a specific task and passes data to the next:
Key Idea: Data moves down the stack (sender) and up the stack (receiver). Each layer adds (or removes) its own header.
192.168.1.1
2001:0db8::1
192.168.1.0/24
192.168.x.x
10.x.x.x
Example: Your home router has: - A public IP (assigned by your ISP, e.g., 203.0.113.42).- A private IP (e.g., 192.168.1.1) for your local network.
203.0.113.42
Analogy:- TCP = Certified mail (you get a receipt).- UDP = Postcard (fast, but no guarantee it arrives).
Example: When you visit https://example.com: 1. Your browser connects to example.com:443 (HTTPS).2. The server responds from its own ephemeral port (e.g., 192.168.1.1:54321).
https://example.com
example.com:443
192.168.1.1:54321
Example: Your laptop (192.168.1.100) sends a packet to 8.8.8.8 (Google DNS): 1. Checks if 8.8.8.8 is in the local subnet (192.168.1.0/24). No → sends to default gateway (192.168.1.1).2. The gateway forwards the packet to the ISP, which routes it to Google.
192.168.1.100
8.8.8.8
Your email client (e.g., Gmail) formats the message and sends it to the SMTP server (smtp.gmail.com:587).
smtp.gmail.com:587
Transport Layer (TCP)
TCP breaks the email into segments, numbers them, and ensures they arrive in order.
Internet Layer (IP)
smtp.gmail.com
172.217.3.101
Routers forward the packet across the internet using BGP (Border Gateway Protocol).
Network Access Layer (Ethernet/Wi-Fi)
Frames are transmitted as electrical signals (Ethernet) or radio waves (Wi-Fi).
At the Destination (smtp.gmail.com)
Linux/macOS:
ifconfig # or `ip a` on newer Linux
Windows:
ipconfig /all
What to look for:- IPv4 Address: Your local IP (e.g., 192.168.1.100).- Subnet Mask: Defines your subnet (e.g., 255.255.255.0 = /24).- Default Gateway: Your router’s IP (e.g., 192.168.1.1).- DNS Servers: Where your device sends domain name lookups (e.g., 8.8.8.8).
255.255.255.0
/24
ping
traceroute
Ping (checks if a host is reachable):
ping google.com # or `ping 8.8.8.8`
64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=12.3 ms
Traceroute (maps the path to a host):
traceroute google.com # or `tracert google.com` on Windows
netcat
TCP Server (listens on port 1234):
nc -l -p 1234 # Linux/macOS nc -l -p 1234 -v # Windows (verbose)
TCP Client (connects to server):
nc localhost 1234
UDP Server (listens on port 1234):
nc -u -l -p 1234
UDP Client (sends a message):
nc -u localhost 1234 echo "Hello" | nc -u localhost 1234
tcp.port == 80
dns
GET / HTTP/1.1
A google.com
192.168.1.100/16
255.255.0.0
192.168.1.1/24
bash sudo ufw allow 22/tcp # Allow SSH sudo ufw allow 80/tcp # Allow HTTP
db.example.com
iftop
nload
mtr
bash mtr google.com # Combines ping + traceroute
203.0.113.42:443
mqtt.example.com:1883
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.