Working principle of PPPOE Protocol

Source: Internet
Author: User

Working principle of PPPOE Protocol
The PPPoE protocol workflow consists of two phases: discovery and session. The discovery phase is stateless to obtain the Ethernet MAC address of the PPPoE end (on the local ADSL device, create a unique PPPoESESSION-ID. After the discovery stage ends, it enters the standard PPP session stage. When a host wants to start a PPPoE session, it must first perform the discovery phase to identify the local Ethernet MAC address and create a PPPoESESSION-ID. In the discovery phase, the host can discover Multiple Access Concentrator based on the network topology, and then allow the user to select one. When the discovery phase is completed successfully, both the host and the selected Access Concentrator have their information for establishing PPP connections over Ethernet. Until the PPP session is established, the discovery phase keeps the stateless Client/Server (customer/Server) mode. Once a PPP session is established, both the host and the Access Concentrator must allocate resources to the PPP Virtual Interface. The process of PPPoE protocol session discovery and session is as follows. 1. In the Discovery (Discovery) phase, during the Discovery (Discovery) phase, the user host queries all connected Access Concentrator (or switches) in broadcast mode and obtains its Ethernet MAC address. Select the host to be connected and determine the ID number of the PPP session to be established. There are four steps in the discovery phase. When this phase is completed, both ends of the communication will know the PPPoESESSION-ID and the peer ethernet address, which together uniquely define the PPPoE session. The four steps are as follows. (1) host broadcast initiation group (PADI). The destination address of the group is the Ethernet broadcast address (0 × ffffffffffffff, CODE) the field value is 0 × 09, and the SESSION-ID field value is 0 × 0000. The PADI group must contain at least one service name type tag (the value of the label type field is 0 × 0101) and provide the required service to the Access Concentrator. (2) The Access Concentrator receives the PADI group within the service scope and sends the PADO group to respond to the request. The value of the CODE field is 0 × 07, and the value of the SESSION-ID field is still 0 × 0000. The PADO group must contain one Access Concentrator name type tag (the tag type field value is 0 × 0102) and one or more service name type tags, indicates the type of service that can be provided to the host. (3) Select a suitable PADO group for the host and select a suitable PADO group for multiple PADO groups that may be received, then, send the PPPoE valid Discovery request group (PADR) to the selected Access Concentrator ). The CODE field is 0 × 19, and the SESSION_ID field value is still 0 × 0000. The PADR group must contain a service name type label to determine the service type requested from the Access Hub (or vswitch. When the host does not receive PADO within the specified time, it should resend its PADI group and double the wait time. This process will be repeated as expected. (4) prepare to start the PPP Session Access Concentrator to receive the PADR group and then prepare to start the PPP session. It sends a valid PPPoE discovery session to confirm the PADS group. The value of the CODE field is 0 × 65, and the value of the SESSION-ID field is a unique PPPoE session id number generated by the Access Concentrator. The PADS group must also contain a label of the Access Concentrator name type to confirm the services provided to the host. When the host receives the PADS group confirmation, both parties enter the PPP session phase. 2. In the PPP session phase, the user host and Access Concentrator conduct PPP sessions based on the PPP session connection parameters negotiated during the discovery phase. Once the PPPoE session starts, PPP data can be sent in any other form of PPP encapsulation. All Ethernet frames are unicast. The SESSION-ID of a PPPoE SESSION must not be changed and must be the value assigned by the discovery phase. PPPoE also has a PADT group, which can be sent at any time after the session is established to terminate the PPPoE session, that is, the session is released. It can be sent by the host or Access Concentrator. When the recipient receives a PADT group, this session is no longer allowed to send PPP services. No tag is required for the PADT group. The value of the CODE field is 0 × a7, and the value of the SESSION-ID field is the session id number of the ppp session to be terminated. After sending or receiving PADT, you do not have to send it even if the normal PPP terminates the group. The PPP peer end should use the PPP protocol itself to terminate the PPPoE session. However, when the PPP cannot be used, the PADT can be used. PPPoE authentication process if the client needs to authenticate through a LAN and a remote PPPoE server, there will be two different session phases, the Discovery phase and the PPP session phase. When a client wants to start a PPPoE session, it must first identify the Ethernet MAC address of the peer and create a PPPoESESSON_ID. In the discovery phase, the client can find multiple PPPoE servers based on the network topology, and then select one server, but usually the one with the fastest response. The Discovery stage is a stateless stage. In this stage, the access server is selected to determine the Session ID of the PPP Session to be established and obtain the peer point-to-point connection information; standard PPP processes are implemented in the PPP session phase. When this phase is complete, both ends of the Communication know the PPPoESESSON_ID and the peer ethernet address. They define a unique PPPoE session together. These steps include broadcasting an initiator group (PADI) on the client, sending a Response Group (PADO) to one or more PPPoE servers, and sending a request group (PADR) to the selected server ), the selected PPPoE server sends a validation group (PADS) to the client. When the client receives the confirmation group, it can start the PPP session phase. When the PPPoE server sends a confirmation group, it can start a PPP session. When the client does not receive PADO within the specified time, it should resend its PADI group and double the waiting time. This process will be repeated as expected. If the client is waiting to receive PADS, a similar timeout mechanism with the client resending PADR should be used. After a specified number of retries, the host should resend the PADI group. PPPOE also has a PADT group, which can be sent at any time after the session is established to terminate the PPPOE session. It can be sent by the client or PPPOE server. When a PADT is received, it is no longer allowed to use this session to send the PPP service. After the PADT is sent or received, the normal PPP cannot be used. You can use the PADT. Once the PPPOE session starts, PPP data can be sent in any other form of PPP encapsulation. All Ethernet frames are unicast, and authentication occurs in the session phase. The SESSION_ID of the PPPoE session must not be changed and must be the value allocated during the discovery 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.