Академический Документы
Профессиональный Документы
Культура Документы
The PPPoE process consists of two phases, discovery stage and session stage.
In the discovery stage, PPPoE establishes the connection through packet
interaction and allocates a session ID for each connection.
In the session stage, PPPoE carries upper-layer data through the established
connection.
The configuration of the PPPoE Server on the router consists of the configuration
of port and the configuration of authentication.
A virtual PPP interface should be created and the created interface should be
bound to the physical Ethernet interface. The PPP attributes need to be
configured on the virtual PPP interface. On the VRP platform, the virtual PPP
interface is represented by Virtual-Template.
interface Virtual-Template 0
This command is used to create a virtual PPP interface. The port number is 0 .
pppoe-server bind virtual-template 0
This command is used to bind the Ethernet port to the virtual PPP interface. In
this example, the Ethernet port is bound to interface 0.
Suppose that the user name for PPPoE dial-up is huawei and the password is hello.
The VRP manages users by using user domains. The format of user name is
user@huawei, in which huawei is the domain name. The authentication scheme,
accounting scheme, and IP address allocation policy should be specified in the user
domain. When the router allocates IP address to the client, it should use the IP pool
because multiple users will be accessed. If the user name does not contain the domain
name, the VRP should use the default domain.
domain default enable system
This command is used to specify the domain that authenticates or allocates IP address to
the user when the user name does not contain the domain name. That is, this command
configures the default domain. In this example, the default domain is system. The users
of domain system adopt local authentication and non-accounting.
local-user huawei
This command is used to create a user. The user name is huawei.
password simple hello
This command is used to configure the user name and the password. The simple filed
means that the password in the configuration file is in plain text. In this example, the
password is hello.
service-type ppp
This command is used to specify the service type of the user. In this example, the user
can use only the PPP dial-up.
ip pool 0 10.1.1.2 10.1.1.254
This command is used to create an IP pool.
After receiving the PADO packet, the PPPoE client sends a PPPoE Active
Directory Request (PADR) packet to the PPPoE server. This packet requests the
session ID from the PPPoE server and try to establish a PPPoE session.
In the PADR packet, the destination MAC address is a unicast address, namely,
the source MAC address of the PADO packet. The session ID is 0x0000.
After receiving the PADR packet, the PPPoE server generates a unique session
ID and returns a PPPoE Active Discovery Session-Confirmation (PADS) packet.
This packet reports the allocated session ID to the PPPoE client.
In the PADS packet, the destination MAC address is a unicast address, namely,
the source MAC address of the PADR packet. The session ID is the one
allocated to the session on the PPPoE server.
When the PPPoE client receives the PADS packet, it analyzes the session ID. All
the packets sent after the PPPoE session is established are identified by the
session ID.
In the PPPoE packet sent in the session stage, the destination MAC address is
unicast address, the Code filed is 0x00, the session ID is the one allocated in the
discovery stage, and the payload field is the PPP data frame.
Note: The PPP data frames do not undergo HDLC encapsulation.
When the PPPoE client needs to close the session, it sends a PPPoE Active
Discovery Terminate (PADT) packet to the PPPoE server. Similarly, if the PPPoE
server needs to close the session, it can also send a PADT packet. This packet is
used to close a session.
In the PADT packet, the destination MAC address is a unicast address and the
session ID indentifies the session to be closed.
After one end receives the PADT packet, the session is closed and no further
processing is needed.