PPP

PPP (Point-to-Point Protocol) is commonly used in establishing a direct connection between two networking nodes. It can provide connection authentication, transmission encryption, and compression.

Installation
Portage has a USE flag  for enabling support for PPP for other packages.

After setting global USE flags update your system to the changes take effect:

Or emerge package manually:

Kernel
Following kernel options need to be enabled, to support PPPoE, which is used in most cases.

Finally you need to rebuild linux, install and boot new kernel with PPP support.

Configuration
Provided eth0 following lines should be added for PPPoE connection:

Create an init script for the PPP device by symlinking to net.lo:

Example setup with systemd and automatic connection
file: /etc/ppp/peers/provider enp41s0 is a network interface card to use, it can be found with "ip link" oir "ip address" command

note: if you use ppp of version less than 2.4.9 first line should be (rp- prefix):

file /etc/ppp/chap-secrets:

now we want this at startup:

add the following scripts in /etc/systemd/system/pppoe.service

here: sys-subsystem-net-devices-enp41s0.device is a network device via which practically pppoe will work. to find out the exact name you can use the following bash command

now we are almost here, but the interface will die if computer goes to sleep. On wake-up you should to reconnect. So create

/etc/systemd/system/pppoe-after-wakeup.service file:

we are ready. Test it with

sudo systemctl start pppoe

sudo systemctl start pppoe-after-wakeup

commands and if it works as expected you can enable them on a permanent basis:

sudo systemctl enable pppoe

sudo systemctl enable pppoe-after-wakeup