An agreement that governs the procedures used to exchange information between cooperating entities. More specifically, a protocol is such an agreement operating between entities that have no direct means of exchanging information, but that do so by passing information across a local interface to so-called lower-level protocols, until the lowest, physical, level is reached. The information is transferred to the remote location using the lowest-level protocol, and then passes upward via the interfaces until it reaches the corresponding level at the destination. In general, a protocol will govern the format of messages, the generation of checking information, and the flow control, as well as actions to be taken in the event of errors.
A set of protocols, governing the exchange of information between (physically remote) communicating entities at a given level, and the set of interfaces governing the exchange between (physically adjacent) protocol levels, are collectively referred to as protocol hierarchy or a protocol stack.
See also seven-layer reference model.