In this tutorial you are going to learn about Point to Point Protocol in Computer Networks. You will know about the byte-oriented protocol, the frame format of PPP and the character stuffing or byte stuffing in PPP.
Byte-Oriented Approach
We know the byte-oriented protocol simply views the frame as a collection of bytes or characters and that's why, it is also called as character oriented approach.
We have basically three protocols:
- BISYNC - Binary Synchronous Communication Protocol
- PPP - Point-to-Point Protocol
- DDCMP - Digital Data Communications Message Protocol
Here, we are going to talk about PPP, which is the Point-to-Point Protocol.
PPP
Point-to-Point protocol is a data link layer protocol and to be precise, this is a wide area network protocol. PPP is a WAN protocol which is commonly run over Internet links. Whenever we say Internet links, it means between two routers PPP protocol is widely used. So we can also say that it is a WAN protocol.
Basically PPP has two main usages. This protocol is widely used in broadband communications having heavy loads and high speeds and obviously, Internet is the area where it has heavy load and high speeds. At the same time, it is also used to transmit multiprotocol data between two directly connected computers to be precise, point-to-point devices. Point-to-point devices means, between two routers, PPP is widely used because it is not a simple LAN protocol like Ethernet, PPP is a WAN protocol.
PPP - Frame Format
The frame format of PPP includes, the starting is the flag, which is of eight bits. Then comes the address, which is eight bits. Then comes the control field, which is eight bits. Then the protocol part, which is 16 bits. And then the payload part, which is a variable length payload and whatever we receive from the upper layer, that is the network layer will be there in the payload part. And then comes the checksum, which is of 16 bits and finally, the flag sequence which is the end sequence.
In the format of PPP, we can see the flag appears in the starting of the frame and in the ending of the frame. The flag is the beginning sequence as well as the ending sequence.
PPP Frame Format in Detail:
Flag - The frame format of PPP starts with the flag. The flag which is of one byte, one byte means eight bits. We know there are two flags, one is in the beginning and the other one is at the end. This one byte information marks the beginning and end of the frame. The pattern of the flag is just like the HDLC - 01111110 and this is what is the starting and the ending sequence.
Address - This is a one byte information, which is normally said to be all ones, in case of broadcast. We know this is also of eight bits and it is a one byte information.
Control - This is a one byte information and set to a constant value as 11000000.
Protocol - This protocol part can be one or two bytes of information, one byte means eight bits, or two bytes means 16 bits. It can be 16 bit information that defines the type of data contained in the payload field. So in the payload field, it knows what type of data or what type of protocol is used and that kind of information is provided in the protocol part. So, this is a new field that is introduced in PPP format.
Payload - It is a variable length payload which carries the data from the network layer. The maximum length of the payload is 1500 bytes. However, this may be negotiated between the endpoints of the communication. Say, in a WAN protocol, the negotiation can happen between two routers and these two routers are going to decide upon what is the maximum length of the payload.
Checksum - It is 16 bits or two bytes. In the bit-oriented protocol HDLC, we have seen CRC technique as the error detection technique. In BISYNC also we have seen CRC as the error detection technique. In PPP, it uses checksum. It is also known as Internet checksum.
But there is a problem here. The sequence of the flag, that is 01111110 and the ending sequence is also the same, that can appear in the data part. So, this is going to be overcome with the help of character stuffing or byte stuffing because PPP is a byte oriented protocol.
Character Stuffing
We know that the flag sequence may appear in the payload part. So it has to be handled. So, we are going to add one extra byte of information to handle the situation.
Byte stuffing or character stuffing in PPP is the process of adding one extra byte, whenever a flag sequence appears in the payload. If we see the flag sequence which is 01111110, if it is appearing in the payload, one extra byte of information is added just to enable the receiver to understand that it is not the ending sequence. So, the receiver can construct the frame by just removing this extra byte. And this frame can be exactly like the frame it was created by the sender.
This article on Point to Point Protocol in Computer Networks is contributed by Rajnish Kumar. If you like TheCode11 and would like to contribute, you can also write your article to us. Here is our mail id - thecode11info@gmail.com