source: connect/dialup/ppp.xml@ 782820d

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 782820d was 782820d, checked in by Alexander E. Patrakov <alexander@…>, 16 years ago

Added dialup and GPRS/EDGE configuration instructions to the PPP page.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7258 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 18.1 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 "183800762e266132218b204dfb428d29">
10 <!ENTITY ppp-size "673 KB">
11 <!ENTITY ppp-buildsize "5.6 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 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>PPP-&ppp-version;</title>
24
25 <indexterm zone="ppp">
26 <primary sortas="a-PPP">PPP</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to PPP</title>
31
32 <para>The <application>PPP</application> package contains the
33 <command>pppd</command> daemon and the <command>chat</command>
34 program. This is used for connecting to other machines; often for connecting to
35 the Internet via a dial-up or PPPoE connection to an ISP.</para>
36
37 <bridgehead renderas="sect3">Package Information</bridgehead>
38 <itemizedlist spacing="compact">
39 <listitem>
40 <para>Download (HTTP): <ulink url="&ppp-download-http;"/></para>
41 </listitem>
42 <listitem>
43 <para>Download (FTP): <ulink url="&ppp-download-ftp;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download MD5 sum: &ppp-md5sum;</para>
47 </listitem>
48 <listitem>
49 <para>Download size: &ppp-size;</para>
50 </listitem>
51 <listitem>
52 <para>Estimated disk space required: &ppp-buildsize;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated build time: &ppp-time;</para>
56 </listitem>
57 </itemizedlist>
58
59 <bridgehead renderas="sect3">PPP Dependencies</bridgehead>
60
61 <bridgehead renderas="sect4">Optional</bridgehead>
62 <para role="optional"><xref linkend="libpcap"/> (needed to do PPP filtering),
63 <xref linkend="linux-pam"/> (to authenticate incoming calls using PAM),
64 and <ulink url="http://linux-atm.sourceforge.net/">Linux ATM</ulink> (to
65 build the pppoatm.so plugin)</para>
66
67 <para condition="html" role="usernotes">User Notes:
68 <ulink url="&blfs-wiki;/PPP"/></para>
69
70 </sect2>
71
72 <sect2 role="installation">
73 <title>Installation of PPP</title>
74
75 <note id="ppp-kernel">
76 <para><application>PPP</application> support (CONFIG_PPP),
77 the asynchronous line discipline (CONFIG_PPP_ASYNC), and the
78 driver for your serial port device must be
79 compiled into the kernel or loaded as a kernel module.
80 Udev doesn't load the ppp_generic module automatically, it must be
81 mentioned in the <filename>/etc/sysconfig/modules</filename> file.</para>
82 </note>
83
84 <indexterm zone="ppp ppp-kernel">
85 <primary sortas="d-PPP-support">PPP support</primary>
86 </indexterm>
87
88 <para>Install <application>PPP</application> by running the
89 following commands:</para>
90
91<screen><userinput>./configure --prefix=/usr &amp;&amp;
92make</userinput></screen>
93
94 <para>This package does not come with a test suite.</para>
95
96 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
97
98<screen role='root'><userinput>groupadd -g 52 pppusers &amp;&amp;
99make install &amp;&amp;
100<!-- FIXME: is "make install-etcppp" needed for KPPP/WvDial?
101The example configuration below overwrites two of three files, and
102already includes the "lock" option in each peer file
103-->make install-etcppp &amp;&amp;
104install -m755 scripts/{pon,poff,plog} /usr/bin &amp;&amp;
105instal -m644 scripts/pon.1 /usr/share/man/man1</userinput></screen>
106
107 </sect2>
108
109 <sect2 role="commands">
110 <title>Command Explanations</title>
111
112 <para><command>make install-etcppp</command>: This command puts example
113 configuration files in <filename class="directory">/etc/ppp</filename>.</para>
114
115<!-- FIXME: the three options below are taken from pppd/Makefile.linux file.
116 They have not been tested. There are other options, such as USE_SRP=y,
117 that cannot work (in this case, because libsrp is not available from
118 anywhere) - Alexander E. Patrakov -->
119
120 <para><parameter>USE_PAM=y</parameter>: Add this argument to the
121 <command>make</command> command to compile in support for PAM, usually
122 needed for authenticating inbound calls against a central database.</para>
123
124 <para><parameter>HAVE_INET6=y</parameter>: Add this argument to the
125 <command>make</command> command to compile in support for IPv6.</para>
126
127 <para><parameter>CBCP=y</parameter>: Add this argument to the
128 <command>make</command> command to compile in support for
129 Microsoft proprietary Callback Control Protocol.</para>
130
131 </sect2>
132
133 <sect2 role="configuration">
134 <title>Configuring PPP</title>
135
136 <sect3 id="ppp-config">
137 <title>Config Files</title>
138
139 <para><filename>/etc/ppp/*</filename></para>
140
141 <indexterm zone="ppp ppp-config">
142 <primary sortas="e-etc-ppp-star">/etc/ppp/*</primary>
143 </indexterm>
144
145 </sect3>
146
147 <sect3>
148 <title>Configuration Information</title>
149
150 <para>The <application>PPP</application> daemon requires some
151 configuration. The main trick is scripting the connection.
152 For dialup and GPRS connections, this can be done
153 either using the <command>chat</command> program which comes with
154 this package, or by using external tools such as <xref linkend="wvdial"/>
155 or <application>KPPP</application> from
156 <xref linkend="kdenetwork"/>. The text below explains how to set up
157 <!-- PPPoE, --> dialup and GPRS connections using only tools provided with
158 the <application>PPP</application> package. All configuration steps
159 in this section are executed as
160 <systemitem class="username">root</systemitem> user.</para>
161
162 <sect4>
163 <title>Setting the passwords</title>
164
165 <para>Passwords are stored in <filename>/etc/ppp/pap-secrets</filename>
166 and <filename>/etc/ppp/chap-secrets</filename> files, depending on the
167 authentication method used by the ISP. If in doubt, place the password
168 into both files. E.g., if the username given by the ISP is
169 <quote>jdoe</quote>, the password is <quote>guessit</quote>, the
170 ISP uses PAP and the user wants to name this account
171 <quote>dialup</quote> in order to distinguish it from other PPP accounts,
172 the following file has to be created:</para>
173<screen role="root"><userinput>touch /etc/ppp/pap-secrets
174chmod 600 /etc/ppp/pap-secrets
175cat &gt;&gt;/etc/ppp/pap-secrets &lt;&lt;"EOF"</userinput>
176<literal># username remotename password IP for the peer
177jdoe dialup guessit *</literal>
178<userinput>EOF</userinput></screen>
179 </sect4>
180
181 <sect4>
182 <title>DNS Server Configuration</title>
183
184 <para>If you don't run your own caching DNS server, create a simple
185 <command>ip-up</command> script (to be called by <command>pppd</command>
186 automatically once the connection is brought up) that populates the
187 <filename>/etc/resolv.conf</filename> file with nameservers specified
188 by the ISP.</para>
189<screen role="root"><userinput>cat &gt;/etc/ppp/ip-up &lt;&lt;"EOF"</userinput>
190<literal>#!/bin/sh
191if [ "$USEPEERDNS" = "1" ] &amp;&amp; [ -s /etc/ppp/resolv.conf ]
192then
193 install -m 644 /etc/ppp/resolv.conf /etc/resolv.conf
194fi</literal>
195<userinput>EOF
196chmod 755 /etc/ppp/ip-up</userinput></screen>
197 <para>If you use a caching DNS server such as <xref linkend="bind"/>
198 or <ulink url="http://www.phys.uu.nl/~rombouts/pdnsd.html">Pdnsd</ulink>,
199 the script above is wrong for you. In such case, write your
200 own script that tells your caching nameserver to forward queries to
201 upstream DNS servers specified in the $DNS1 and $DNS2 environment
202 variables.</para>
203 <!-- FIXME: write the replacement script that works with Bind -->
204 </sect4>
205
206 <sect4>
207 <title>Dialup Modem Connection</title>
208<!-- This section has been tested with various ISPs in Yekaterinburg,
209 Russia using Lucent WinModem. I cannot test it anymore, because
210 there is no free PCI slot for the modem in my new computer. However,
211 it is similar enough to GPRS for me to be sure that it still works,
212 and nobody complained about non-working dialup on the LFS LiveCD.
213 - Alexander E. Patrakov -->
214
215 <para>Dialup connections are established with the help of a modem
216 connected to a computer and the telephone line. The modem dials a
217 telephone number of the ISP's modem, and they exchange data using
218 the signal frequencies 300-4000 Hz. Typical data transfer
219 rate is 40-50 kilobits per second, and the gateway ping time
220 (latency) is up to 300-400 ms. In order to configure the
221 dialup connection, it is required to know the telephone number of
222 the ISP's modem pool, the username and the password.</para>
223
224 <para>In order to configure a dialup connection, two files have to
225 be created: a chat script that automates the connection procedure
226 (common for all dialup accounts), and a peer file that provides
227 configuration information about a specific connection to
228 <command>pppd</command>:</para>
229<screen role="root"><userinput>cat $gt;/etc/ppp/dialup.chat &lt;&lt;"EOF"</userinput>
230<literal>ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE'
231ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
232ABORT ERROR ABORT BLACKLISTED
233
234TIMEOUT 5
235'' AT
236# \T is the phone number, passed from /etc/ppp/peers/<replaceable>dialup</replaceable>
237OK-+++\dATH0-OK ATD\T
238TIMEOUT 75
239CONNECT \d\c</literal>
240<userinput>EOF
241
242cat &gt;/etc/ppp/peers/<replaceable>dialup</replaceable> &lt;&lt;"EOF"</userinput>
243<literal># Your username at the ISP
244user "<replaceable>jdoe</replaceable>"
245# What should be in the second column in /etc/ppp/*-secrets
246remotename "<replaceable>dialup</replaceable>"
247# Replace <replaceable>TTTTTTT</replaceable> with the ISP phone number
248connect "/usr/sbin/chat -T <replaceable>TTTTTTT</replaceable> -f /etc/ppp/dialup.chat"
249
250# Specify your modem serial port and speed below
251<replaceable>/dev/ttyS0</replaceable>
252<replaceable>115200</replaceable>
253
254# The settings below usually don't need to be changed
255updetach
256noauth
257hide-password
258debug
259lock
260defaultroute
261noipdefault
262usepeerdns</literal>
263<userinput>EOF</userinput></screen>
264
265 <para>The first three lines of the
266 <filename>/etc/ppp/dialup.chat</filename> file abort the script when
267 it receives an indication of an error from the modem. Then the timeout
268 is set to 5 seconds and the script checks that the modem responds to
269 the dummy AT command at all. If not, measures are taken to dewedge it
270 (by interrupting the data transfer and going on hook). Then the
271 telephone number is dialed, and the script waits for the answer for
272 75 seconds. The serial connection is considered established when the
273 modem sends the string CONNECT.</para>
274
275 </sect4>
276
277 <sect4>
278 <title>GPRS and EDGE Connections</title>
279<!-- This section has been tested with GPRS service from MOTIV in
280 Yekaterinburg, Russia. According to forum messages, the procedure
281 also works with EDGE, but my cellular phone (Motorola C350) does not
282 support EDGE. - Alexander E. Patrakov -->
283
284 <para>GPRS and EDGE connections are established with the help of a
285 cellular phone connected to a computer via serial or USB cable, or
286 using Bluetooth.
287 The phone exchanges data packets with the nearest base station,
288 which can be up to 35 kilometers away.
289
290 <!-- FIXME: watch for new standards! SkyLink is already offering
291 3.1 megabits per second with CDMA mobile phones, and
292 the configuration below doesn't work. It is reported that
293 a regular dialup setup with the telephone number "#777",
294 username "mobile" and password "internet" works with SkyLink. -->
295
296 The maximum possible data transfer rate is 170 kilobits per second
297 for GPRS and 474 kilobits per second for EDGE, but many cellular
298 operators impose lower limits, such as 64 kilobits per second. The
299 gateway ping time is 900 ms for GPRS, which makes playing many online
300 games impossible and causes connection to ICQ to be unreliable.
301 In order to configure a GPRS or EDGE connection,
302 it is required to know the access point name (APN) and, rarely, the
303 username and the password.
304 In most cases, billing is based on the telephone number, and the
305 username/password pair is not needed, as assumed in the example
306 below.</para>
307
308 <para>In order to configure a GPRS connection, two files have to
309 be created: a chat script that automates the connection procedure
310 (common for all GPRS accounts), and a peer file that provides
311 configuration information about a specific connection to
312 <command>pppd</command>:</para>
313<screen role="root"><userinput>cat &gt;/etc/ppp/gprs.chat &lt;&lt;"EOF"</userinput>
314<literal>ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE'
315ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
316ABORT ERROR ABORT BLACKLISTED
317
318TIMEOUT 5
319'' AT
320OK-+++\dATH0-OK ATZ
321# \T is the APN, passed from /etc/ppp/peers/<replaceable>gprs</replaceable>
322# This example stores the APN as profile #1 in the phone.
323# The telephone number, *99***&lt;profile_number&gt;#, is always the same
324# If you want to store this as profile #2, change 1 to 2 in the
325# following two lines.
326OK AT+CGDCONT=<replaceable>1</replaceable>,"IP","\T"
327OK "ATD*99***<replaceable>1</replaceable>#"
328CONNECT \d\c</literal>
329<userinput>EOF
330
331cat &gt;/etc/ppp/peers/<replaceable>gprs</replaceable> &lt;&lt;"EOF"</userinput>
332<literal># Replace <replaceable>inet.example.com</replaceable> with the proper APN for your provider
333connect "/usr/sbin/chat -T <replaceable>inet.example.com</replaceable> -f /etc/ppp/gprs.chat"
334
335# Specify your cellphone serial port and speed below
336# Note: you must manually send some vendor-specific AT commands
337# to certain old cellular phones (such as Sony-Ericsson T200)
338# in order to achieve connection speed more than 9600 bits ber second.
339<replaceable>/dev/ttyS1</replaceable>
340<replaceable>115200</replaceable>
341
342# The settings below usually don't need to be changed
343noccp
344noauth
345updetach
346debug
347lock
348defaultroute
349noipdefault
350usepeerdns</literal>
351<userinput>EOF</userinput></screen>
352 </sect4>
353
354 <sect4>
355 <title>Establishing the connection</title>
356
357 <para>In order to establish a PPP connection described by the
358 <filename>/etc/ppp/peers/<replaceable>peername</replaceable></filename>
359 file, run, as root or as a member of the
360 <systemitem class="groupname">pppusers</systemitem> group:</para>
361<screen><userinput>pon <replaceable>peername</replaceable></userinput></screen>
362
363 <para>In order to tear the connection down, run:</para>
364<screen><userinput>poff <replaceable>peername</replaceable></userinput></screen>
365
366 </sect4>
367 </sect3>
368
369 </sect2>
370
371 <sect2 role="content">
372 <title>Contents</title>
373
374 <segmentedlist>
375 <segtitle>Installed Programs</segtitle>
376 <segtitle>Installed Libraries</segtitle>
377 <segtitle>Installed Directories</segtitle>
378
379 <seglistitem>
380 <seg>chat, pon, poff, plog, pppd, pppdump, pppoe-discovery and pppstats</seg>
381 <seg>Several plugin modules installed in
382 <filename class='directory'>/usr/lib/pppd/&ppp-version;</filename></seg>
383 <seg>/etc/ppp, /usr/include/pppd and /usr/lib/pppd</seg>
384 </seglistitem>
385 </segmentedlist>
386
387 <variablelist>
388 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
389 <?dbfo list-presentation="list"?>
390 <?dbhtml list-presentation="table"?>
391
392 <varlistentry id="chat">
393 <term><command>chat</command></term>
394 <listitem>
395 <para>defines a conversational exchange between the computer and the
396 modem. Its primary purpose is to establish the connection between the
397 Point-to-Point Protocol Daemon (PPPD) and the remote
398 <command>pppd</command> process.</para>
399 <indexterm zone="ppp chat">
400 <primary sortas="b-chat">chat</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
405 <varlistentry id="pon">
406 <term><command>pon</command></term>
407 <listitem>
408 <para>is the script that establishes a PPP connection</para>
409 <indexterm zone="ppp pon">
410 <primary sortas="b-pon">pon</primary>
411 </indexterm>
412 </listitem>
413 </varlistentry>
414
415 <varlistentry id="poff">
416 <term><command>poff</command></term>
417 <listitem>
418 <para>is the script that tears a PPP connection down.</para>
419 <indexterm zone="ppp poff">
420 <primary sortas="b-poff">poff</primary>
421 </indexterm>
422 </listitem>
423 </varlistentry>
424
425 <varlistentry id="plog">
426 <term><command>plog</command></term>
427 <listitem>
428 <para>is a script that prints the tail of the PPP log.</para>
429 <indexterm zone="ppp plog">
430 <primary sortas="b-plog">plog</primary>
431 </indexterm>
432 </listitem>
433 </varlistentry>
434
435
436 <varlistentry id="pppd">
437 <term><command>pppd</command></term>
438 <listitem>
439 <para>is the Point to Point Protocol daemon.</para>
440 <indexterm zone="ppp pppd">
441 <primary sortas="b-pppd">pppd</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
446 <varlistentry id="pppdump">
447 <term><command>pppdump</command></term>
448 <listitem>
449 <para>is used to convert
450 <application>PPP</application> record files to a readable
451 format.</para>
452 <indexterm zone="ppp pppdump">
453 <primary sortas="b-pppdump">pppdump</primary>
454 </indexterm>
455 </listitem>
456 </varlistentry>
457
458 <varlistentry id="pppstats">
459 <term><command>pppstats</command></term>
460 <listitem>
461 <para>is used to print
462 <application>PPP</application> statistics.</para>
463 <indexterm zone="ppp pppstats">
464 <primary sortas="b-pppstats">pppstats</primary>
465 </indexterm>
466 </listitem>
467 </varlistentry>
468
469 </variablelist>
470
471 </sect2>
472
473</sect1>
Note: See TracBrowser for help on using the repository browser.