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
First, create the configuration file:

enp41s0 is the network interface card to use. It can be found with command.

Next, create the password secrets file:

For this to work at system startup, add the following unit in :

sys-subsystem-net-devices-enp41s0.device is the network device via which pppoe will connect on. To find out the exact name you can use the following bash command

Finally, create a service unit to handle wake up after sleep:

Finally, test it with:

If it works as expected, enable them on a permanent basis: