First, the receiving and sending computers must be able to coordinate their actions, to enable flow control, error control, addressing, and connection management.
Flow control manages the rate of information flow between machines (note that this may be different than the data rate of the network connecting the machines);
error control enables transmission errors to be corrected; addressing allows information to be routed to the correct destination; and
connection management is the set of functions associated with setting up and maintaining connections (where needed).
These functions are implemented through communications protocols. These protocols are a strict set of rules that both the sending and the receiving computers follow when communicating. These rules include the format of information to be sent, as well as rules defining how a machine (sender or receiver) is to behave when an event occurs. An event can be externally created (such as the occurrence of an error) or internally generated (such as a connection request). These behaviors are written into the communications software that runs in both the sender and receiver.
Generally, protocols break the information that the user wishes to send into packets. These packets normally consist of a header, the user information (message), and often a trailer. The trailer is most commonly a checksum generated by a cyclical redundancy check (CRC) coder and is used for error detection. The header carries information fields that the sender and receiver use to communicate with each other so that they can implement the necessary functions as defined by the protocol. Figure 1 is a graphical illustration of the sequence of bits that would be transmitted in a hypothetical packet.