Network protocols are standardized rules that define how data is formatted, transmitted, received, and acknowledged between devices on a network.
TL;DR A network protocol is a set of rules that two or more devices follow to communicate. Without protocols, devices from different manufacturers running different software could not exchange data reliably. The internet runs on a layered stack of protocols: IP routes packets (Layer 3), TCP ensures reliable delivery (Layer 4), TLS encrypts the connection (Layer 6), and HTTP transfers web content (Layer 7). Every time you load a webpage, at least four protocols operate simultaneously to deliver it.
What is a network protocol?
A network protocol is a formal set of rules and conventions that defines how data is formatted, transmitted, addressed, routed, and received between two or more devices on a network.
Protocols exist because networks connect devices from different manufacturers, running different operating systems and software. Without agreed-upon standards, a request from a Chrome browser on macOS could not be understood by an Apache server running Linux. Protocols create a common language that every device on the internet speaks.
Every network protocol specifies:
- The format of messages (headers, fields, encoding)
- The sequence of exchanges (handshake, request/response, teardown)
- Error handling (what to do when a packet is lost or corrupted)
- Addressing (how to identify source and destination)
Protocols by OSI layer
Every protocol operates at a specific layer of the OSI model. Protocols at higher layers rely on services provided by lower layers.
| OSI Layer | Layer name | Key protocols | What they do |
|---|---|---|---|
| 7 | Application | HTTP, HTTPS, DNS, FTP, SMTP, SSH | User-facing data exchange |
| 6 | Presentation | TLS/SSL | Encryption, encoding, compression |
| 5 | Session | — | Session management (mostly folded into TCP/TLS) |
| 4 | Transport | TCP, UDP | End-to-end delivery, ports, reliability |
| 3 | Network | IP (v4, v6), ICMP, BGP, OSPF | Addressing, routing, packet forwarding |
| 2 | Data Link | Ethernet, Wi-Fi (802.11), ARP | Node-to-node transfer, MAC addressing |
| 1 | Physical | — | Cables, fiber, radio signals |
The most important protocols
IP — Internet Protocol (Layer 3)
IP is the foundation of the internet. Every device has an IP address. IP routes packets from source to destination across interconnected networks.
- IPv4: 32-bit addresses (e.g.,
192.168.1.1). ~4.3 billion possible addresses, now exhausted. - IPv6: 128-bit addresses (e.g.,
2001:db8::1). ~340 undecillion addresses. Gradually replacing IPv4.
IP is connectionless and unreliable by design — it delivers packets on a best-effort basis, with no guarantee of arrival or order. Reliability is handled by upper-layer protocols like TCP.
TCP — Transmission Control Protocol (Layer 4)
TCP provides reliable, ordered, error-checked delivery of data between two applications. Before data flows, TCP establishes a connection via the three-way handshake (SYN → SYN-ACK → ACK).
TCP guarantees:
- Delivery — lost packets are retransmitted.
- Order — packets are reassembled in the correct sequence.
- Error checking — corrupted packets are discarded and retransmitted.
TCP is used for HTTP/HTTPS, email (SMTP/IMAP), file transfer (FTP), and SSH — any application where data integrity matters.
UDP — User Datagram Protocol (Layer 4)
UDP sends packets without establishing a connection and without guaranteeing delivery, order, or error correction. This makes UDP faster than TCP with significantly lower overhead.
UDP is used for: DNS queries, video streaming, VoIP, online gaming, and QUIC (which powers HTTP/3).
| TCP | UDP | |
|---|---|---|
| Connection | Connection-oriented (handshake required) | Connectionless |
| Reliability | Guaranteed delivery, order, error correction | Best-effort, no guarantees |
| Speed | Slower (overhead for reliability) | Faster (low overhead) |
| Use cases | HTTP, HTTPS, SMTP, SSH, FTP | DNS, video streaming, VoIP, gaming |
HTTP / HTTPS (Layer 7)
HTTP (Hypertext Transfer Protocol) is the protocol for transferring web content. A client sends an HTTP request; the server returns an HTTP response.
HTTPS is HTTP over TLS — every HTTP exchange is encrypted and authenticated. HTTPS uses port 443. HTTP uses port 80.
HTTP versions:
- HTTP/1.1 (1997): persistent connections; one request per connection at a time.
- HTTP/2 (2015): multiplexing; multiple requests over a single connection; header compression.
- HTTP/3 (2022): runs over QUIC (UDP); eliminates TCP head-of-line blocking; built-in TLS 1.3.
DNS — Domain Name System (Layer 7)
DNS translates domain names to IP addresses. Every HTTP request begins with a DNS lookup. A typical DNS lookup takes 20–120ms. Subsequent lookups to the same domain are served from cache in under 1ms.
DNS uses UDP port 53 for queries. DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt queries for privacy.
TLS — Transport Layer Security (Layer 6)
TLS encrypts data in transit, authenticates the server’s identity, and ensures data integrity. TLS 1.3 (2018) completes the handshake in one round-trip (1-RTT), reducing connection setup latency by 30–50ms compared to TLS 1.2.
Every HTTPS connection uses TLS. TLS is also used by SMTPS, IMAPS, and gRPC.
ICMP — Internet Control Message Protocol (Layer 3)
ICMP is used for network diagnostics and error reporting. The ping command sends ICMP echo requests and measures round-trip time. The traceroute command uses ICMP (or UDP) to map the path packets take across a network.
ICMP does not carry application data — it carries network control messages.
DHCP — Dynamic Host Configuration Protocol (Layer 7)
DHCP automatically assigns IP addresses, subnet masks, default gateways, and DNS server addresses to devices joining a network. When your laptop connects to Wi-Fi, DHCP assigns it an IP address within seconds.
BGP — Border Gateway Protocol (Layer 4/7)
BGP is the routing protocol that connects autonomous systems (AS) — the independent networks that make up the internet. BGP routers exchange reachability information and make path-selection decisions based on policies. BGP is what makes the internet a network of networks.
How protocols work together: loading a webpage
When you type https://azion.com and press Enter, at least 5 protocols work together:
- DNS (UDP/Layer 7) — Resolves
azion.comto an IP address. - TCP (Layer 4) — Establishes a reliable connection to port 443 (three-way handshake).
- TLS (Layer 6) — Encrypts the connection and authenticates the server (TLS 1.3 handshake: 1 round-trip).
- HTTP/2 or HTTP/3 (Layer 7) — Sends the GET request; server returns HTML, CSS, and JavaScript.
- IP (Layer 3) — Carries all the above packets across the internet from your device to the server and back.
Frequently asked questions
What is a network protocol in simple terms? A network protocol is a set of rules that devices agree to follow when communicating. It defines the format of messages, the order of exchanges, and how errors are handled — so that devices from different manufacturers can understand each other.
What is the difference between TCP and UDP? TCP is reliable — it guarantees packet delivery, order, and error correction, but adds overhead. UDP is fast and lightweight — it sends packets without guaranteeing delivery, order, or error correction. Use TCP when data integrity matters (web, email). Use UDP when speed matters more than reliability (DNS, video, gaming).
What protocol does the internet run on? The internet primarily runs on the TCP/IP protocol suite: IP for addressing and routing (Layer 3), TCP or UDP for transport (Layer 4), and application-layer protocols like HTTP, DNS, and TLS (Layers 6–7). BGP connects the individual networks (autonomous systems) that make up the internet.
What is the difference between HTTP and HTTPS? HTTP transmits data in plaintext — anyone intercepting the connection can read it. HTTPS is HTTP over TLS, which encrypts all data in transit and authenticates the server’s identity. All modern web browsers require HTTPS and warn users about HTTP connections.
What does “port” mean in network protocols? A port is a numeric identifier (0–65535) that tells a device which application or service a network packet is destined for. Port 80 is HTTP, port 443 is HTTPS, port 53 is DNS, port 22 is SSH. IP routes packets to the right device; ports route packets to the right application on that device.
What is the difference between a protocol and a standard? A protocol defines how communication works (the rules and message formats). A standard is a formal document that specifies a protocol, often published by organizations like IETF (RFCs), IEEE, or ISO. For example, TCP is a protocol; RFC 793 is the standard that formally defines it.
Why are there so many protocols? Different communication needs require different trade-offs. TCP prioritizes reliability; UDP prioritizes speed. DNS solves name resolution; DHCP solves address assignment. Each protocol is designed for a specific problem at a specific layer of the stack, and they compose to provide the full functionality of modern networks.
What is QUIC? QUIC is a transport protocol developed by Google, now standardized by IETF. It runs over UDP and integrates TLS 1.3 at the transport layer, eliminating the separate TCP and TLS handshakes. QUIC powers HTTP/3 and reduces connection setup latency by 1–2 round-trips compared to HTTP/2 over TCP+TLS.