source: archive/ppp.xml

trunk
Last change on this file was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 17 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

  • Property mode set to 100644
File size: 20.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY ppp-download-http "http://samba.org/ftp/ppp/ppp-&ppp-version;.tar.gz">
8 <!ENTITY ppp-download-ftp "&gentoo-ftp-repo;/ppp-&ppp-version;.tar.gz">
9 <!ENTITY ppp-md5sum "4621bc56167b6953ec4071043fe0ec57">
10 <!ENTITY ppp-size "920 KB">
11 <!ENTITY ppp-buildsize "6.4 MB">
12 <!ENTITY ppp-time "0.1 SBU">
13]>
14
15<sect1 id="ppp" xreflabel="PPP-&ppp-version;">
16 <?dbhtml filename="ppp.html"?>
17
18
19 <title>PPP-&ppp-version;</title>
20
21 <indexterm zone="ppp">
22 <primary sortas="a-PPP">PPP</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to PPP</title>
27
28 <para>The <application>PPP</application> package contains the
29 <command>pppd</command> daemon and the <command>chat</command>
30 program. This is used for connecting to other machines; often for connecting to
31 the Internet via a dial-up or PPPoE connection to an ISP.</para>
32
33 &lfs70_checked;
34
35 <bridgehead renderas="sect3">Package Information</bridgehead>
36 <itemizedlist spacing="compact">
37 <listitem>
38 <para>Download (HTTP): <ulink url="&ppp-download-http;"/></para>
39 </listitem>
40 <listitem>
41 <para>Download (FTP): <ulink url="&ppp-download-ftp;"/></para>
42 </listitem>
43 <listitem>
44 <para>Download MD5 sum: &ppp-md5sum;</para>
45 </listitem>
46 <listitem>
47 <para>Download size: &ppp-size;</para>
48 </listitem>
49 <listitem>
50 <para>Estimated disk space required: &ppp-buildsize;</para>
51 </listitem>
52 <listitem>
53 <para>Estimated build time: &ppp-time;</para>
54 </listitem>
55 </itemizedlist>
56
57 <bridgehead renderas="sect3">PPP Dependencies</bridgehead>
58
59 <bridgehead renderas="sect4">Optional</bridgehead>
60 <para role="optional"><xref linkend="libpcap"/> (needed to do PPP filtering)
61 and <xref linkend="linux-pam"/> (to authenticate incoming calls using PAM -
62 only needed by ISPs).
63 </para>
64
65 <para condition="html" role="usernotes">User Notes:
66 <ulink url="&blfs-wiki;/PPP"/></para>
67
68 </sect2>
69
70 <sect2 role="installation">
71 <title>Installation of PPP</title>
72
73 <note id="ppp-kernel">
74 <para><application>PPP</application> support (CONFIG_PPP),
75 the asynchronous line discipline (CONFIG_PPP_ASYNC), the
76 driver for your serial port device and/or the PPP over Ethernet
77 (PPPoE) protocol driver (CONGIG_PPPOE) must be compiled into the
78 kernel or loaded as kernel modules.
79 Udev doesn't load the ppp_generic and pppoe modules automatically. If you
80 compiled them as modules they can be loaded by the modules bootscript if
81 they are mentioned in <filename>/etc/sysconfig/modules</filename>
82 file.</para>
83 </note>
84
85 <indexterm zone="ppp ppp-kernel">
86 <primary sortas="d-PPP-support">PPP support</primary>
87 </indexterm>
88
89 <para>Create (as <systemitem class="username">root</systemitem>)
90 the group for users who may run <application>PPP</application>:</para>
91
92<screen role="root"><userinput>groupadd -g 52 pppusers</userinput></screen>
93
94 <para>Compile <application>PPP</application> by running the
95 following commands:</para>
96
97<screen><userinput>rm include/linux/if_pppol2tp.h &amp;&amp;
98./configure --prefix=/usr &amp;&amp;
99make</userinput></screen>
100
101 <para>This package does not come with a test suite.</para>
102
103 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
104
105<screen role='root'><userinput>make install &amp;&amp;
106install -d /etc/ppp/peers</userinput></screen>
107
108 </sect2>
109
110 <sect2 role="commands">
111 <title>Command Explanations</title>
112
113 <para><command>rm include/linux/if_pppol2tp.h</command>:
114 <application>PPP-&ppp-version;</application> contains an out of date copy
115 of the kernel header <filename>linux/if_pppol2tp.h</filename>. This needs to
116 be removed to <emphasis>force</emphasis> it to use the one installed in
117 <filename class="directory">/usr</filename>. If you don't remove this file
118 the build will still succeed (thanks to a poorly written
119 <filename>Makefile</filename>) but it will fail to compile the
120 <filename class="libraryfile">openl2tp.so</filename>,
121 <filename class="libraryfile">pppol2tp.so</filename>,
122 and <filename class="libraryfile">rp-pppoe.so</filename> plugins:</para>
123
124 <para><command>install -d /etc/ppp/peers</command>: This command creates
125 a directory for PPP peer configuration files.</para>
126
127<!-- FIXME: the three options below are taken from pppd/Makefile.linux file.
128 They have not been tested. There are other options, such as USE_SRP=y,
129 that cannot work (in this case, because libsrp is not available from
130 anywhere) - Alexander E. Patrakov -->
131
132 <para><parameter>USE_PAM=y</parameter>: Add this argument to the
133 <command>make</command> command to compile in support for PAM, usually
134 needed for authenticating inbound calls against a central database.</para>
135
136 <para><parameter>HAVE_INET6=y</parameter>: Add this argument to the
137 <command>make</command> command to compile in support for IPv6.</para>
138
139 <para><parameter>CBCP=y</parameter>: Add this argument to the
140 <command>make</command> command to compile in support for the
141 Microsoft proprietary Callback Control Protocol.</para>
142
143 </sect2>
144
145 <sect2 role="configuration">
146 <title>Configuring PPP</title>
147
148 <sect3 id="ppp-config">
149 <title>Config Files</title>
150
151 <para><filename>/etc/ppp/*</filename></para>
152
153 <indexterm zone="ppp ppp-config">
154 <primary sortas="e-etc-ppp-star">/etc/ppp/*</primary>
155 </indexterm>
156
157 </sect3>
158
159 <sect3>
160 <title>Configuration Information</title>
161
162 <para>Add the users who may run <application>PPP</application> to the
163 <systemitem class="groupname">pppusers</systemitem> group:</para>
164
165<screen role="root"><userinput>usermod -a -G pppusers <replaceable>&lt;username&gt;</replaceable></userinput></screen>
166
167 <para>Most internet service providers that use ppp give you a username
168 and password for you to use to authenticate yourself when you connect to
169 their servers. These secrets are kept in the files
170 <filename>/etc/ppp/pap-secrets</filename> or
171 <filename>/etc/ppp/chap-secrets</filename>. If you don't know whether
172 your ISP uses CHAP or PAP then create both files and put the same content
173 in both files.</para>
174
175 <para>If you have more than one ISP account the second column
176 (remotename) is used to identify between the different
177 usernames/passwords needed for the different ISPs. If you only have one
178 ISP account an asterisk will work fine in the second column.</para>
179
180 <para>In this example the username given by the ISP is
181 <quote>jdoe</quote>, the password is <quote>guessit</quote>, the ISP uses
182 PAP and the user wants to give this account the remotename
183 <quote>dialup</quote> in order to distinguish it from other PPP
184 accounts:</para>
185
186<screen role="root"><userinput>cat &gt;&gt;/etc/ppp/pap-secrets &lt;&lt;"EOF"</userinput>
187<literal># username remotename password
188jdoe dialup guessit</literal>
189<userinput>EOF
190chmod 600 /etc/ppp/pap-secrets</userinput></screen>
191
192 <sect4>
193 <title>DNS Server Configuration</title>
194
195 <para>If you don't run your own caching DNS server (like
196 <xref linkend="bind"/>) <command>pppd</command> can ask your ISP for its
197 domain name servers and put them in <filename>/etc/ppp/resolv.conf</filename>.
198 If you want to use their domain name servers:</para>
199
200<screen role="root"><userinput>mv /etc/resolv.conf{,.orig}
201ln -s ppp/resolv.conf /etc</userinput></screen>
202
203 </sect4>
204
205 <sect4>
206 <title>PPPoE connections</title>
207
208 <para>In order to configure a PPPoE connection, create a peer file that
209 contains the connection details:</para>
210<screen role="root"><userinput>cat &gt;/etc/ppp/peers/<replaceable>peername</replaceable> &lt;&lt;"EOF"</userinput>
211<literal>plugin rp-pppoe.so <replaceable>eth0</replaceable>
212
213# Your username at the ISP. This is the same as the first
214# column in /etc/ppp/*-secrets:
215user "<replaceable>jdoe</replaceable>"
216
217# remotename is not needed if you only have one ISP account and
218# hence an asterisk in the second column in pap or chap-secrets:
219# remotename "<replaceable>adsl</replaceable>"
220
221# If it's not working and you want pppd to be
222# more verbose in /var/log/sys.log, add debug:
223# debug
224
225# If you have a static IP address (eg, 12.34.56.78) you
226# can specify it by following it with a colon:
227# 12.34.56.78:
228
229# Otherwise accept whatever IP address the ISP gives you:
230noipdefault
231
232# The settings below usually don't need to be changed
233noauth
234hide-password
235updetach
236defaultroute
237# create /etc/ppp/resolv.conf:
238usepeerdns
239
240### For more details (and more options)
241### read man pppd</literal>
242<userinput>EOF
243chmod 600 /etc/ppp/peers/<replaceable>peername</replaceable></userinput></screen>
244 </sect4>
245
246 <sect4>
247 <title>PPPoATM connections</title>
248
249 <para>PPPoA connections are very similar to PPPoE, the main differences
250 are that you use the pppoatm.so plugin instead of rp-pppoe.so, you don't
251 specify the ethernet interface (it uses ppp0) and you need to VP/VC
252 numbers that are used by your ISP (there is a list of VP/VC numbers
253 <ulink url="http://www.linux-usb.org/SpeedTouch/faq/index.html#q12">here
254 </ulink>)</para>
255
256<screen role="root"><userinput>cat &gt;/etc/ppp/peers/<replaceable>peername</replaceable> &lt;&lt;"EOF"</userinput>
257<literal>plugin pppoatm.so
258
259# Your VP/VC numbers. eg, in Britain it is 0.38, in
260# France they use 8.35. Google is your friend :)
2610.38
262
263# Your username at the ISP. This is the same as the
264# first column in /etc/ppp/*-secrets:
265user "<replaceable>jdoe</replaceable>"
266
267# remotename is not needed if you only have one ISP account and
268# hence an asterisk in the second column in pap or chap-secrets:
269# remotename "<replaceable>adsl</replaceable>"
270
271# If it's not working and you want pppd to be
272# more verbose in /var/log/sys.log, add debug:
273# debug
274
275# If you have a static IP address (eg, 12.34.56.78) you
276# can specify it by following it with a colon:
277# 12.34.56.78:
278
279# Otherwise accept whatever IP address the ISP gives you:
280noipdefault
281
282# The settings below usually don't need to be changed
283noauth
284hide-password
285updetach
286defaultroute
287# create /etc/ppp/resolv.conf:
288usepeerdns
289
290### For more details (and more options)
291### read man pppd</literal>
292<userinput>EOF
293chmod 600 /etc/ppp/peers/<replaceable>peername</replaceable></userinput></screen>
294
295 </sect4>
296
297 <sect4>
298 <title>Dialup Modem Connection</title>
299
300<!-- This section has been tested with various ISPs in Yekaterinburg,
301 Russia using Lucent WinModem. I cannot test it anymore, because
302 there is no free PCI slot for the modem in my new computer. However,
303 it is similar enough to GPRS for me to be sure that it still works,
304 and nobody complained about non-working dialup on the LFS LiveCD.
305 - Alexander E. Patrakov -->
306
307 <para>Dialup connections are established with the help of a modem
308 connected to a computer and the telephone line. The modem dials a
309 telephone number of the ISP's modem, and they exchange data using
310 the signal frequencies 300-4000 Hz. Typical data transfer
311 rate is 40-50 kilobits per second, and the gateway ping time
312 (latency) is up to 300-400 ms. In order to configure the
313 dialup connection, it is required to know the telephone number of
314 the ISP's modem pool, the username and the password.</para>
315
316 <para>In order to configure a dialup connection, two files have to
317 be created: a chat script that automates the connection procedure
318 (common for all dialup accounts), and a peer file that provides
319 configuration information about a specific connection to
320 <command>pppd</command>:</para>
321<screen role="root"><userinput>cat &gt;/etc/ppp/dialup.chat &lt;&lt;"EOF"</userinput>
322<literal>ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE'
323ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
324ABORT ERROR ABORT BLACKLISTED
325
326TIMEOUT 5
327'' AT
328# \T is the phone number, passed from /etc/ppp/peers/<replaceable>dialup</replaceable>
329OK-+++\dATH0-OK ATD\T
330TIMEOUT 75
331CONNECT \d\c</literal>
332<userinput>EOF
333
334cat &gt;/etc/ppp/peers/<replaceable>dialup</replaceable> &lt;&lt;"EOF"</userinput>
335<literal># Your username at the ISP
336user "<replaceable>jdoe</replaceable>"
337# What should be in the second column in /etc/ppp/*-secrets
338remotename "<replaceable>dialup</replaceable>"
339# Replace <replaceable>TTTTTTT</replaceable> with the ISP phone number
340connect "/usr/sbin/chat -T <replaceable>TTTTTTT</replaceable> -f /etc/ppp/dialup.chat"
341
342# Specify your modem serial port and speed below
343<replaceable>/dev/ttyS0</replaceable>
344<replaceable>115200</replaceable>
345
346# The settings below usually don't need to be changed
347updetach
348noauth
349hide-password
350debug
351lock
352defaultroute
353noipdefault
354usepeerdns</literal>
355<userinput>EOF</userinput></screen>
356
357 <para>The first three lines of the
358 <filename>/etc/ppp/dialup.chat</filename> file abort the script when
359 it receives an indication of an error from the modem. Then the timeout
360 is set to 5 seconds and the script checks that the modem responds to
361 the dummy AT command. If not, measures are taken to dewedge it
362 (by interrupting the data transfer and going on hook). Then the
363 telephone number is dialed, and the script waits for the answer for
364 75 seconds. The serial connection is considered established when the
365 modem sends the string CONNECT.</para>
366
367 </sect4>
368
369 <sect4>
370 <title>GPRS and EDGE Connections</title>
371
372<!-- This section has been tested with GPRS service from MOTIV in
373 Yekaterinburg, Russia. According to forum messages, the procedure
374 also works with EDGE, but my cellular phone (Motorola C350) does not
375 support EDGE. - Alexander E. Patrakov -->
376
377 <para>GPRS and EDGE connections are established with the help of a
378 cellular phone connected to a computer via serial, USB, or Bluetooth.
379 The phone exchanges data packets with the nearest base station,
380 which can be up to 35 kilometers away.
381
382 <!-- FIXME: watch for new standards! SkyLink is already offering
383 3.1 megabits per second with CDMA mobile phones, and
384 the configuration below doesn't work. It is reported that
385 a regular dialup setup with the telephone number "#777",
386 username "mobile" and password "internet" works with SkyLink. -->
387
388 The maximum possible data transfer rate is 170 kilobits per second
389 for GPRS and 474 kilobits per second for EDGE, but many cellular
390 operators impose lower limits, such as 64 kilobits per second. The
391 gateway ping time is 900 ms for GPRS, which makes playing many online
392 games impossible and causes connection to ICQ to be unreliable.
393 In order to configure a GPRS or EDGE connection,
394 it is required to know the access point name (APN) and, rarely, the
395 username and the password.
396 In most cases, billing is based on the telephone number, and the
397 username/password pair is not needed, as assumed in the example
398 below.</para>
399
400 <para>In order to configure a GPRS connection, two files have to
401 be created: a chat script that automates the connection procedure
402 (common for all GPRS accounts), and a peer file that provides
403 configuration information about a specific connection to
404 <command>pppd</command>:</para>
405<screen role="root"><userinput>cat &gt;/etc/ppp/gprs.chat &lt;&lt;"EOF"</userinput>
406<literal>ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE'
407ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
408ABORT ERROR ABORT BLACKLISTED
409
410TIMEOUT 5
411'' AT
412OK-+++\dATH0-OK ATZ
413# \T is the APN, passed from /etc/ppp/peers/<replaceable>gprs</replaceable>
414# This example stores the APN as profile #1 in the phone.
415# The "telephone number", *99***&lt;profile_number&gt;#, is always the same.
416# If you want to store this as profile #2, change 1 to 2 in the
417# following two lines.
418OK AT+CGDCONT=<replaceable>1</replaceable>,"IP","\T"
419OK "ATD*99***<replaceable>1</replaceable>#"
420CONNECT \d\c</literal>
421<userinput>EOF
422
423cat &gt;/etc/ppp/peers/<replaceable>gprs</replaceable> &lt;&lt;"EOF"</userinput>
424<literal># Replace <replaceable>inet.example.com</replaceable> with the proper APN for your provider
425connect "/usr/sbin/chat -T <replaceable>inet.example.com</replaceable> -f /etc/ppp/gprs.chat"
426
427# Specify your cellphone serial port and speed below
428# Note: you must manually send some vendor-specific AT commands
429# to certain old cellular phones (such as Sony-Ericsson T200)
430# in order to achieve connection speed more than 9600 bits per second.
431<replaceable>/dev/ttyS1</replaceable>
432<replaceable>115200</replaceable>
433
434# The settings below usually don't need to be changed
435noccp
436noauth
437updetach
438debug
439lock
440defaultroute
441noipdefault
442usepeerdns</literal>
443<userinput>EOF</userinput></screen>
444 </sect4>
445
446 <sect4>
447 <title>Establishing the connection manually</title>
448
449 <para>In order to establish a PPP connection described by the
450 <filename>/etc/ppp/peers/<replaceable>peername</replaceable></filename>
451 file run (as <systemitem class="username">root</systemitem> or as a member
452 of the <systemitem class="groupname">pppusers</systemitem> group):</para>
453<screen><userinput>pppd call <replaceable>peername</replaceable></userinput></screen>
454
455 <para>In order to stop the connection, run:</para>
456<screen><userinput>killall pppd</userinput></screen>
457
458 <!-- There are an infinite number of ways that computers can be
459 connected together. Trying to write a bootscript that can cope with every
460 possible network configuration is the road to madness. Andrew Benton -->
461
462 <para>Writing a bootscript that brings up the connection during the boot
463 process is left as an exercise for the reader ;)</para>
464
465 </sect4>
466
467 </sect3>
468
469 </sect2>
470 <sect2 role="content">
471 <title>Contents</title>
472
473 <segmentedlist>
474 <segtitle>Installed Programs</segtitle>
475 <segtitle>Installed Libraries</segtitle>
476 <segtitle>Installed Directories</segtitle>
477
478 <seglistitem>
479 <seg>chat, pppd, pppdump, pppoe-discovery and pppstats</seg>
480 <seg>Several plugin modules installed in
481 <filename class='directory'>/usr/lib/pppd/&ppp-version;</filename></seg>
482 <seg>/etc/ppp, /usr/include/pppd and /usr/lib/pppd</seg>
483 </seglistitem>
484 </segmentedlist>
485
486 <variablelist>
487 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
488 <?dbfo list-presentation="list"?>
489 <?dbhtml list-presentation="table"?>
490
491 <varlistentry id="chat">
492 <term><command>chat</command></term>
493 <listitem>
494 <para>defines a conversational exchange between the computer and the
495 modem. Its primary purpose is to establish the connection between the
496 Point-to-Point Protocol Daemon (PPPD) and the remote
497 <command>pppd</command> process.</para>
498 <indexterm zone="ppp chat">
499 <primary sortas="b-chat">chat</primary>
500 </indexterm>
501 </listitem>
502 </varlistentry>
503
504 <varlistentry id="pppd">
505 <term><command>pppd</command></term>
506 <listitem>
507 <para>is the Point to Point Protocol daemon.</para>
508 <indexterm zone="ppp pppd">
509 <primary sortas="b-pppd">pppd</primary>
510 </indexterm>
511 </listitem>
512 </varlistentry>
513
514 <varlistentry id="pppdump">
515 <term><command>pppdump</command></term>
516 <listitem>
517 <para>is used to convert
518 <application>PPP</application> record files to a readable
519 format.</para>
520 <indexterm zone="ppp pppdump">
521 <primary sortas="b-pppdump">pppdump</primary>
522 </indexterm>
523 </listitem>
524 </varlistentry>
525
526 <varlistentry id="pppoe-discovery">
527 <term><command>pppoe-discovery</command></term>
528 <listitem>
529 <para>performs the same discovery process as the pppoe plugin, but
530 does not initiate a <application>PPP</application> session.</para>
531 <indexterm zone="ppp pppoe-discovery">
532 <primary sortas="b-pppoe-discovery">pppoe-discovery</primary>
533 </indexterm>
534 </listitem>
535 </varlistentry>
536
537 <varlistentry id="pppstats">
538 <term><command>pppstats</command></term>
539 <listitem>
540 <para>is used to print
541 <application>PPP</application> statistics.</para>
542 <indexterm zone="ppp pppstats">
543 <primary sortas="b-pppstats">pppstats</primary>
544 </indexterm>
545 </listitem>
546 </varlistentry>
547
548 </variablelist>
549
550 </sect2>
551
552</sect1>
Note: See TracBrowser for help on using the repository browser.