Details on the structure of PPP data frames

Source: Internet
Author: User

We have been studying network protocols for some time. Some basic concepts of PPP were explained some time ago. So here, we will introduce the format of PPP data frames. As we have said before, we can say that all home ADSL connections are established through the PPP protocol. To learn about PPP, I personally think there are three key knowledge points.

1. Format of PPP data frames;

2. Several packets of PPP;

3. PPP status transfer

The format of the PPP data frame is described first. Because PPP is a link layer protocol, we call its data unit frame

Each PPP data frame starts and ends with a mark byte. The Byte 0x7E makes it easy to distinguish each PPP frame)

A byte following the start mark is the address field, and the byte is 0xFF. We know that networks are layered and the peer layer communicates with each other, while the lower layer provides services for the upper layer. When the peer layer communicates with each other, it first needs to know the address of the other party. For different networks, the data link layer needs to know the MAC address, X.121 address, and ATM address of the other party; at the network layer, you need to know the IP address and IPX address of the other party, and at the transport layer, you need to know the protocol port number of the other party. For example, if two ethernet hosts want to communicate with each other, the sender must first obtain the MAC address of the peer. However, because the PPP protocol is applied to point-to-point links, it is not like a broadcast or multi-point access network, because point-to-point links can uniquely identify each other, therefore, the two ends of the communication device that uses the PPP protocol do not need to know the data link layer address of the other party. Therefore, this Byte has no meaning, fill the byte with the broadcast address of all 1 according to the protocol. Like the address domain, the control domain of the PPP data frame has no practical significance. According to the Protocol, both parties fill the content of this byte with 0x03. Since it is meaningless, you can assign a value at will. Haha, as long as everyone complies with a standard)

As far as the PPP protocol itself is concerned, the most important content should be its Protocol domain and information domain. The Protocol domain can be used to distinguish the content of data packets carried by the information domain in PPP data frames. The content of the Protocol domain must comply with the requirements given by the address extension mechanism of ISO 3309. This mechanism requires that the content entered by the Protocol domain must be an odd number, that is, the low-byte padding is "1", and the high-byte padding is "0 ". If the Protocol domain field of the PPP data frame sent by the sender does not comply with the above rules, the receiver will regard the data frame as unidentifiable, the receiving end will send a Protocol-Reject packet to the sending end, and the rejected packet will be completely filled at the end of the message.

The maximum length of Information Field missing time cannot exceed 1500 bytes, including the content of the filling field. The size of 1500 bytes is equal to the default value of the parameter option MRUMaximum Receive Unit configured in the PPP protocol, in practical applications, you can negotiate the maximum encapsulation length of information domains based on actual needs. If the information field is less than 1500 bytes, it can be filled, but it is not necessary. If it is filled, both ends of the communication must be able to identify useful and useless information for normal communication.

Protocol domains and information domains need to be combined. Currently, LCP, NCP, and common IP protocols are mainly used, the corresponding protocol domain fields are 0 x C021, 0x8021, and 0x0021. You can see that this sentence is true: that is to say, the minimum bytes must be 1 and the maximum bytes must be 0 ". The subsequent information contains different packet content according to different protocols.

0 × C021 LCP data packet Verification

0 × 8021 NCP data packet Verification

0 × 0021 IP data packet Verification

In fact, these three different protocols correspond to different statuses of the PPP protocol during operation. We will introduce them in the PPP status transition section in the future, we can easily determine the phase of PPP based on the protocol domain of the PPP frame. In case of PPP problems, we usually capture packets, determine which stage of PPP has problems, and then analyze and locate the problems. Note that NCP is not a protocol, and its full name is network control protocol. That is to say, the data transmission protocol followed by both parties can be IPCP or IPXCP.

The CRC verification domain mainly checks the correctness of transmission of PPP data frames. Of course, some transmission guarantee mechanisms are introduced in the data frames, we will also introduce more overhead, which may increase the latency of application layer interaction.

Finally, we will give you a PPP frame captured through Ethereal, which corresponds to the above description to see if you can understand it:

7E FF 03 C021 01 01 00 17 02 06 00 0A 00 00 05 06 00 0B 42 CB 07 02 08 02 0D 03 06 7E

As for the content in the information domain, we can further segment it and then talk about it in the PPP message.

This is how I understand and popularize the content in the book. I hope the beginner XDJM can understand it a little. It is estimated that everyone is still dreaming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.