networking

TCP/IP Cheat Sheet: A Concise, Verified Reference for Networking Basics

A TCP/IP cheat sheet gives you fast, accurate summaries of core protocols, addressing, ports, and packet flow without extra fluff. This reference explains the four abstraction l...

Mara Ellison
TCP/IP Cheat Sheet: A Concise, Verified Reference for Networking Basics

A TCP/IP cheat sheet gives you fast, accurate summaries of core protocols, addressing, ports, and packet flow without extra fluff. This reference explains the four abstraction layers (link, internet, transport, application), key headers, common port assignments, and typical troubleshooting checks. It focuses on evergreen concepts that remain relevant across devices, operating systems, and network designs. Use this as a concise desk reference or study guide when you need reliable, implementation-agnostic networking facts.

Core Abstraction Layers and Responsibilities

The TCP/IP model is commonly organized into four logical layers, each with specific responsibilities. The link layer handles physical addressing and media access, the internet layer manages logical addressing and routing, the transport layer ensures end-to-end reliability and flow control, and the application layer supports user protocols and interfaces. This stacking approach enables modular design, where each layer relies on services from the layer below while providing clear services to the layer above.

Layer Scope and Common Protocols

At the link layer, Ethernet, Wi‑Fi (802.11), and PPP define frames, MAC addresses, and error detection for a single network segment. The internet layer uses IP (IPv4 and IPv6) for addressing and routing, with ICMP for diagnostics and IGMP for multicast membership. The transport layer provides either reliable, ordered delivery via TCP or best‑effort, low‑latency datagrams via UDP. The application layer includes HTTP, DNS, SMTP, and SSH, which directly serve user and program needs.

IP Addressing and Subnetting Essentials

IP addressing assigns unique identifiers to interfaces, enabling global reach across heterogeneous links. IPv4 uses 32‑bit addresses expressed in dotted decimal, while IPv6 uses 128‑bit addresses represented as hex groups separated by colons. Subnetting divides larger address spaces into smaller domains using a network prefix, improving efficiency and security. Tools and tables help confirm mask bits, address ranges, and valid host counts for each subnet.

IPv4 Private Address Blocks and Address Types

  • 10.0.0.0/8 — single large private block for internal use
  • 172.16.0.0/12 — contiguous set of 16 private blocks
  • 192.168.0.0/16 — commonly used in home and small office networks

Public addresses are globally routable, private addresses are non‑routable on the public Internet, and link‑local addresses (IPv4 169.254.0.0/16, IPv6 fe80::/10) support communication only within the local segment.

Key Transport Protocols and Port Usage

TCP provides reliable, connection‑oriented delivery with sequencing, acknowledgments, retransmission, and congestion control. UDP offers minimal overhead, suitable for latency‑sensitive applications that tolerate loss. Well‑known ports (0–1023) are assigned by IANA; registered ports (1024–49151) can be used under IANA coordination, and dynamic/private ports (49152–65535) are typically chosen ephemerally by clients.

Common Service Ports Reference

Protocol Port Direction Description
TCP 22 Server SSH
TCP 80 Server HTTP
TCP 443 Server HTTPS
UDP 53 Bidirectional DNS
UDP 67/68 Client/Server DHCP

Packet Flow and Connection Patterns

A typical TCP connection begins with a three‑way handshake (SYN, SYN‑ACK, ACK) to synchronize sequence numbers before data transfer. During the session, protocols handle fragmentation, reassembly, flow control, and error recovery, then terminate via a four‑way teardown. UDP datagrams are independent, with no handshake or guaranteed delivery, making them lightweight but unreliable. Understanding these patterns helps clarify where retransmissions, delays, or drops can occur.

Connection Mode Comparison

  • TCP — connection‑oriented, reliable, ordered delivery
  • UDP — connectionless, best‑effort, low latency
  • ICMP — used for diagnostics and control (e.g., ping, traceroute)

Header Information and Key Fields

Each layer adds headers that carry addressing, control, and sequencing information. The IPv4 header includes source and destination addresses, time‑to‑live, protocol number, and a header checksum. The IPv6 fixed header removes options from the base header and uses flow label, next header, and hop limit fields. TCP and UDP headers specify source and destination ports, sequence and acknowledgment numbers (TCP), and length or checksum fields.

Essential Header Comparisons

Header Key Fields Transport Behavior
IPv4 Source/Dest IP, TTL, Protocol Best‑effort, connectionless
IPv6 Source/Dest IP, Flow Label, Hop Limit Best‑effort, connectionless
TCP Source/Dest Port, Seq/Ack, Flags Reliable, connection-oriented
UDP Source/Dest Port, Length, Checksum Unreliable, connectionless

Troubleshooting and Verification Techniques

Practical checks start with confirming link status, IP configuration, and reachability. Verify interface IPs and subnet masks, test default gateway reachability, and confirm DNS resolution. Use ping for basic IP-level replies, traceroute for path discovery, and examine TCP or UDP port behavior with tools that can probe specific services. Packet capture and logs help isolate where drops, retransmissions, or misconfigurations occur, enabling precise fixes rather than trial‑and‑error.

Quick Verification Checklist

  • Check interface IP, netmask, and default gateway
  • Ping the default gateway and a public address
  • Confirm DNS resolution (A/AAAA records)
  • Use traceroute to identify where paths fail
  • Inspect application logs and firewall rules

Common Misconceptions and Clarifications

Some assume TCP always means “fast” or that “pinging” proves full service availability, but TCP behavior depends on paths, middleboxes, and application‑level readiness. NAT and firewalls alter IP and port visibility, which can complicate troubleshooting. IPv6 coexists with IPv4 on many networks, and dual‑stack behavior affects reachability and MTU considerations. Understanding how transport and network layers interact clarifies where failures actually occur and what tools reveal the root cause.

Clarified Points

  • Ping success indicates IP reachability but not application listening ports
  • TCP retransmissions can stem from congestion, drops, or protocol limits
  • NAT affects end‑to‑end tracing and complicates troubleshooting

Related Reading

More pages in this topic cluster.

AT&T Smart Hub: what it is, how it works, and how it fits your connectivity

The AT&T Smart Hub is a centralized networking solution designed to manage and extend connectivity across homes and small offices. As a long‑term profile in the evolution of f...

Read next
How to Check If a Port Is Open

To check if a port is open, use built-in command-line tools such as telnet , Test-NetConnection (PowerShell), nc (netcat), nmap , or curl . On most systems, you can run a local...

Read next
How to Find the DNS Server Closest to You for Faster, More Reliable Resolution

"Closest DNS to me" refers to a Domain Name System resolver that minimizes network distance and latency between your device or network and the DNS server, typically measured in...

Read next