Network Protocol
A network protocol is a set of agreed rules that governs how devices exchange data: the format of messages, the order in which they are sent, how errors are handled, and what each side must do on receiving them. Two machines built by different companies can interoperate only because both follow the same published protocol, much as two people can converse only if they share a language and conversational etiquette.
Protocols are not used alone but stacked in layers, each solving one problem and hiding its details from the layers above. A web request, for instance, is produced by an application protocol, delivered reliably by a transport protocol, routed by a network protocol and finally pushed onto the wire by a link protocol. As data moves down, every layer wraps it with its own header, a process called encapsulation, and the receiving machine unwraps the headers in reverse. Layering is what allows a browser to be written without knowing whether the bytes will travel over Wi-Fi, Ethernet or a cellular link, and lets any one layer be replaced without disturbing the others.
Protocols on the Internet are defined in public documents called RFCs (Requests for Comments), a series begun in 1969 by Steve Crocker during the ARPANET project. The Internet Engineering Task Force develops most of them through open discussion and running code, and each is numbered permanently: RFC 791 defines IP, RFC 768 UDP, RFC 793 the original TCP, and RFC 1035 the Domain Name System. A revised protocol gets a new RFC that obsoletes the earlier one instead of editing it. Because anyone can read the specification, independent implementers in different countries and companies produce software that interoperates, which is the practical reason the Internet could grow without a single owner.
Two layered models dominate discussion, and they are often confused. The OSI reference model, standardized by ISO in the 1980s, divides networking into seven layers and became the standard teaching vocabulary, which is why people say "layer 2 switch" or "layer 7 load balancer." The TCP/IP model, descended from the work of Vint Cerf and Robert Kahn in the 1970s and adopted across the ARPANET on 1 January 1983, has four layers: link, internet, transport and application. The real Internet runs the TCP/IP suite, not OSI's own protocol stack, and the real-world layers do not map neatly: TLS, for example, sits awkwardly between transport and application.
A protocol specifies behavior, not an implementation, and its design involves trade-offs such as reliability against latency, simplicity against features, and openness against security. Text protocols like HTTP/1.1 are easy to read and debug; binary protocols like HTTP/2 are compact and faster to parse. Some are stateful, tracking a connection, while others are stateless, treating each message independently. A common pitfall is to treat a protocol name as a product: "TCP" or "HTTP" is a contract about messages, and many different programs can implement it, with subtle incompatibilities that tools such as packet captures in Wireshark are used to diagnose. In modern machine learning clusters, protocol choice matters as well, since collective communication libraries depend on high-throughput transports over Ethernet or InfiniBand.
Read a network protocol as a shared contract for conversation: a published specification of message formats and rules, stacked in layers so that each solves one problem, which is how unrelated machines can cooperate without ever knowing each other's insides.