PPPoE stands for Point-to-Point over Ethernet and it is a Layer2 network protocol that encapsulates PPP frames inside Ethernet frames. Our Linux L3 switch (router) represents PPPoE client and submits login credentials to PPPoE server. PPPoE server is located on ISP network and provides authentication service to the client.

1. Bring routed interface Ethernet3 to up state at boot time

We will use D-Link DGE-528T Gigabit Ethernet Adapter - that is presented as interface Ethernet 3 for WAN connection. Interface must be brought up at the boot time thus we have to change a parameter ONBOOT="no" to ONBOOT="yes" in /etc/sysconfig/network-scripts/ifcfg-eth3 configuration.

In case of a pppoe module cannot be loaded to kernel check this link for reference, please.

3. Install ppp and configure login credentials

[root@swouter-x86 ~]# yum install ppp.i686

Login credentials are stored in a file /etc/ppp/chap-secrets. If we use pppd for more than one connection, it is necessary to introduce an unique ID along with login and password. The example below adds user brezular with his ID my_ID and password my_password to the file /etc/ppp/chap-secrets.

Unique ID of PPP session is 12411 and peer's destination address is 00:90:1a:42:14:05 . IP address of ppp0 interface is 91.127.65.93 and IP address of PPPoE access concentrator is 213.81.232.247. CHAP authentication is successful. IP address of both primary and secondary DNS server will be stored in /var/run/ppp/resolv.conf.

6. DNS configuration - updating /etc/resolv.conf

Problem:

File /etc/resolv.conf is not updated when pppd is started. This can be solved by adding copy command to /etc/ppp/ip-up.local. The command copies a list of nameservers from /var/run/ppp/resolv.conf to /etc/resolv.conf. The script ip-up.local is called by ip-up script.