Last updated on November 13th, 2018
A protocol is a set of rules that govern data communication. A protocol defines what is communicated, how it is communicated and when it is communicated. The key elements of a protocol are syntax, semantics, and timing.
Syntax refers to the structure or format of the data, meaning the order in which they are presented. For example, a simple protocol might expect the first eight bits of data to be the address of the sender, the second eight bits to be the address of the receiver and the rest of the stream to be the message itself.
Semantics refers to the meaning of each section of bits. How is a particular pattern to be interpreted and what action is to be taken based on that interpretation? For example, does an address identify the route to be taken or the final destination of the message?
Timing refers to two characteristics: when data should be sent and how fast they can be sent. For example, is a sender produces data at 100 Mbps but the receiver can process data at only 1 Mbps, the transmission will overload the receiver and data will be largely lost.
TCP/IP defines the flow of information from a sender to the receiver. First, application programs send packets of data to one of the Internet Transport Layer Protocols, this can either be the User Datagram Protocol (UDP) or the Transmission Control Protocol (TCP). These protocols receive the data packets from the application. After adding a receiver’s address pass the packets to the next protocol layer known as the Internet Network layer. The following figure shows the complete TCP/IP suite based on various layer distribution:
The Internet Network layer encloses the packet in an Internet Protocol (IP) datagram and passes the datagram on to the Network Interface layer.
The Network Interface layer accepts IP datagram and transmits them as frames over specific network hardware, such as a Network Interface Card or Token-Ring networks.
Frames received by a server go through the protocol layers in reverse. Each layer strips off the corresponding header information until the data is back at the application layer.
Frames are received by the Network Interface layer i.e. an Ethernet Header. The Network Interface layer strips off the Ethernet header and sends the datagram up to the Network layer. In the Network layer, the Internet Protocol strips off the IP header and sends the packet up to the Transport layer. In the Transport layer, the TCP (in this case) strips off the TCP header and sends the data up to the Application layer. The server on a network sends and receives information simultaneously. The following figure shows a Server as it communicates.