Five PPP protocols

Source: Internet
Author: User

For the PPP protocol, five different statuses are most characteristic. So what is the relationship between its status and its application? Here we will talk about this knowledge in detail. Now let's take a look.

First, both parties are in the Link unavailable phase, and then one party initiates a link request. If you want to establish point-to-point communication through the PPP protocol, devices at either end need to send an LCP datagram to configure the link, once the Configuration Parameter options of the LCP are negotiated, the communication parties determine the authentication method used by the devices at both ends of the link based on the authentication Configuration Parameter options negotiated in the Request Message configured by the LCP. By default, the two parties do not authenticate the protocol, but directly go to the NCP Configuration Parameter option negotiation until the Several configuration processes have been completed, point-to-Point parties can start transmitting network-layer data packets through established links, and the entire Link is available. Generally, the Protocol does not require the NCP to be able to close the link only when any end receives a Link Close packet from the LCP or NCP, therefore, data packets sent during LCP negotiation or application session are usually disabled. The physical layer cannot detect the carrier or management personnel to close the link, will disconnect the link to terminate the PPP session.

The following describes the status transition of the entire PPP link process: During point-to-point link configuration, maintenance, and termination, PPP must go through the following phases:

The link is unavailable. It is also known as the physical layer unavailable phase. PPP links must start and end from this phase. Even if the two sides have physical connections, but the PPP is not activated, it can be considered unavailable.) When both sides of the Communication detect the physical line activation, the carrier signal is usually detected on the link) from the current phase to the next phase, that is, the link establishment phase ). First, let's briefly mention the link establishment phase. In this phase, the LCP Protocol needs to fill C021 in the protocol domain of the PPP frame) for Link parameter configuration, the LCP state machine at this stage also changes according to different events. When the link is unavailable, the LCP state machine is in the initial initialization State) or starting is ready to start. Once the physical line is detected to be available, the LCP state machine will change. Of course, after the link is disconnected, it will also return to this stage. In the actual process, the duration of this phase is very short, only to detect the presence of the other device.

Link establishment phase. It is the most critical and complex phase of the PPP protocol. This is done at the data link layer. This phase mainly sends configuration packets to configure the data link. These configuration parameters do not include the parameters required by the network layer protocol. After the data packet exchange is completed, it will continue to transition to the next phase, which is both the verification phase and the network layer protocol phase, in the next phase, users usually configure devices on both ends of the link. However, NAS or BAS devices are primarily used for 3A authentication, authorization, and billing) by default, the PPP module must support one authentication method in PAP or CHAP ). In this phase, the LCP status changes twice. We mentioned that when the link is unavailable, the LCP state machine is in initial or starting. When the link is detected to be available, the physical layer sends an UP event to the link layer. After the link layer receives the event, it changes the LCP state machine from the current status to the Request-Sent Request sending status ), at this time, the state machine LCP performs the corresponding action, that is, it starts to send the Config-Request message to configure the data link. No matter which end receives the Config-Ack packet, the state machine of LCP needs to change from the current state to the opened State. after entering the Opened State, the party that receives the Config-Ack packet completes the current stage and should jump to the next stage. Likewise, we can see that the other end is the same, but note that in the Link Configuration phase, the two sides are independent of each other in the Link Configuration operation process. If a non-LCP data packet is received at this stage, the packets are discarded.

Verification phase. In most cases, devices at both ends of the link need to be authenticated before entering the network layer protocol phase. By default, devices at both ends of the link are not authenticated. In this phase, two authentication methods are supported: PAP and CHAP. The authentication method is selected based on the negotiation results of both parties during the link establishment phase. I think of an episode here. I remember when I went to apply for the current company, the interviewer asked me that there are several authentication methods in the PPP verification phase. I used to know only about PPP, I know there are two types of handshakes: PAP and CHAP. I also know that PAP is two handshakes and CHAP is three handshakes. But how do I communicate? I only remember PAP, but CHAP cannot be thought of. It's a shame. In fact, chap c Represents Chanllenge, that is, the validators will first initiate a challenge: You tell me the password, this is the first handshake; then, the validators will inform the validators of the password, this is the second handshake. Finally, the validators feedback the verification result. This is the third handshake. The PAP only has the last two handshakes. In addition, the PAP password is in plain text, the CHAP password is in ciphertext, And the sao is too large. Continue, haha.) However, the link quality detection will also occur at the same time, but the Protocol does not limit the delay of the verification process. In this phase, only the Link Control Protocol, verification protocol, and quality detection data packets are supported. Other data packets are discarded. If the Config-Request message is received again at this stage, it is returned to the link establishment stage. (In fact, sometimes it is not necessary to pass the verification phase, the link is established directly into the network layer protocol phase)

Network Layer Protocol phase. Once PPP completes the previous several stages, each Network Layer Protocol IP, IPX, and AppleTalk will be configured through their respective network control protocols, and each NCP protocol can be turned on and off at any time. When an NCP state machine changes to the Opened State, PPP can start to carry packet packets at the network layer on the link. If a Config-Request packet is received in a phase, the packet is returned to the link establishment phase.

In the network termination phase, PPP can terminate the link at any time. When the carrier is lost, the authorization fails, the link quality detection fails, and the Administrator manually closes the link, the link is terminated. During the link establishment phase, the link may be closed by switching the LCP link termination message. When the link is closed, the link layer notifies the network layer to perform corresponding operations and forces the link to be shut down through the physical layer. For the NCP protocol, there is no and no need to close the PPP link. In addition to the unavailable phase, any status of the PPP protocol can immediately enter the network termination phase)

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.