https://wiki.archlinux.org/api.php?action=feedcontributions&user=Keith+Qualls&feedformat=atomArchWiki - User contributions [en]2024-03-29T06:27:07ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Ppp&diff=215224Ppp2012-07-28T01:55:47Z<p>Keith Qualls: fixed typo</p>
<hr />
<div>[[Category:Networking]]<br />
[[ru:Pppd]]<br />
[[zh-CN:Pppd]]<br />
{{Lowercase title}}<br />
<br />
{{Article summary start}}<br />
{{Article summary text|This article explains how to set up a point-to-point connections using pppd and the kernel PPPoE driver.}}<br />
{{Article summary end}}<br />
<br />
'''ppp''' (Paul's PPP Package) is an open source package which implements the [[Wikipedia:point-to-point protocol|point-to-point protocol]] (PPP) on Linux and Solaris systems. It is implemented as single '''pppd''' daemon and acts as backend for {{Pkg|xl2tpd}}, {{Pkg|pptpd}} and [[netcfg]]. [[Wikipedia:3G|3G]], [[Wikipedia:L2TP|L2TP]] and [[Wikipedia:PPPoE|PPPoE]] connections are internally based on PPP protocol and therefore can be managed by {{Pkg|ppp}}.<br />
<br />
== Installation ==<br />
[[pacman|Install]] {{Pkg|ppp}}, available in the [[official repositories]].<br />
<br />
Make sure that your kernel is compiled with PPPoE support (present in default kernel):<br />
<br />
{{hc|1=$ zgrep CONFIG_PPPOE /proc/config.gz|<br />
2=CONFIG_PPPOE=m}}<br />
<br />
== Configuration ==<br />
=== PPPoE ===<br />
Create the connection configuration file:<br />
<br />
{{hc|/etc/ppp/peers/''your_provider''|<br />
plugin rp-pppoe.so<br />
# rp_pppoe_ac 'your ac name'<br />
# rp_pppoe_service 'your service name'<br />
<br />
# network interface<br />
eth0<br />
# login name<br />
name ''"someloginname"''<br />
usepeerdns<br />
persist<br />
# Uncomment this if you want to enable dial on demand<br />
#demand<br />
#idle 180<br />
defaultroute<br />
hide-password<br />
noauth}}<br />
<br />
If you want usepeerdns to work, you have to edit your {{Ic|/etc/ppp/ip-up}} and add a command that copies {{Ic|/etc/ppp/resolv.conf}} to {{Ic|/etc/resolv.conf}}.<br />
<br />
Edit {{Ic|/etc/ppp/pap-secrets}}:<br />
<br />
Put a line like this in {{Ic|/etc/ppp/pap-secrets}}<br />
<br />
''someloginname'' * ''yourpassword''<br />
<br />
You can now start the link using the command<br />
<br />
# pppd ''call your_provider''<br />
<br />
Alternatively, you can use this<br />
<br />
# pon ''your_provider''<br />
<br />
By default the configuration in {{Ic|/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<br />
<br />
# ln -s /etc/ppp/peers/''your_provider'' /etc/ppp/peers/provider<br />
<br />
Now you can start the link by simply running<br />
<br />
# pon<br />
<br />
To close a connection, use this<br />
<br />
# poff your_provider<br />
<br />
== Starting pppd with Arch ==<br />
<br />
* The init script {{Ic|/etc/rc.d/ppp}} calls the default ppp provider ({{Ic|/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.<br />
<br />
* Make sure '''ppp''' module is loaded. If ppp support is compiled as a module, you have to load the {{Ic|ppp_generic}} module. In this case, add this to {{Ic|rc.conf}}:<br />
<br />
MODULES=(... ppp-generic ...)<br />
<br />
* Add ppp to {{Ic|DAEMONS}} in {{Ic|/etc/rc.conf}}, and make sure that you also have the network daemon listed:<br />
<br />
DAEMONS=(... network ... ppp ...)<br />
<br />
* Also make sure that you have the correct interface declared in the networking section of {{Ic|/etc/rc.conf}}.<br />
<br />
== Troubleshooting ==<br />
===Default route===<br />
If you have a preconfigured default route before the pppd is started, the default route is kept, so take a look in <code>/var/log/errors.log</code> and if you have something like:<br />
<br />
pppd[nnnn]: not replacing existing default route via xx.xx.xx.xx<br />
<br />
and xx.xx.xx.xx is not the correct route for you<br />
<br />
* Create a new script <code>/etc/ppp/ip-pre-up</code><br />
<br />
$ chmod +x <code>/etc/ppp/ip-pre-up</code><br />
<br />
with this content:<br />
<br />
#!/bin/sh<br />
/sbin/route del default<br />
<br />
* Restart pppd:<br />
$ /etc/rc.d/ppp restart<br />
===Masquering seems to be working fine but some sites don't work.===<br />
The MTU under pppoe is 1492 bytes. Most sites use an MTU of 1500. So your connection sends an ICMP 3:4 (fragmentation needed) packet, asking for a smaller MTU, but some sites have their firewall blocking that.<br />
<br />
Using PMTU clamping can solve that:<br />
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu</div>Keith Qualls