Pppoe working principle and frame format

Source: Internet
Author: User

4.3.2 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, and 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 hubs (or switches) in broadcast mode and obtains their Ethernet MAC addresses. Select the host to be connected, and determine the PPP session identification label to be established. There are four steps in the discovery phase. When this phase is complete, 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) the host broadcasts an initiator group (padi). The destination address of the group is the Ethernet broadcast address 0 xffffffffffff, and the code field value is 0x09, the session_id (session ID) field value is 0x0000. The padi package must contain at least one service name type tag (the value of the label type field is 0x0101) and provide the required service to the Access Concentrator. (2) The Access Concentrator receives a padi packet group within the service scope, and sends a pado packet group to respond to the request. The code field value is 0x07.
The session_id field value is still 0x0000. The pado group must contain one Access Concentrator name type tag (the tag type field value is 0x0102) and one or more service name type tags, indicates the type of service that can be provided to the host. (3) The host selects an appropriate pado group from multiple pado groups that may be received, and then sends the pppoe valid Discovery request group (padr) to the selected Access Concentrator ). The code field is 0x19.
The session_id field value is still 0x0000. 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) After receiving the padr package, the Access Concentrator prepares to start the PPP session. It sends a pads group. The code field value is 0x65.
The session_id field value is a unique pppoe session ID number generated by the Access Concentrator. The pads group must also contain a label for accessing the concentrator name type to confirm the service provided to the host. When the host receives the pads package confirmation, both parties enter the PPP session phase. [Note] if the host is waiting to receive pads groups, a similar timeout mechanism with the host resending padr should be used. After a specified number of retries, the host should resend the padi group. 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 the 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. The PAdT package does not require any labels, and its code field value is 0xa7
The session_id field value 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. The above process can be illustrated in 4-5. Figure 4-5 pppoe session creation process 4.3.3 The pppoe frame format corresponds to the two phases of the two pppoe protocol sessions described in the previous section. The pppoe frame format also includes two types: in the discovery phase, the Type field value in the Ethernet frame is 0x8863; in the PPP session phase, the Type field value in the Ethernet frame is 0x8864, which has been recognized by IEEE. The pppoe group frame structure is 4-6. Figure 4-6 pppoe frame structure the version (VER) field and type (type) field in the pppoe group have a length of 4 bits, in the current version of pppoe, the values of these two fields are fixed to 0x1. The code field is 8 bits in length and has different values based on different functions of various data packets in the two phases. The value of the Code field in the PPP session phase is 0x00. For details about the Data grouping formats in each step of the PPP session phase, see the previous section. The length of the session_id field is 16 bits. in a given PPP session, its value is fixed, and the value 0xffffffff is the reserved value. The length field is 16 bits long, indicating the pppoe Net Load Length. During the discovery phase, the pppoe load can be empty or composed of multiple tags. Each tag is a TLV (Type-length-value) structure; the pppoe load in the PPP session phase is a standard Point-to-Point Protocol package.

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.