Pppd

From ArchWiki
Revision as of 20:29, 9 April 2011 by Danny8 (Talk | contribs) (Attempting to kill off category "communication and networking" use only category "networking")

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

This page explains how to set up a PPPoE connection using pppd and the kernel PPPoE driver. Note that this setup does not need rp-pppoe. ( With rp-pppoe you can have only one account configuration, however, using the method described below, you can have several account configurations at the same time and use anyone of them easily. Besides the dial speed of pppd is much faster than pppoe-start. )

Configuration

  • Make sure pppd is installed and your kernel is compiled with PPPoE support
$ pacman -Q ppp 
ppp 2.4.3-1
$ zgrep CONFIG_PPPOE /proc/config.gz 
CONFIG_PPPOE=m
  • Create the configuration file /etc/ppp/peers/your_provider
# /etc/ppp/peers/your_provider
 
plugin rp-pppoe.so
# rp_pppoe_ac 'your ac name'
# rp_pppoe_service 'your service name'
 
# network interface
eth0
# login name
name "someloginname"
usepeerdns
persist
# Uncomment this if you want to enable dial on demand
#demand
#idle 180
defaultroute
hide-password
noauth

If you want usepeerdns to work, you have to edit your /etc/ppp/ip-up and add a command that copies /etc/ppp/resolv.conf to etc/resolv.conf.

  • Edit /etc/ppp/pap-secrets

Put a line like this in /etc/ppp/pap-secrets

someloginname * yourpassword

You can now start the link using the command

pppd call your_provider

Alternatively, you can use this

pon your_provider

By default the configuration in /etc/ppp/peers/provider is treated as the default, so if you want to make "your_provider" the default, you can create a link like this

ln -s /etc/ppp/peers/your_provider /etc/ppp/peers/provider

Now you can start the link by simply running

pon

To close a pppoe connection, use this

poff your_provider

Starting pppd with Arch

  • The init script /etc/rc.d/ppp calls the default ppp provider (/etc/ppp/peers/provider), so make sure you have the right configuration file there, otherwhise you could create a symlink to the desired provider as explained before.
  • Make sure ppp module is loaded

If ppp support is compiled as a module, you have to load the ppp_generic module. In this case, add this to rc.conf:

MODULES=(... ppp-generic ...)
  • Add ppp to DAEMONS in /etc/rc.conf, and make sure that you also have the network daemon listed:
DAEMONS=(... network ... ppp ...)
  • Also make sure that you have the correct interface declared in the networking section of /etc/rc.conf.

Troubleshooting

If you have a preconfigured default route before the pppd is started, the default route is kept, so take a look in /var/log/errors.log and if you have something like:

pppd[nnnn]: not replacing existing default route via xx.xx.xx.xx

and xx.xx.xx.xx is not the correct route for you

  • Create a new script /etc/ppp/ip-pre-up
$ chmod +x /etc/ppp/ip-pre-up

with this content:

#!/bin/sh
/sbin/route del default
  • Restart pppd:
$ /etc/rc.d/ppp restart