# Network Protocols Overview

> A network protocol is an agreed-upon set of rules governing how devices format, transmit and interpret data, including how a conversation starts, ends and handles errors. Protocols are layered so each does one job: IP handles addressing and routing, TCP and UDP handle delivery, DNS handles naming, and HTTP handles web traffic.

Canonical: https://devsunite.com/resources/core-subjects/computer-networks/network-protocols
Last updated: 2026-11-22

Subject: Computer Networks · Category: OSI Models · 3 min read

A network protocol is a formally defined set of rules that devices agree to follow so they can understand each other's data, covering things like message format, how a conversation is initiated and closed, and how errors are handled. Different protocols exist because different jobs, addressing, reliable delivery, naming, security, each need genuinely different rules.

## Why protocols are layered

No single protocol handles everything from raw electrical signals up to a finished webpage; instead, each protocol handles one specific job and hands off to another protocol for the next job, which is exactly the layering idea both the OSI and TCP/IP models describe. This separation of concerns means a protocol can be upgraded or swapped (IPv4 to IPv6, for instance) without necessarily needing to redesign every other protocol layered above or below it.

## Protocols by rough job

**Addressing and routing:** IP (IPv4/IPv6) identifies devices and routes data between networks.

**Reliable/unreliable delivery:** TCP guarantees ordered, reliable delivery; UDP delivers fast with no guarantees.

**Naming:** DNS translates human-readable domain names into IP addresses.

**Application-level communication:** HTTP/HTTPS for web traffic, SMTP for sending email, FTP for file transfer, each defining exactly how that specific kind of application data should be requested and formatted.

**Local address resolution:** ARP resolves IP addresses to MAC addresses on a local network.

**Automatic configuration:** DHCP automatically assigns IP addresses and network settings to joining devices.

## A worked example

Loading `https://example.com/page` in a browser actually involves a whole stack of protocols cooperating: DNS resolves `example.com` to an IP address; TCP establishes a reliable connection to that IP address (on port 443); TLS (used by HTTPS) encrypts the connection; HTTP defines the actual request format ("GET /page") and response format; and underneath all of that, IP handles addressing and routing the packets, while the Data Link and Physical layers handle the actual local delivery and physical transmission. Each protocol does exactly one job and relies on the others to do theirs.

## Where this matters in real systems

This layered, "each protocol does one job" design is precisely why the internet has been able to evolve incrementally over decades rather than needing a complete redesign: IPv6 could be introduced without changing HTTP at all, and HTTP/2 and HTTP/3 could improve the application layer's efficiency without changing how IP addressing or routing work underneath. Real production troubleshooting almost always involves figuring out which protocol layer a problem is actually happening at, a "can't resolve the domain" problem is a DNS-layer issue, while a "connection times out" problem is more likely at the TCP or IP layer, and each requires a completely different diagnostic approach.

## What interviewers actually ask about network protocols

- **"What is a network protocol, in one sentence?"** An agreed-upon set of rules that devices follow to format, transmit, and interpret data so they can understand each other.
- **"Why are network protocols layered instead of being one big protocol?"** Layering lets each protocol focus on one specific job and be upgraded or replaced independently, without requiring a redesign of every other layer.
- **"Name a protocol responsible for naming, and one responsible for reliable delivery."** DNS handles naming (translating domain names to IP addresses); TCP handles reliable, ordered delivery.
- **"How would you start diagnosing 'the website won't load'?"** Identify which protocol layer is likely failing first, DNS resolution failing looks and behaves differently from a TCP connection timing out, and each points toward a different root cause.

## Key takeaways

- A network protocol is an agreed-upon set of rules for formatting, transmitting, and interpreting data between devices.
- Protocols are layered so each one handles a specific job (addressing, delivery, naming, application data) independently.
- This layering is why the internet can evolve incrementally, upgrading one protocol (like IPv4 to IPv6) without redesigning the others.
- Real troubleshooting often starts by identifying which protocol layer a failure is actually occurring at.

## Related

- [Previous: IPv4 Addressing (Classes, Subnet Masks)](https://devsunite.com/resources/core-subjects/computer-networks/ipv4-addressing)
- [Next: ARP Protocol](https://devsunite.com/resources/core-subjects/computer-networks/arp-protocol)
- [More in OSI Models: The OSI Model](https://devsunite.com/resources/core-subjects/computer-networks/osi-model)
- [More in OSI Models: The TCP/IP Model](https://devsunite.com/resources/core-subjects/computer-networks/tcp-ip-model)
- [More in OSI Models: ICMP Protocol](https://devsunite.com/resources/core-subjects/computer-networks/icmp-protocol)
- [All 101 Computer Networks interview questions](https://devsunite.com/resources/core-subjects/computer-networks)
