Workflow and state of PPP protocol __ Computer Network Basics

Source: Internet
Author: User
Tags ack
Workflow and status of PPP protocol 1. Workflow of PPP protocolWhen a user dials into the ISP, a physical connection is established from the user's PC to the ISP. Then the user PC sends a series of LCP packets to the ISP (encapsulated in multiple PPP frames) to establish the LCP connection. These groupings and their responses select some of the PPP parameters that will be used. Then there is the network layer configuration, the NCP assigns a temporary IP address to the newly accessed user PC. In this way, the user PC becomes an IP address host on the Internet. When the user has finished communicating, the NCP frees the network layer connection and reclaims the IP address that was originally assigned. The LCP then releases the data link layer connections. Finally, the connection to the physical layer is released.

Note: The starting and ending state of the PPP link is always the "link-static" state, when there is no physical layer connection between the PC and the ISP's router (Dead). 2. LCP Connection of PPP protocol when a user's PC calls the router via a modem (usually by clicking a connection button on the screen), the router can detect the carrier signal that the modem emits. Once the two sides have established a physical layer connection, PPP enters the link establish state, which is designed to establish a link-layer LCP connection. At this point, the LCP begins to negotiate some configuration options, that is, the configuration request frame (configure-request) where the LCP occurs. This is a PPP frame whose protocol field is the code for the LCP, and the Information field contains a specific configuration request.The other end of the link can send one of the following responses:
(1) configuration confirmation Frame (configure-ack):All options are accepted.
(2) Configure the Deny frame (Configure-nak):All options are understandable but not acceptable.
(3) Configure reject Frames (Configure-reject):Options are unrecognized or unacceptable and need to be negotiated. The LCP configuration options include the maximum frame length on the link, the specification of the authentication Protocol (authentication protocol) used (if any), and the address and control fields in the PPP frame are not used (because the values of the two fields are fixed and without any amount of information, You can omit these two bytes in the header of a PPP frame. After the negotiation, the two sides established the LCP link, and then entered the authentication State (authentication), in which only the packet of the LCP protocol was allowed, the grouping of the authentication protocols and the grouping of the quality of the link were detected. If you use the Password Authentication protocol pap (Password authentication Protocol), the party that initiates the communication needs to send an identity identifier and password. The system can run the user to retry several times. If you need better security, you can use more complex Password Handshake Authentication protocol CHAP (CHALLENGE-HANDSHAKE authentication Protocol). If authentication fails, go to link termination status (link Dead). If successful, enter the Network Layer protocol status (Network-layer Protocol).3. NCP connection of PPP protocolAt the network Layer protocol state, the network control protocol NCP at both ends of the PPP link exchanges the network layer specific network control groupings according to the different protocols of the network layer. This step is very important, because today's routers can support a variety of network layer protocols at the same time.In short, the network layer at both ends of the PPP protocol can run different network layer protocols, but can still communicate using the same PPP protocol. If you are running an IP protocol on a PPP link, configuring the IP Protocol module (such as assigning an IP address) at each end of the PPP link uses the Protocol--ip Control Protocol IPCP (IP controls Protocol) in the NCP that supports IP. IPCP groupings are also encapsulated as PPP frames (where the Protocol field 0x8021) are routed through PPP links. When running on a low-speed link, both parties can negotiate the use of compressed TCP and IP header to reduce the number of bits transferred on the link. When the network layer is configured, the link opens into a link that can be used for data communication. The two PPP endpoints on the link can send each other a group. Two PPP endpoints can also send loopback request LCP groupings (Echo-request) and loopback answer LCP groupings (echo-reply) to check the status of the link. At the end of the data transfer, a termination request LCP grouping (terminate-request) request can be terminated by one end of the link to terminate the link connection, and after receiving the termination confirmation LCP grouping (Terminate-ack) from the other side, go to the link termination state. If the link fails, it also passes from the link open state to the link termination state. When the carrier of the modem is stopped, it returns to the link static state.

Note: Start with no link between the devices, establish the physical link first, and then establish the LCP link. After identification, the NCP link is established before the data can be exchanged. Thus, the PPP protocol is not a pure Data Link layer protocol, it also contains the physical layer and network layer content.

Reference Documents:
[1] "Computer Network (5th edition)" Shehiren--Chapter III 3.2

Related Article

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.