PPPoE Dial-up Implementation
During PPPoE dial-up, a PPPoE session is established between a PPPoE client and a PPPoE server, as shown in Figure-1 PPPoE dial-up process
The PPPoE dial-up process includes three stages: Discovery, Session, and Terminate.
Discovery Stage
The Discovery stage consists of the following steps:
A PPPoE client broadcasts a PPPoE Active Discovery Initial (PADI) packet that contains service type required by the PPPoE client.
After receiving the PADI packet, all PPPoE servers compare the requested service with the services they can provide. The PPPoE servers that can provide the requested service unicast PPPoE Active Discovery Offer (PADO) packets to the PPPoE client.
The PPPoE client receives PADO packets from more than one PPPoE server. The PPPoE client selects the PPPoE server from which the first PADO packet is received and unicasts a PPPoE Active Discovery Request (PADR) packet to the selected PPPoE server.
The PPPoE server generates a unique session ID to identify the PPPoE session with the PPPoE client, and then sends a PPPoE Active Discovery Session-confirmation (PADS) packet containing this session ID to the PPPoE client. When the PPPoE session is established, the PPPoE server and PPPoE client enter the PPPoE Session stage.
After the PPPoE session is established, the PPPoE server and client learn the session ID and the peer Ethernet address. Therefore, the PPPoE server has a unique PPPoE session with the client.
Session Stage
The PPPoE Session stage involves PPP negotiation and PPP packet transmission.
PPP negotiation at the PPPoE Session stage is the same as common PPP negotiation, which includes the LCP, authentication, and NCP phases.
In the LCP phase, the PPPoE server and PPPoE client establish and configure a data link, and verify the data link status.
When LCP negotiation is complete, authentication starts. The authentication protocol depends on the LCP negotiation result. The authentication protocol can be Challenge Handshake Authentication Protocol (CHAP) or Password Authentication Protocol (PAP).
When authentication succeeds, PPP enters the Network Control Protocol (NCP) phase. NCP is a protocol suite used to configure network–layer protocols. A commonly used network-layer protocol is IP Control Protocol (IPCP), which is responsible for configuring IP addresses for users and the domain name server (DNS).
When PPP negotiation succeeds, PPP data packets can be forwarded.
At the PPPoE Session Stage, the PPPoE server and PPPoE client unicast all Ethernet data packets.
Terminate Stage
The PPPoE server and client use PPP to terminate the PPPoE session. If PPP cannot be used, the server and client can use PPPoE Active Discovery Terminate (PADT) packets to terminate the PPPoE session.
After a PPPoE session is established, the PPPoE client or the PPPoE server can unicast a PADT packet to terminate the PPPoE session at any time. After transmitting or receiving the PADT packet, the PPPoE server and PPPoE client are not allowed to use this session to send any PPP traffic.
Source:
https://support.huawei.com/