The PPPoE user login process involves two stages: PPPoE negotiation and PPP negotiation. PPP negotiation includes Link Control Protocol (LCP) negotiation, Password Authentication Protocol (PAP)/Challenge Handshake Authentication Protocol (CHAP) authentication, and Network Control Protocol (NCP) negotiation.
PPPoE negotiation is a process in which the Device assigns a session ID for PPPoE user access. The session ID identifies a PPPoE virtual link between a user and the Device. Figure 1 shows the PPPoE negotiation process.
The user broadcasts a PPPoE Active Discovery Initiation (PADI) packet carrying the service that it is requesting.
After receiving the PADI packet, all access concentrators (ACs) on the Ethernet network compare the requested service against the services they can offer. Then the ACs that can provide the requested service reply with a PPPoE Active Discovery Offer (PADO) packet. In this example, the Device in Figure 1 is an AC.
As the PADI packet is broadcast, the user may receive more than one PADO packet. The user looks through the PADO packets it receives and selects one meeting specified conditions. Then the user sends a PPPoE Active Discovery Request (PADR) packet carrying the service that it is requesting to the selected Device.
When the Device receives a PADR packet, it prepares to enter a PPP session. The Device generates a unique session ID for the PPPoE session and replies to the user with a PPPoE Active Discovery Session-confirmation (PADS) packet carrying the session ID. If no error occurs during this process, the Device enters the PPP session. The user enters the PPP session after receiving the PADS packet.
PPP negotiation includes Link Control Protocol (LCP) negotiation, Password Authentication Protocol (PAP)/Challenge Handshake Authentication Protocol (CHAP) authentication, and Network Control Protocol (NCP) negotiation.
LCP negotiation
LCP Response Packet Type |
Description |
---|---|
Configure-Ack |
If the Configuration Options received in a Configure-Request packet are supported and all values are acceptable, the receive end replies with a Configure-Ack packet that carries the same Configuration Options as those in the Configure-Request packet. |
Configure-Nak |
If the Configuration Options received in a Configure-Request packet are supported but some values are not acceptable, the receive end replies with a Configure-Nak packet that carries the values it expects. For example, if the Configure-Request packet carries an MRU value 1500, but the receive end expects an MRU value 1492, the receive end fills the MRU value 1492 in the Configure-Nak packet. |
Configure-Reject |
If some Configuration Options received in a Configure-Request packet are not supported, the receive end replies with a Configure-Reject packet that carries the unsupported Configuration Options. |
Authentication stage
After LCP negotiation is completed, the PPP authentication stage starts. PPP supports two authentication modes: PAP and CHAP.
PAP authentication
The link is not immediately terminated after a failed authentication. The authenticator terminates the link only after the number of failed authentication attempts reaches a limit.
CHAP authentication
NCP negotiation
NCP negotiates network-layer parameters in PPP packets. NCP includes the IP Control Protocol (IPCP) and IPv6 Control Protocol (IPv6CP). PPPoE users use IPCP to obtain IP addresses or IP address segments for network access.
The NCP process is similar to the LCP process. NCP negotiation is successful after the user and Device exchange Configure-Request packets and respond to each other with Configure-Ack packets. The user can access the network after successful NCP negotiation. Figure 5 shows the NCP negotiation process.
The following describes IPCP and IPv6CP, which are commonly used in NCP negotiation:
IPCP
IPCP negotiation is implemented based on the PPP state machine. IPCP changes from the Initial or Closed state to the Opened state after both ends complete exchanging configuration information through Configure-Request, Configure-Ack, and Configure-Nak packets. IPCP enters the Opened state only after Configure-Ack packets are sent and received on both ends.
IPCP negotiation packets can contain multiple options that carry different parameters, such as the IP address, gateway address, and mask. IPCP negotiation can be successful irrespective of whether any option is rejected or fails to be acknowledged. In addition, IPCP supports negotiation by exchanging packets that do not carry any options.
IPv6CP
IPv6CP is a network control protocol that configures, enables, and disables the IPv6 protocol modules on both ends of a point-to-point link. IPv6CP defines two negotiable parameters: interface ID and IPv6 datagram compression protocol. IPv6CP uses the same packet exchange mechanism as LCP. IPv6CP packets can be exchanged only after PPP reaches the network-layer protocol phase. IPv6CP packets that are received before this phase is reached are discarded.
Currently, only interface IDs can be negotiated on the Device.
On an IPv6 network, neighbor discovery (ND) or Dynamic Host Configuration Protocol for IPv6 (DHCPv6) must be used to allocate global unicast addresses and configurations to PPP and IPoE users, and the DHCPv6 Identity Association for Prefix Delegation (IA_PD) option must be used to allocate an IPv6 prefix to a routed LAN interface on customer premises equipment (CPE).
A PPPoE session can be established either between devices or between a host and a device.