In computer science and telecommunications , a communication protocol is an agreement according to which data transmission takes place between two or more parties. In its simplest form, a protocol can be defined as a set of rules that govern the syntax , semantics and synchronization of communication . Protocols can be implemented by hardware, software, or a combination of both. At the lowest level, a protocol defines the behavior of the connection hardware.
Protocols vary widely in purpose and complexity. Most protocols specify one or more of the following:
- Determining the underlying physical connection (e.g. LAN or W-LAN ) or the existence of the other end point of the connection
- Data flow control (handshaking)
- Agreement of the various connection characteristics
- How a message begins and ends
- How a message is formatted
- What to do with damaged or incorrectly formatted messages ( error correction procedure )
- How unexpected loss of connection is detected and what to do next
- Termination of the connection
Communication protocols are a foundation of the Internet and are essential to its performance and success. The most important are the Internet Protocol (IP) and the Transmission Control Protocol (TCP), summarized as TCP / IP . Most are described in the RFCs of the Internet Engineering Task Force (IETF) .
Only the simplest protocols are used alone; most, especially network protocols, are layered protocol stacks with the tasks listed above divided among each layer of the stack.
While a protocol stack identifies a specific combination of protocols that work together, a reference model is a software architecture that enumerates each layer along with the services it is supposed to provide. The classic seven-tier model is the OSI model , which is used to describe protocol stacks and peer units. Didactically, the reference model also offers the opportunity to teach more general concepts of software technology , such as encapsulation, modularity and delegation of tasks. This model survived, although many of its original components were replaced by the ISO . However, the OSI model is not the only reference model.