Difference between revisions of "PPPoE"

From Funtoo
Jump to: navigation, search
(Funtoo Linux network setup)
 
Line 26: Line 26:
 
<console># ##i##cd /etc/netif.d/</console>
 
<console># ##i##cd /etc/netif.d/</console>
 
Create a file called <code>interface-pppoe</code>:
 
Create a file called <code>interface-pppoe</code>:
 
  
 
<pre>
 
<pre>
Line 43: Line 42:
 
</console>
 
</console>
 
Then create a <code>/etc/conf.d/netif.eth2</code> configuration file that will specify a pppoe template in the <code>/etc/netif.d</code> directory:
 
Then create a <code>/etc/conf.d/netif.eth2</code> configuration file that will specify a pppoe template in the <code>/etc/netif.d</code> directory:
 
  
 
<pre>
 
<pre>

Latest revision as of 22:45, 19 February 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 in /usr/src/linux/.config:

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 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 a default template for ppp connections. We will create a custom template.

# cd /etc/netif.d/

Create a file called 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:

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

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

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

To complete configuration, add an interface to the default runlevel:

# rc-update add netif.eth2 default