The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "PPPoE"
(11 intermediate revisions by 2 users not shown) | |||
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 in <tt>/usr/src/linux/.config</tt>: | ||
<pre> | <pre> | ||
CONFIG_PPP=m | CONFIG_PPP=m | ||
CONFIG_PPP_BSDCOMP=m | CONFIG_PPP_BSDCOMP=m | ||
Line 12: | Line 12: | ||
CONFIG_PPPOE=m | CONFIG_PPPOE=m | ||
CONFIG_PPP_ASYNC=m | CONFIG_PPP_ASYNC=m | ||
CONFIG_PPP_SYNC_TTY=m</pre> | CONFIG_PPP_SYNC_TTY=m | ||
</pre> | |||
# pppoe-setup</ | Next, we configure and install {{Package|net-dialup/rp-pppoe}}: | ||
Configuration is straightforward | <console> | ||
= Funtoo Linux network setup = | ###i## emerge rp-pppoe | ||
Funtoo openrc does not provide default template for ppp connections. We will create a custom template. | ###i## pppoe-setup | ||
< | </console> | ||
Create <code>interface-pppoe</code> | Configuration is straightforward: setup username, password and ethernet interface to use. In our example it is <code>eth2</code>. | ||
<pre>#!/bin/sh | |||
== Funtoo Linux network setup == | |||
Funtoo openrc does not provide a default template for ppp connections. We will create a custom template. | |||
<console># ##i##cd /etc/netif.d/</console> | |||
Create a file called <code>interface-pppoe</code>: | |||
<pre> | |||
#!/bin/sh | |||
netif_pre_up() { | netif_pre_up() { | ||
pppoe-connect >/var/log/pppoe.log 2>&1 & | pppoe-connect >/var/log/pppoe.log 2>&1 & | ||
Line 27: | Line 34: | ||
netif_pre_down() { | netif_pre_down() { | ||
pppoe-stop | pppoe-stop | ||
}</pre> | } | ||
Now we will create a <code>eth2</code> interface | </pre> | ||
< | Now, we will create a <code>eth2</code> interface: | ||
# ln -s netif.tmpl | <console> | ||
Then create | # ##i##cd /etc/init.d | ||
<pre>template="interface-pppoe" | # ##i##ln -s netif.tmpl net.eth2 | ||
description="Your ISP"</pre> | </console> | ||
To complete configuration add an interface to default runlevel: | Then create a <code>/etc/conf.d/net.eth2</code> configuration file that will specify a pppoe template in the <code>/etc/netif.d</code> directory: | ||
< | |||
<pre> | |||
template="interface-pppoe" | |||
description="Your ISP" | |||
</pre> | |||
To complete configuration, add an interface to the default runlevel: | |||
<console> | |||
###i## rc-update add net.eth2 default | |||
</console> | |||
[[Category:Networking]] | [[Category:Networking]] | ||
[[Category:HOWTO]] | [[Category:HOWTO]] |
Latest revision as of 17:19, October 5, 2017
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 No results:
root # emerge rp-pppoe root # 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.
root # 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:
root # cd /etc/init.d root # ln -s netif.tmpl net.eth2
Then create a /etc/conf.d/net.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:
root # rc-update add net.eth2 default