Difference between revisions of "PPPoE"

From Funtoo
Jump to: navigation, search
(Kernel options)
Line 1: Line 1:
 
This page expains how to setup and configue '''PPPoE''' connection with rp-pppoe and Funtoo Linux network.
 
This page expains how to setup and configue '''PPPoE''' connection with rp-pppoe and Funtoo Linux network.
= Kernel options =
+
== Kernel options ==
 
Make sure following kernel options are enabled
 
Make sure following kernel options are enabled
 
<pre>
 
<pre>
Line 13: Line 13:
 
CONFIG_PPP_ASYNC=m
 
CONFIG_PPP_ASYNC=m
 
CONFIG_PPP_SYNC_TTY=m</pre>
 
CONFIG_PPP_SYNC_TTY=m</pre>
Install and configure <code>rp-pppoe</code>.
+
Next, we configure and install {{Package|net-dialup/rp-pppoe}}:
<console># ##i##emerge rp-pppoe
+
<console>
# ##i##pppoe-setup
+
###i## emerge -av rp-pppoe
 +
###i## pppoe-setup
 
</console>
 
</console>
Configuration is straightforward, setup username, password and ethernet interface to use, in our example it is <code>eth2</code>.
+
Configuration is straightforward, setup username, password and ethernet interface to use, in our example it is ''<code>eth2</code>''.
 +
 
 
= Funtoo Linux network setup =
 
= Funtoo Linux network setup =
 
Funtoo openrc does not provide default template for ppp connections. We will create a custom template.
 
Funtoo openrc does not provide default template for ppp connections. We will create a custom template.

Revision as of 21:36, 13 January 2014

This page expains how to setup and configue PPPoE connection with rp-pppoe and Funtoo Linux network.

Kernel options

Make sure following kernel options are enabled

# zgrep PPP /proc/config.gz
CONFIG_PPP=m
CONFIG_PPP_BSDCOMP=m
# CONFIG_PPP_DEFLATE is not set
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPPOE=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m

Next, we configure and install net-dialup/rp-pppoe:

# emerge -av rp-pppoe
# pppoe-setup

Configuration is straightforward, setup username, password and ethernet interface to use, in our example it is eth2.

Funtoo Linux network setup

Funtoo openrc does not provide default template for ppp connections. We will create a custom template.

# cd /etc/netif.d/

Create interface-pppoe

#!/bin/sh
netif_pre_up() {
pppoe-connect >/var/log/pppoe.log 2>&1 &
}
netif_pre_down() {
pppoe-stop
}

Now we will create a eth2 interface as follows:

# cd /etc/init.d
# ln -s netif.tmpl netif.eth2

Then create an /etc/conf.d/netif.eth2 configuration file that would specify a pppoe template in /etc/netif.d directory:

template="interface-pppoe"
description="Your ISP"

To complete configuration add an interface to default runlevel:

 # rc-update add netif.eth2 default