Safekipedia

Communication protocol

Adapted from Wikipedia · Discoverer experience

A communication protocol is a system of rules that helps two or more devices talk to each other. These rules decide how information is sent and received, what the messages mean, and how to fix problems if something goes wrong. Protocols can be built into machines, computers, or a mix of both.

Devices that talk to each other need to follow the same rules, just like friends need to agree on a game before they start playing. Often, these rules become official standards that everyone can use. Think of protocols like special languages that computers and devices use to understand each other.

There are many famous protocols that we use every day, like those that make the internet, web browsing, and email work. Groups like the Internet Engineering Task Force and the World Wide Web Consortium create these rules. Other groups, such as the IEEE, make standards for wired and wireless connections like Ethernet and Bluetooth. These protocols help all our devices work together smoothly.

Communicating systems

History

Further information: Protocol Wars

The word "protocol" was first used in 1967 in a report about a computer network in the United Kingdom. This report was written by Roger Scantlebury and Keith Bartlett under the guidance of Donald Davies, who helped start the idea of sending information in small pieces called "packets."

In 1969, on the ARPANET, the first network for connecting computers, a set of rules called the 1822 protocol was created. This helped computers send messages to each other. Later, in 1970, a set of rules called NCP was made to help different computer programs talk to each other over the network.

In the early 1970s, Louis Pouzin designed a network called CYCLADES. This network let the computers themselves make sure information arrived correctly, instead of relying on the network to do it. This idea helped shape later rules for the Internet.

Researchers Bob Kahn and Vint Cerf worked on a set of rules called TCP. By 1974, they had written down how it would work. Over time, these rules were changed and improved, and by 1983, they became the main way computers on the Internet talked to each other.

Concept

When devices talk to each other over a network, they follow specific rules called communication protocols. These rules decide how information is sent and received. Just like how recipes tell us how to cook, protocols tell devices how to share data.

Computers often talk using many sets of rules together, called a protocol suite. These suites help with different jobs, like moving data between apps or making sure information gets to the right place. Each part of the suite handles a different part of the conversation, making sure everything works smoothly.

Message encoding

Communication protocols decide how messages are shown when sent between devices. There are two main ways to show messages: using text or using binary code.

Text-based protocols show messages in a way that people can easily read, often using plain text like ASCII or UTF-8, or formats such as XML or JSON. These are good when people need to look at the messages, such as when fixing problems or creating new protocols.

Binary protocols use all possible values of a byte, making them better for machines to process quickly. They are used in modern standards like HTTP/2, HTTP/3, and others.

Basic requirements

When sending information between devices, a communication protocol is needed to make sure everything works correctly. This set of rules helps devices understand each other by deciding how messages should be formed, what they mean, and how to deal with mistakes.

Protocols decide how data is arranged, how devices identify each other, and how to handle missing or mixed-up messages. They also include ways to check if messages arrived safely, and what to do if parts are lost or arrive in the wrong order. This helps make sure that information is shared clearly and reliably between any devices that need to talk to each other.

Protocol design

Systems engineering ideas help us make good rules for how computers talk to each other. When we make big sets of rules, we often break them into smaller, easier pieces that work together. This makes it simpler to build and test them.

Computers that talk to each other need to share messages in the right order. One way to study how they do this is called communicating sequential processes (CSP). We can also think of these rules like steps in a machine, such as Mealy and Moore machines.

In modern designs, these rules are stacked in layers. Each layer has a special job and only talks to the layers right above and below it. This keeps things simple. The Internet uses layers like the Transmission Control Protocol (TCP) and the Internet Protocol (IP).

Another way to think about layers is like passing a message from one computer to another. The sending computer puts the message into packages, and the receiving computer unpacks them. This way, each part of the system can work on its own.

Program translation also uses layers, making it easier to build and change. The parts that handle sending and receiving messages are usually part of the computer's operating system.

Common problems in making these rules can sometimes be solved using special patterns in software design. There are also special ways to write down the rules, like Abstract Syntax Notation One and augmented Backus–Naur form.

Finite-state machine models help describe how the rules work step by step.

Protocol development

For communication to happen, we need to choose rules, called protocols. These rules can be written as steps and data arrangements. Writing these rules in a way that works on different machines and operating systems makes them more useful. When rules are made into a standard, many different devices and systems can work together.

Standards for protocols are usually made by groups that bring together experts. These groups agree to follow the rules they create, often because these rules help everyone, not just one company. Following standards helps prevent problems, like when one company changes the rules just to make it harder for others to compete.

Some rules become popular without being official standards. These are called "de facto standards." They can sometimes cause problems if they stop new companies from entering the market. But sometimes, like with Linux, these popular rules can be good because anyone can see and change them.

Important groups that help make these standards include the International Organization for Standardization (ISO), the International Telecommunication Union (ITU), the Institute of Electrical and Electronics Engineers (IEEE), and the Internet Engineering Task Force (IETF). These groups work together to create rules that many different devices can follow.

The process to make a standard usually starts with a group discussing and suggesting ideas. They talk about many details and make changes until they agree on a final rule. This rule is then shared widely and used by many different devices and systems.

One important way to organize these rules is the Open Systems Interconnection (OSI) model. It sorts rules into layers, where each layer has a special job. For example, the application layer helps programs talk to each other, while the physical layer deals with how data travels over wires. This layered approach helps make sure rules work well together and can be updated in the future.

Wire image

Main article: Wire data

The wire image of a communication protocol is what someone watching the messages can learn, even if they are not part of the conversation. This includes information that the protocol itself gives meaning to, as well as guesses the watcher might make. Things like unhidden data in the messages and timing between messages help form the wire image.

If parts of the wire image are not protected, others in between can change them, which might affect how the protocol works. Even if protected, if parts are not hidden, others might act on what they see. Sometimes, signals are left unhidden for others to see, but these can become unreliable. Balancing the need for others to manage and study the network with keeping users' information private is important. In 2014, it was announced that watching protocols widely is considered an attack because it can reveal user information, and steps are being taken to reduce this. In 2023, it was suggested that any information a protocol shares should be done on purpose, with agreement from both sides, and kept to a minimum. Controlling the wire image was still a growing area in 2023.

Ossification

Main article: protocol ossification

Protocol ossification means that network rules become rigid and hard to change. This happens because some tools between computers, called middleboxes, only understand certain types of messages and can stop others that they don’t recognize, even if those messages are correct. This breaks the idea that only the ends of a communication should check the messages.

Because of ossification, it’s hard to create new network rules or change old ones on the Internet. Often, new rules must hide inside older, well-known rules. For example, the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the main ways computers talk to each other on the Internet today. To avoid ossification, some methods include hiding important information in messages and making sure that different types of messages are used often. QUIC is a new way for computers to talk that was designed to avoid these problems.

Taxonomies

Protocols can be grouped based on how they are used and what they do. For example, some protocols work on networks that need a connection before sending data, called connection-oriented protocols, while others do not need a connection, called connectionless protocols. Another example is a tunneling protocol, which wraps data packets inside another protocol to send them over a distance.

There are also ways to organize protocols into layers. Two main layering systems are used: one by the IETF, called Internet layering or TCP/IP layering, and one by ISO, called the OSI model or ISO layering. These layering systems help us understand how different protocols work together. In network setups, the word "protocol" often means the part that moves data, while "service" means the specific tasks that use that movement, like different web activities identified by numbers called port numbers.

Related articles

This article is a child-friendly adaptation of the Wikipedia article on Communication protocol, available under CC BY-SA 4.0.