Computer Networks 05: Protocols and Standards.

A protocol is a set of rules that govern data communications. A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow to be able to communicate effectively. A protocol defines what is communicated, how it is communicated, and when it is communicated.

key elements of a protocol

The key elements of a protocol are syntax, semantics, and timing.
  • Syntax. The term 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 8 bits of data to be the address of the sender, the second 8 bits to be the address of the receiver, and the rest of the stream to be the message itself.
  • Semantics. The word 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. The term timing refers to two characteristics: when data should be sent and how fast they can be sent. For example, if a sender produces data at 100 Mbps but the receiver can process data at only 1 Mbps, the transmission will overload the receiver and some data will be lost.

Standards 

Standards offer guidelines for manufacturers, vendors, government bodies, and service providers to ensure the interconnectivity required in today's global marketplace and communications. Data communication standards are categorized into two types: de facto, which means "by fact" or "by convention," and de jure, meaning "by law" or "by regulation."
  • De facto. Standards that have not been approved by an organized body but have been adopted as standards through widespread use are de facto standards. De facto standards are often established originally by manufacturers who seek to define the functionality of a new product or technology. 
  • De jure. Those standards that have been legislated by an officially recognized body are de jure standards.

Protocol Layering

When communication is simple, we may need only one simple protocol; when the communication is complex, we may need to divide the task between different layers, in which case we need a protocol at each layer, or protocol layering.
Let us develop two simple scenarios to better understand the need for protocol layering.

First Scenario

A single-layer protocol
In a simple communication scenario, all communication happens in a single layer. For example, consider two neighbors, Maria and Ann, who communicate face-to-face in the same language. Even in this straightforward case, certain rules or protocols are followed:
  • Greeting each other upon meeting.
  • Using vocabulary appropriate to their friendship.
  • Taking turns to speak, ensuring one does not talk over the other.
  • Maintaining a dialog rather than a monolog, allowing both to contribute to the conversation.
  • Exchanging polite words when parting ways.
Different contexts require different protocols. For instance, communication between a professor and students in a lecture hall involves the professor primarily talking and students listening, with students raising their hands to ask questions.

Second Scenario

A three-layer protocol
In a more complex scenario, consider Ann taking a higher-level position in a different city, necessitating communication through regular mail. To keep their innovative business ideas confidential, Ann and Maria decide to use an encryption/decryption technique. 

This communication now involves three layers. On Marias side:
Third Layer: Maria communicates her ideas to a machine that creates the plaintext (a letter in English).
Second Layer: The plaintext is encrypted into ciphertext by another machine.
First Layer: The ciphertext is put in an envelope, addresses are added, and the letter is mailed.

On Ann’s side, the reverse process occurs:
First Layer: The letter is picked up from the mailbox, and the ciphertext is extracted.
Second Layer: The ciphertext is decrypted back into plaintext.
Third Layer: The plaintext is read as though Maria is speaking directly to Ann.

This modular approach allows tasks to be divided into smaller, simpler tasks. If Ann and Maria decide the encryption isn’t secure enough, they only need to replace the second layer machine, not all three.

Principles of Protocol Layering

First Principle
The first principle dictates that if we want bidirectional communication, we need to make each layer so that it is able to perform two opposite tasks, one in each direction. For example, the third layer task is to listen (in one direction) and talk (in the other direction). The second layer needs to be able to encrypt and decrypt. The first layer needs to send and receive mail.

Second Principle 
The second principle that we need to follow in protocol layering is that the two objects under each layer at both sites should be identical. For example, the object under layer 3 at both sites should be a plaintext letter. The object under layer 2 at both sites should be a ciphertext letter. The object under layer 1 at both sites should be a piece of mail.

After following the above two principles, we can think about logical connection between each layer as

Advantages of Protocol Layering

Modularity: Independent layers can be defined as black boxes with specific inputs and outputs. Layers can be replaced as long as the new layer provides the same outputs for the same inputs. 

Example: If Maria and Ann decide to enhance their encryption method to better protect their letters, they only need to replace the second layer machine (encryption/decryption). The first and third layers can remain unchanged as long as the new encryption machine outputs the same type of ciphertext for given plaintext and vice versa. 

Separation of Services and Implementation: Each layer receives services from the lower layer and provides services to the upper layer, without concern for how each layer is implemented.

Example: In the scenario, Maria does not need to know how the first layer machine (handling mailing and addressing) performs its tasks. As long as the first layer can handle the tasks required for communication (like putting the ciphertext in an envelope and addressing it correctly), the system works. Similarly, the encryption/decryption layer does not need to know how the first layer handles the mail delivery.

Scalability and Flexibility: Protocol layering allows networks to be scalable and flexible. Intermediate systems in a network (like routers and switches) do not need to implement all the layers used by end systems. Instead, they only need to implement the layers relevant to their function, reducing complexity and cost.

Example: In a larger network such as the internet, routers do not need to handle encryption and decryption (application layer tasks). They only need to manage data forwarding (network layer tasks). 

Post a Comment