Protocol is a set of rules or procedures for transmitting data between electronic devices, such as computers. In order for computers to exchange information, there must be a preexisting agreement as to how the information will be structured and how each side will send and receive it.
The TCP IP communication is made of 4 layers, one on top of the others as you can see here and each layer has different protocols, for instance for the Internet layer there is IP (internet protocol) and ICMP (Internet control message protocol)
Each protocol adds its information to the message in its header as you can see below
and the final message is sent to the next host according to the IP destination address till it reaches the destination host as you can see belowThe protocol is necessary for letting the receiver understanding the source information:
- the host A IP layer adds its header to the message
- the message is sent to the Router 1
- the router 1 IP layer reads the IP header of the message and it must be able to process it and to send it to the next router according on what is written on that header. All IP layers on the network all over the world must work with the same set of rule (same protocols).
Each protocol has to define several informations such as format of the addresses (source and destination), error checking, sequence control (because the information is split in several packets of fixed dimension).
Protocols are valid all over the world and are built by standard organizations such as IEEE (Institute of Electrical and Electronics Engineers), International Organization for Standardization (ISO), the International Telecommunication Union (ITU) and the Internet Engineering Task Force (IETF).