pppoe server configuration (PPPoe Server router configuration)
<Huawei>sys
[Huawei]sysname Server//Change the device name to Server
[Server]aaa
[Server-aaa]authentication-scheme 163.com
[Server-aaa]domain 163.com
[Server-aaa-domain-163.com]authentication-scheme 163.com
[Server-aaa-domain-163.com]quit
[Server-aaa]local-user [email protected] password cipher 123456 //Create an account [email protected] password 123456
[Server-aaa]local-user [email protected] service-type ppp//Configure the authentication type of the account as ppp
[Server-aaa]quit
[Server]ip pool pool1
[Server-ip-pool-pool1]gateway-list 209.10.1.254 //Create gateway address
[Server-ip-pool-pool1]network 209.10.10.0 mask 255.255.255.0 //Specify the address pool allocation network segment
[Server-ip-pool-pool1]quit
[Server]interface Virtual-Template1//Create an authentication template
[Server-Virtual-Template1]ppp authentication-mode chap domain 163.com
[Server-Virtual-Template1]remote address pool pool1//Address pool allocated after successful associated authentication
[Server-Virtual-Template1]ip add 209.10.1.254 255.255.255.0//Configure the IP address for the template
[Server-Virtual-Template1]quit
[Server]interface g0/0/0
[Server-GigabitEthernet0/0/0]pppoe-server bind Virtual-Template 1//apply the authentication template on the port
[Server-GigabitEthernet0/0/0]quit
[Server]interface LoopBack 0
[Server-LoopBack0]ip add 9.9.9.9 24//Use this IP to verify whether the PC can access the public network after PPPoe connection
pppoe client configuration and dhcp client configuration (PPPoe-Client router configuration)
<Huawei>sys
[client]acl number 2001 //Set NAT rules
[client-acl-basic-2001] rule 5 permit source 192.168.2.0 0.0.0.255
[client-acl-basic-2001]quit
[client]interface Dialer0//configure dialer interface
[client-Dialer0]link-protocol ppp
[client-Dialer0] ppp chap user [email protected] //Configure chap authentication account
[client-Dialer0] ppp chap password simple 123456 //Configure chap authentication password
[client-Dialer0] mtu 1492//Modify the MTU to 1500-8=1492, 1500 is the Ethernet maximum transmission unit, 8 is the length of the PPP header
[client-Dialer0] ip address ppp-negotiate//Set the address acquisition method to ppp negotiation, that is, obtain the ip address through pppoeserver
[client-Dialer0] dialer user [email protected]
[client-Dialer0] dialer bundle 1//Configure the dialer bundle number, which should be consistent with the number of the dialer interface on the router
[client-Dialer0] nat outbound 2001//Enable NAT function
[client-Dialer0]quit
[client]dialer-rule //Set the dialer rule for ppp dialing starting from ip traffic
[client-dialer-rule]dialer-rule 1 ip permit
[client-dialer-rule]quit
[client]interface g0/0/0
[client-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
[client-GigabitEthernet0/0/0]quit