PPPoE Technical White Paper (H3C)

PPPoE Technical White Paper

Keywords : PPP , Ethernet , PPPoE

Abstract : PPPoE is a technology that provides access services for hosts on the Ethernet through a remote access device, and can implement control and billing for each host accessed. This article introduces the background, technical advantages, working process and typical networking application of PPPoE.

Acronyms :

Acronyms English full name Chinese interpretation
ADSL Asymmetric Digital Subscriber Line Asymmetric digital subscriber line
DSLAM Digital Subscriber Line Access Multiplexer Digital subscriber line access multiplexer
PPP Point to Point Protocol Point-to-point protocol
PPPoE PPP Over Ethernet Carrying PPP protocol on Ethernet
PADI PPPoE Active Discovery Initiation PPPoE activity discovery initiation message
PADO PPPoE Active Discovery Offer PPPoE activity discovery provides message
PADR PPPoE Active Discovery Request PPPoE activity discovery request packet
PADS PPPoE Active Discovery Session- confirmation PPPoE activity discovery session message
PADT PPPoE Active Discovery Terminate PPPoE activity discovery termination message

1 Overview

1.1 Product background

People want to connect to multiple hosts on remote sites through the same access device, and the access device can provide access control and billing functions similar to dial-up Internet access. Among the many access technologies, the most economical way to connect multiple hosts to the access device is Ethernet, and PPP protocol can provide a goodAccess controlwithBillingFunction, so there is a method of transmitting PPP on Ethernet, that is, PPPoE .
The PPPoE protocol was resolvedPractical application issues such as user Internet charges, Has been recognized and widely adopted by broadband access operators.

1.2 Technical advantages

For users , the advantages of PPPoE are as follows:

  • Following the traditional dial-up Internet access method, they still use their familiar hardware and similar software for Internet access.

  • Compatible with all existing xDSL Modems, no complicated configuration is required for the client's xDSL Modem.

  • Connect with Ethernet network cardPC with xDSL Modem, Allowing multiple PCs to share xDSL lines at the same time, saving user investment.
    For operators , the advantages of PPPoE are as follows:

  • Operators can provide broadband access services that support multiple users through digital subscriber lines, cable modems, or wireless connections.

  • Operators can use reliable and familiar technologies to accelerate the deployment of high-speed Internet services with little impact on existing network deployments.

  • The operator can confirm the user's identity through the access control function , charge the user through the charging function , and monitor the user's network behavior at the same time, ensuring network security.

  • End users can access multiple operators at the same time. This dynamic service selection feature allows operators to easily create and provide new services.

2 PPPoE technology implementation plan

2.1 PPPoE networking structure

PPPoE uses Client / Server model, PPPoE client is PPPoE Client, PPPoE server is PPPoE Server. The PPPoE Client initiates a connection request to the PPPoE Server. After the negotiation between the two passes, the PPPoE Server provides access control and authentication functions to the PPPoE Client .
according toThe location of the start and end points of the PPP sessionDifferent, there are two types of networking structure:

  • The first way is to establish a PPP session between devices,All hosts transmit data through the same PPP session, no need to install PPPoE client dialing software on the hostGenerally, an enterprise (company) shares an account (the PPPoE Client is located inside the enterprise / company in the figure, and the PPPoE Server is the operator's equipment).
    Insert picture description here
  • In the second deployment method, a PPP session is established between the Host and the operator ’s router, and a PPP session is established for each Host. Each Host is a PPPoE Client, and each Host has an account, which is convenient for operators to charge users. And control. The PPPoE client dial-up software must be installed on the Host.
    Insert picture description here

2.2PPPoE message format

The format of the PPPoE message is to carry the PPP message in the Ethernet frame, as shown in Figure 3.
Insert picture description here
The fields are explained as follows:

  • Destination_address field: an Ethernet unicast destination address or Ethernet broadcast address (0xffffffff). For Discovery packets, the value of this field is a unicast or broadcast address. The PPPoE Client uses the broadcast address in the process of searching for the PPPoE Server, and uses the unicast address after confirming the PPPoE Server. For the Session phase, this field must be the unicast address of the counterparty identified in the Discovery phase.
  • Source_address field: Ethernet MAC address of the source device.
  • Ether_type : Set to 0x8863 (Discovery phase or chain unlinking phase) or 0x8864 (Session phase).
  • Ver field: 4bits, PPPoE version number, value is 0x1.
  • Type field: 4bits, PPPoE type, value is 0x1.
  • Code field: 8bits, PPPoE message type. The Code field is 0x00, indicating session data. Code field 0x09 indicates PADI messages; Code field 0x07 indicates PADO or PADT messages; Code field 0x19 indicates PADR messages; Code field 0x65 indicates PADS messages. For details of the message, please refer to the appendix.
  • Session_ID field: 16 bits. For a given PPP session, this value is a fixed value, and together with the Ethernet Source_address and Destination_address actually defines a PPP session. The value 0xffff is reserved for future use and is not allowed.
  • Length field: 16 bits, which defines the length of the PPPoE payload field. The length of the Ethernet header and PPPoE header are not included.

2.3 PPPoE working process

The PPPoE negotiation process is shown in Figure 4:
Insert picture description here
PPPoE can be divided into three stages, namely the Discovery stage, Session stage and Terminate stage.

2.3.1 Discovery stage

The Discovery phase consists of four processes. After the completion of the communication, both parties will know the PPPoE Session_ID
and the other party's Ethernet address , theyJointly determined the only PPPoE Session

(1) The PPPoE Client broadcasts a PADI message, which contains the service type information that the PPPoE Client wants .
(2)allAfter receiving the PADI message, the PPPoE Server compares the requested service with the service it can provide. If it can provide it, it unicasts a PADO message.
(3) Depending on the topology of the network, the PPPoE Client may receive PADO messages sent by multiple PPPoE Servers. The PPPoE Client selectsReceived firstThe PPPoE Server corresponding to the PADO message acts as its own PPPoE Server, and unicast sends a PADR message.
(4) The PPPoE Server generates a unique session ID ( SESSION ID ), which identifies the session with the PPPoE Client, by sending a PADS messageSession ID Sent to PPPoE Client. If there is no error, it will enter PPPoE Session stage after the session is established.

2.3.2 Session stage

The work in the PPPoE Discovery phase establishes a session between the PPPoE Client and PPPoE, and then PPPoE enters the Session phase. The Session phase can be divided into two parts , one is the PPP negotiation phase , and the other is the PPP packet transmission phase .
The PPP negotiation on the PPPoE Session is the same as the ordinary PPP negotiation, and is divided into three stages : LCP , authentication , and NCP .

(1) The LCP phase mainly completes the establishment, configuration, and detection of data link connections.
(2) After the LCP negotiation is successful, the authentication work begins. The authentication protocol type is determined by the LCP negotiation result (CHAP or PAP).
(3) After successful authentication, PPP enters the NCP stage. NCP is a protocol family used to configure different network layer protocols. The commonly used is the IP Control Protocol (IPCP), which is responsible for configuring users' IP and DNS.

After the PPPoE Session PPP negotiation is successful , PPP data packets can be carried on it . In the PPPoE Session phase, all Ethernet packets are sent unicast .

2.3.3 Terminate phase

Both parties to the PPP communication should use the PPP protocol itself (such as the PPP termination message) to end the PPPoE session, but they can use the PADT message when the PPP protocol cannot be used to end the session .
After entering the PPPoE Session phase, both PPPoE Client and PPPoE Server can end the PPPoE connection by sending PADT messages. PADT packets can be sent unicast at any time after the session is established. After the PADT is sent or received, it is not allowed to use the session to send PPP traffic, even regular PPP end packets are not allowed to be sent.

3 Typical networking applications

3.1 Use ADSL Modem to connect LAN to Internet

3.1.1 Network requirements

The company wants to use a public account to access the Internet:

  • Router A, as a PPPoE Client, accesses the Internet through an account (equivalent to employees of the entire enterprise sharing this account).
  • Router B connects to the DSLAM as a PPPoE Server, provides functions such as RADIUS authentication and accounting , and connects to the Internet at the same time.

3.1.2 Network diagram

Insert picture description here

3.2 Wireless PPPoE access

3.2.1 Network requirements

The AP device serves as a PPPoE Client, and the BRAS device serves as a PPPoE Server. End users can directly access the Internet through the wireless network.

3.2.2 Network diagram

Insert picture description here

4 References

RFC1661:The Point-to-Point Protocol (PPP)
RFC2516:A Method for Transmitting PPP Over Ethernet (PPPoE)

5 Appendix

5.1 Message structure

5.1.1 PADI(PPPoE Active Discovery Initiation)

Code field is 0x09.
 The Session_ID field is 0x0000.
 The TAG_TYPE field is 0x0101 (Service-Name), indicating that the name of the service is followed immediately. There is only one TAG whose TAG_TYPE is Service-Name, and other types of TAG are optional.
Insert picture description here

5.1.2 PADO(PPPoE Active Discovery Offer)

Code field is 0x07.
SESSION_ID field is 0x0000.
 The TAG_TYPE field is 0x0101 (Service-Name), indicating that the name of the service is immediately followed by it; 0x0102 (AC-Name) indicates that the string following it uniquely represents a specific access concentrator. There is only one TAG with TAG_TYPE of AC-Name, and at least one TAG with TAG_TYPE of Service-Name.
Insert picture description here

5.1.3 PADR(PPPoE Active Discovery Request)

Code field is 0x19.
SESSION_ID is 0x0000.
 The TAG_TYPE field is 0x0101 (Service-Name), indicating that the name of the service is followed immediately. There is only one TAG whose TAG_TYPE is Service-Name, and other types of TAG are optional.
Insert picture description here

5.1.4 PADS(PPPoE Active Discovery Session-confirmation)

Code field is 0x65.
SESSION_ID is the value assigned in the Discovery stage.
TAG is optional.
Insert picture description here
5. PADT (PPPoE Active Discovery Terminate)
Code field is 0xa7.
SESSION_ID field is the value assigned in the Discovery stage.
No TAG .
Insert picture description here

81 original articles published · Liked 69 · Visitors 50,000+

Guess you like

Origin blog.csdn.net/s2603898260/article/details/104175386