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), the
|
---|
78 | driver for your serial port device and/or the PPP over Ethernet
|
---|
79 | (PPPoE) protocol driver (CONGIG_PPPOE) must be compiled into the
|
---|
80 | kernel or loaded as kernel modules.
|
---|
81 | Udev doesn't load the ppp_generic and pppoe modules automatically, they
|
---|
82 | must be mentioned in the <filename>/etc/sysconfig/modules</filename>
|
---|
83 | file.</para>
|
---|
84 | </note>
|
---|
85 |
|
---|
86 | <indexterm zone="ppp ppp-kernel">
|
---|
87 | <primary sortas="d-PPP-support">PPP support</primary>
|
---|
88 | </indexterm>
|
---|
89 |
|
---|
90 | <para>Create (as <systemitem class="username">root</systemitem>)
|
---|
91 | the group for users who may run <application>PPP</application>:</para>
|
---|
92 |
|
---|
93 | <screen role="root"><userinput>groupadd -g 52 pppusers</userinput></screen>
|
---|
94 |
|
---|
95 | <para>Install <application>PPP</application> by running the
|
---|
96 | following commands:</para>
|
---|
97 |
|
---|
98 | <screen><userinput>./configure --prefix=/usr &&
|
---|
99 | make</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 &&
|
---|
106 | <!-- FIXME: is "make install-etcppp" needed for KPPP/WvDial?
|
---|
107 | The example configuration below overwrites two of three files, and
|
---|
108 | already includes the "lock" option in each peer file
|
---|
109 | -->make install-etcppp &&
|
---|
110 | install -m755 scripts/{pon,poff,plog} /usr/bin &&
|
---|
111 | instal -m644 scripts/pon.1 /usr/share/man/man1</userinput></screen>
|
---|
112 |
|
---|
113 | </sect2>
|
---|
114 |
|
---|
115 | <sect2 role="commands">
|
---|
116 | <title>Command Explanations</title>
|
---|
117 |
|
---|
118 | <para><command>make install-etcppp</command>: This command puts example
|
---|
119 | configuration files in <filename class="directory">/etc/ppp</filename>.</para>
|
---|
120 |
|
---|
121 | <!-- FIXME: the three options below are taken from pppd/Makefile.linux file.
|
---|
122 | They have not been tested. There are other options, such as USE_SRP=y,
|
---|
123 | that cannot work (in this case, because libsrp is not available from
|
---|
124 | anywhere) - Alexander E. Patrakov -->
|
---|
125 |
|
---|
126 | <para><parameter>USE_PAM=y</parameter>: Add this argument to the
|
---|
127 | <command>make</command> command to compile in support for PAM, usually
|
---|
128 | needed for authenticating inbound calls against a central database.</para>
|
---|
129 |
|
---|
130 | <para><parameter>HAVE_INET6=y</parameter>: Add this argument to the
|
---|
131 | <command>make</command> command to compile in support for IPv6.</para>
|
---|
132 |
|
---|
133 | <para><parameter>CBCP=y</parameter>: Add this argument to the
|
---|
134 | <command>make</command> command to compile in support for
|
---|
135 | Microsoft proprietary Callback Control Protocol.</para>
|
---|
136 |
|
---|
137 | </sect2>
|
---|
138 |
|
---|
139 | <sect2 role="configuration">
|
---|
140 | <title>Configuring PPP</title>
|
---|
141 |
|
---|
142 | <sect3 id="ppp-config">
|
---|
143 | <title>Config Files</title>
|
---|
144 |
|
---|
145 | <para><filename>/etc/ppp/*</filename></para>
|
---|
146 |
|
---|
147 | <indexterm zone="ppp ppp-config">
|
---|
148 | <primary sortas="e-etc-ppp-star">/etc/ppp/*</primary>
|
---|
149 | </indexterm>
|
---|
150 |
|
---|
151 | </sect3>
|
---|
152 |
|
---|
153 | <sect3>
|
---|
154 | <title>Configuration Information</title>
|
---|
155 |
|
---|
156 | <para>The <application>PPP</application> daemon requires some
|
---|
157 | configuration. The main trick is scripting the connection.
|
---|
158 | For dialup and GPRS connections, this can be done
|
---|
159 | either using the <command>chat</command> program which comes with
|
---|
160 | this package, or by using external tools such as
|
---|
161 | <ulink url="http://alumnit.ca/wiki/?WvDial">WvDial</ulink>
|
---|
162 | or <application>KPPP</application> from
|
---|
163 | <xref linkend="kdenetwork"/>. The text below explains how to set up
|
---|
164 | dialup and GPRS and PPPoE connections using only tools provided with
|
---|
165 | the <application>PPP</application> package. All configuration steps
|
---|
166 | in this section are executed as
|
---|
167 | <systemitem class="username">root</systemitem> user.</para>
|
---|
168 |
|
---|
169 | <sect4>
|
---|
170 | <title>Setting the passwords</title>
|
---|
171 |
|
---|
172 | <warning><para>Instructions in this section result in your password
|
---|
173 | appearing on the screen in a visible clear-text form. Make sure that
|
---|
174 | nobody else looks at the screen.</para></warning>
|
---|
175 |
|
---|
176 | <para>Passwords are stored in <filename>/etc/ppp/pap-secrets</filename>
|
---|
177 | and <filename>/etc/ppp/chap-secrets</filename> files, depending on the
|
---|
178 | authentication method used by the ISP. If in doubt, place the password
|
---|
179 | into both files. E.g., if the username given by the ISP is
|
---|
180 | <quote>jdoe</quote>, the password is <quote>guessit</quote>, the
|
---|
181 | ISP uses PAP and the user wants to name this account
|
---|
182 | <quote>dialup</quote> in order to distinguish it from other PPP accounts,
|
---|
183 | the following file has to be created:</para>
|
---|
184 | <screen role="root"><userinput>touch /etc/ppp/pap-secrets
|
---|
185 | chmod 600 /etc/ppp/pap-secrets
|
---|
186 | cat >>/etc/ppp/pap-secrets <<"EOF"</userinput>
|
---|
187 | <literal># username remotename password IP for the peer
|
---|
188 | jdoe dialup guessit *</literal>
|
---|
189 | <userinput>EOF</userinput></screen>
|
---|
190 | </sect4>
|
---|
191 |
|
---|
192 | <sect4>
|
---|
193 | <title>DNS Server Configuration</title>
|
---|
194 |
|
---|
195 | <para>If you don't run your own caching DNS server, create a simple
|
---|
196 | <command>ip-up</command> script (to be called by <command>pppd</command>
|
---|
197 | automatically once the connection is brought up) that populates the
|
---|
198 | <filename>/etc/resolv.conf</filename> file with nameservers specified
|
---|
199 | by the ISP.</para>
|
---|
200 | <screen role="root"><userinput>cat >/etc/ppp/ip-up <<"EOF"</userinput>
|
---|
201 | <literal>#!/bin/sh
|
---|
202 | if [ "$USEPEERDNS" = "1" ] && [ -s /etc/ppp/resolv.conf ]
|
---|
203 | then
|
---|
204 | install -m 644 /etc/ppp/resolv.conf /etc/resolv.conf
|
---|
205 | fi</literal>
|
---|
206 | <userinput>EOF
|
---|
207 | chmod 755 /etc/ppp/ip-up</userinput></screen>
|
---|
208 | <para>If you use a caching DNS server such as <xref linkend="bind"/>
|
---|
209 | or <ulink url="http://www.phys.uu.nl/~rombouts/pdnsd.html">Pdnsd</ulink>,
|
---|
210 | the script above is wrong for you. In such case, write your
|
---|
211 | own script that tells your caching nameserver to forward queries to
|
---|
212 | upstream DNS servers specified in the $DNS1 and $DNS2 environment
|
---|
213 | variables.</para>
|
---|
214 | <!-- FIXME: write the replacement script that works with Bind -->
|
---|
215 | </sect4>
|
---|
216 |
|
---|
217 | <sect4>
|
---|
218 | <title>Dialup Modem Connection</title>
|
---|
219 | <!-- This section has been tested with various ISPs in Yekaterinburg,
|
---|
220 | Russia using Lucent WinModem. I cannot test it anymore, because
|
---|
221 | there is no free PCI slot for the modem in my new computer. However,
|
---|
222 | it is similar enough to GPRS for me to be sure that it still works,
|
---|
223 | and nobody complained about non-working dialup on the LFS LiveCD.
|
---|
224 | - Alexander E. Patrakov -->
|
---|
225 |
|
---|
226 | <para>Dialup connections are established with the help of a modem
|
---|
227 | connected to a computer and the telephone line. The modem dials a
|
---|
228 | telephone number of the ISP's modem, and they exchange data using
|
---|
229 | the signal frequencies 300-4000 Hz. Typical data transfer
|
---|
230 | rate is 40-50 kilobits per second, and the gateway ping time
|
---|
231 | (latency) is up to 300-400 ms. In order to configure the
|
---|
232 | dialup connection, it is required to know the telephone number of
|
---|
233 | the ISP's modem pool, the username and the password.</para>
|
---|
234 |
|
---|
235 | <para>In order to configure a dialup connection, two files have to
|
---|
236 | be created: a chat script that automates the connection procedure
|
---|
237 | (common for all dialup accounts), and a peer file that provides
|
---|
238 | configuration information about a specific connection to
|
---|
239 | <command>pppd</command>:</para>
|
---|
240 | <screen role="root"><userinput>cat >/etc/ppp/dialup.chat <<"EOF"</userinput>
|
---|
241 | <literal>ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE'
|
---|
242 | ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
|
---|
243 | ABORT ERROR ABORT BLACKLISTED
|
---|
244 |
|
---|
245 | TIMEOUT 5
|
---|
246 | '' AT
|
---|
247 | # \T is the phone number, passed from /etc/ppp/peers/<replaceable>dialup</replaceable>
|
---|
248 | OK-+++\dATH0-OK ATD\T
|
---|
249 | TIMEOUT 75
|
---|
250 | CONNECT \d\c</literal>
|
---|
251 | <userinput>EOF
|
---|
252 |
|
---|
253 | cat >/etc/ppp/peers/<replaceable>dialup</replaceable> <<"EOF"</userinput>
|
---|
254 | <literal># Your username at the ISP
|
---|
255 | user "<replaceable>jdoe</replaceable>"
|
---|
256 | # What should be in the second column in /etc/ppp/*-secrets
|
---|
257 | remotename "<replaceable>dialup</replaceable>"
|
---|
258 | # Replace <replaceable>TTTTTTT</replaceable> with the ISP phone number
|
---|
259 | connect "/usr/sbin/chat -T <replaceable>TTTTTTT</replaceable> -f /etc/ppp/dialup.chat"
|
---|
260 |
|
---|
261 | # Specify your modem serial port and speed below
|
---|
262 | <replaceable>/dev/ttyS0</replaceable>
|
---|
263 | <replaceable>115200</replaceable>
|
---|
264 |
|
---|
265 | # The settings below usually don't need to be changed
|
---|
266 | updetach
|
---|
267 | noauth
|
---|
268 | hide-password
|
---|
269 | debug
|
---|
270 | lock
|
---|
271 | defaultroute
|
---|
272 | noipdefault
|
---|
273 | usepeerdns</literal>
|
---|
274 | <userinput>EOF</userinput></screen>
|
---|
275 |
|
---|
276 | <para>The first three lines of the
|
---|
277 | <filename>/etc/ppp/dialup.chat</filename> file abort the script when
|
---|
278 | it receives an indication of an error from the modem. Then the timeout
|
---|
279 | is set to 5 seconds and the script checks that the modem responds to
|
---|
280 | the dummy AT command at all. If not, measures are taken to dewedge it
|
---|
281 | (by interrupting the data transfer and going on hook). Then the
|
---|
282 | telephone number is dialed, and the script waits for the answer for
|
---|
283 | 75 seconds. The serial connection is considered established when the
|
---|
284 | modem sends the string CONNECT.</para>
|
---|
285 |
|
---|
286 | </sect4>
|
---|
287 |
|
---|
288 | <sect4>
|
---|
289 | <title>GPRS and EDGE Connections</title>
|
---|
290 | <!-- This section has been tested with GPRS service from MOTIV in
|
---|
291 | Yekaterinburg, Russia. According to forum messages, the procedure
|
---|
292 | also works with EDGE, but my cellular phone (Motorola C350) does not
|
---|
293 | support EDGE. - Alexander E. Patrakov -->
|
---|
294 |
|
---|
295 | <para>GPRS and EDGE connections are established with the help of a
|
---|
296 | cellular phone connected to a computer via serial or USB cable, or
|
---|
297 | using Bluetooth.
|
---|
298 | The phone exchanges data packets with the nearest base station,
|
---|
299 | which can be up to 35 kilometers away.
|
---|
300 |
|
---|
301 | <!-- FIXME: watch for new standards! SkyLink is already offering
|
---|
302 | 3.1 megabits per second with CDMA mobile phones, and
|
---|
303 | the configuration below doesn't work. It is reported that
|
---|
304 | a regular dialup setup with the telephone number "#777",
|
---|
305 | username "mobile" and password "internet" works with SkyLink. -->
|
---|
306 |
|
---|
307 | The maximum possible data transfer rate is 170 kilobits per second
|
---|
308 | for GPRS and 474 kilobits per second for EDGE, but many cellular
|
---|
309 | operators impose lower limits, such as 64 kilobits per second. The
|
---|
310 | gateway ping time is 900 ms for GPRS, which makes playing many online
|
---|
311 | games impossible and causes connection to ICQ to be unreliable.
|
---|
312 | In order to configure a GPRS or EDGE connection,
|
---|
313 | it is required to know the access point name (APN) and, rarely, the
|
---|
314 | username and the password.
|
---|
315 | In most cases, billing is based on the telephone number, and the
|
---|
316 | username/password pair is not needed, as assumed in the example
|
---|
317 | below.</para>
|
---|
318 |
|
---|
319 | <para>In order to configure a GPRS connection, two files have to
|
---|
320 | be created: a chat script that automates the connection procedure
|
---|
321 | (common for all GPRS accounts), and a peer file that provides
|
---|
322 | configuration information about a specific connection to
|
---|
323 | <command>pppd</command>:</para>
|
---|
324 | <screen role="root"><userinput>cat >/etc/ppp/gprs.chat <<"EOF"</userinput>
|
---|
325 | <literal>ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE'
|
---|
326 | ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
|
---|
327 | ABORT ERROR ABORT BLACKLISTED
|
---|
328 |
|
---|
329 | TIMEOUT 5
|
---|
330 | '' AT
|
---|
331 | OK-+++\dATH0-OK ATZ
|
---|
332 | # \T is the APN, passed from /etc/ppp/peers/<replaceable>gprs</replaceable>
|
---|
333 | # This example stores the APN as profile #1 in the phone.
|
---|
334 | # The "telephone number", *99***<profile_number>#, is always the same.
|
---|
335 | # If you want to store this as profile #2, change 1 to 2 in the
|
---|
336 | # following two lines.
|
---|
337 | OK AT+CGDCONT=<replaceable>1</replaceable>,"IP","\T"
|
---|
338 | OK "ATD*99***<replaceable>1</replaceable>#"
|
---|
339 | CONNECT \d\c</literal>
|
---|
340 | <userinput>EOF
|
---|
341 |
|
---|
342 | cat >/etc/ppp/peers/<replaceable>gprs</replaceable> <<"EOF"</userinput>
|
---|
343 | <literal># Replace <replaceable>inet.example.com</replaceable> with the proper APN for your provider
|
---|
344 | connect "/usr/sbin/chat -T <replaceable>inet.example.com</replaceable> -f /etc/ppp/gprs.chat"
|
---|
345 |
|
---|
346 | # Specify your cellphone serial port and speed below
|
---|
347 | # Note: you must manually send some vendor-specific AT commands
|
---|
348 | # to certain old cellular phones (such as Sony-Ericsson T200)
|
---|
349 | # in order to achieve connection speed more than 9600 bits ber second.
|
---|
350 | <replaceable>/dev/ttyS1</replaceable>
|
---|
351 | <replaceable>115200</replaceable>
|
---|
352 |
|
---|
353 | # The settings below usually don't need to be changed
|
---|
354 | noccp
|
---|
355 | noauth
|
---|
356 | updetach
|
---|
357 | debug
|
---|
358 | lock
|
---|
359 | defaultroute
|
---|
360 | noipdefault
|
---|
361 | usepeerdns</literal>
|
---|
362 | <userinput>EOF</userinput></screen>
|
---|
363 | </sect4>
|
---|
364 |
|
---|
365 | <sect4>
|
---|
366 | <title>PPPoE connections</title>
|
---|
367 |
|
---|
368 | <!-- This section has been tested with the "USI" ISP in Yekaterinburg,
|
---|
369 | Russia. Other editors can test it as described in
|
---|
370 | http://linuxfromscratch.org/pipermail/blfs-dev/2008-March/018290.html
|
---|
371 | - Alexander E. Patrakov -->
|
---|
372 |
|
---|
373 | <para>PPPoE connections are established over Ethernet, typically between
|
---|
374 | a computer and an ADSL router (usually installed in the same room)
|
---|
375 | that forwards the packets down the telephone line using frequencies
|
---|
376 | 25-2500 kHz, thus not interfering with voice calls. Although the router
|
---|
377 | can, in theory, forward any Ethernet packet, PPP encapsulation is used
|
---|
378 | for password-based authentication, so that the ISP can limit the
|
---|
379 | bandwidth and charge money according to the chosen tariff. The maximum
|
---|
380 | data transfer rate on ADSL is 24 megabits per second, and the gateway
|
---|
381 | ping time is typically less than 10 ms. In order to configure a PPPoE
|
---|
382 | connection, it is required to know the username, the password, and,
|
---|
383 | sometimes, the service name and/or the access concentrator name.</para>
|
---|
384 |
|
---|
385 | <para>In order to configure a PPPoE connection, only the peer file
|
---|
386 | has to be created:</para>
|
---|
387 | <screen role="root"><userinput>cat >/etc/ppp/peers/<replaceable>adsl</replaceable> <<"EOF"</userinput>
|
---|
388 | <literal>plugin rp-pppoe.so
|
---|
389 | # Ethernet interface name
|
---|
390 | <replaceable>eth0</replaceable>
|
---|
391 | # Your username at the ISP
|
---|
392 | user "<replaceable>jdoe</replaceable>"
|
---|
393 | # What should be in the second column in /etc/ppp/*-secrets
|
---|
394 | remotename "<replaceable>adsl</replaceable>"
|
---|
395 | # If needed, specify the service and the access concentrator name
|
---|
396 | # rp_pppoe_service "<replaceable>internet</replaceable>"
|
---|
397 | # rp_pppoe_ac "<replaceable>ac1</replaceable>"
|
---|
398 |
|
---|
399 | # The settings below usually don't need to be changed
|
---|
400 | noauth
|
---|
401 | hide-password
|
---|
402 | updetach
|
---|
403 | debug
|
---|
404 | defaultroute
|
---|
405 | noipdefault
|
---|
406 | usepeerdns</literal>
|
---|
407 | <userinput>EOF</userinput></screen>
|
---|
408 | </sect4>
|
---|
409 |
|
---|
410 | <sect4>
|
---|
411 | <title>Establishing the connection manually</title>
|
---|
412 |
|
---|
413 | <para>In order to establish a PPP connection described by the
|
---|
414 | <filename>/etc/ppp/peers/<replaceable>peername</replaceable></filename>
|
---|
415 | file, run, as root or as a member of the
|
---|
416 | <systemitem class="groupname">pppusers</systemitem> group:</para>
|
---|
417 | <screen><userinput>pon <replaceable>peername</replaceable></userinput></screen>
|
---|
418 |
|
---|
419 | <para>In order to tear the connection down, run:</para>
|
---|
420 | <screen><userinput>poff <replaceable>peername</replaceable></userinput></screen>
|
---|
421 |
|
---|
422 | </sect4>
|
---|
423 |
|
---|
424 | <sect4>
|
---|
425 | <title>Bringing up PPPoE connection at boot time</title>
|
---|
426 | <para>If your service provider does not charge by the minute, it is
|
---|
427 | usually good to have a bootscript handle the connection for you.
|
---|
428 | You can, of course, choose not to install the following script, and
|
---|
429 | start your connection manually with the <command>pon</command> command,
|
---|
430 | as described above. If you wish your PPPoE connection to be brought
|
---|
431 | up at boot time, run:</para>
|
---|
432 |
|
---|
433 | <screen role='root'><userinput>make install-service-pppoe</userinput></screen>
|
---|
434 |
|
---|
435 | <para>The above command installs the <filename>pppoe</filename>
|
---|
436 | service script and the <filename>/etc/ppp/peers/pppoe</filename>
|
---|
437 | file with some settings that make sense for most PPPoE connections.
|
---|
438 | The bootscript calls <command>pppd</command> with the the following
|
---|
439 | options:</para>
|
---|
440 |
|
---|
441 | <screen>pppd call pppoe ${1} linkname ${1} ${PPP_OPTS}</screen>
|
---|
442 |
|
---|
443 | <para>Here <quote>${1}</quote> is the network interface name,
|
---|
444 | <quote>linkname ${1}</quote> is added for creation of the
|
---|
445 | <filename>/var/run/ppp-${1}.pid</filename> file with the
|
---|
446 | <command>pppd</command> process ID (to be used when bringing
|
---|
447 | the connection down), and the <quote>${PPP_OPTS}</quote> variable
|
---|
448 | contains user-specified options such as <quote>user</quote> and
|
---|
449 | <quote>remotename</quote>.</para>
|
---|
450 |
|
---|
451 | <para>Now create the config file for use with the <filename>pppoe</filename>
|
---|
452 | service script:</para>
|
---|
453 |
|
---|
454 | <screen role='root'><userinput>install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &&
|
---|
455 | cat > /etc/sysconfig/network-devices/ifconfig.eth0/pppoe << "EOF"
|
---|
456 | <literal>ONBOOT="yes"
|
---|
457 | SERVICE="pppoe"
|
---|
458 | PPP_OPTS="user <replaceable>jdoe</replaceable> remotename <replaceable>adsl</replaceable>"</literal>
|
---|
459 | EOF</userinput></screen>
|
---|
460 |
|
---|
461 | <note><para>Instead of specifying additional options in the $PPP_OPTS
|
---|
462 | variable, you can also edit the <filename>/etc/ppp/peers/pppoe</filename>
|
---|
463 | file, but then your configuration will be lost when upgrading
|
---|
464 | BLFS bootscripts.</para></note>
|
---|
465 |
|
---|
466 | </sect4>
|
---|
467 | </sect3>
|
---|
468 |
|
---|
469 | </sect2>
|
---|
470 |
|
---|
471 | <sect2 role="content">
|
---|
472 | <title>Contents</title>
|
---|
473 |
|
---|
474 | <segmentedlist>
|
---|
475 | <segtitle>Installed Programs</segtitle>
|
---|
476 | <segtitle>Installed Libraries</segtitle>
|
---|
477 | <segtitle>Installed Directories</segtitle>
|
---|
478 |
|
---|
479 | <seglistitem>
|
---|
480 | <seg>chat, pon, poff, plog, pppd, pppdump, pppoe-discovery and pppstats</seg>
|
---|
481 | <seg>Several plugin modules installed in
|
---|
482 | <filename class='directory'>/usr/lib/pppd/&ppp-version;</filename></seg>
|
---|
483 | <seg>/etc/ppp, /usr/include/pppd and /usr/lib/pppd</seg>
|
---|
484 | </seglistitem>
|
---|
485 | </segmentedlist>
|
---|
486 |
|
---|
487 | <variablelist>
|
---|
488 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
489 | <?dbfo list-presentation="list"?>
|
---|
490 | <?dbhtml list-presentation="table"?>
|
---|
491 |
|
---|
492 | <varlistentry id="chat">
|
---|
493 | <term><command>chat</command></term>
|
---|
494 | <listitem>
|
---|
495 | <para>defines a conversational exchange between the computer and the
|
---|
496 | modem. Its primary purpose is to establish the connection between the
|
---|
497 | Point-to-Point Protocol Daemon (PPPD) and the remote
|
---|
498 | <command>pppd</command> process.</para>
|
---|
499 | <indexterm zone="ppp chat">
|
---|
500 | <primary sortas="b-chat">chat</primary>
|
---|
501 | </indexterm>
|
---|
502 | </listitem>
|
---|
503 | </varlistentry>
|
---|
504 |
|
---|
505 | <varlistentry id="pon">
|
---|
506 | <term><command>pon</command></term>
|
---|
507 | <listitem>
|
---|
508 | <para>is the script that establishes a PPP connection</para>
|
---|
509 | <indexterm zone="ppp pon">
|
---|
510 | <primary sortas="b-pon">pon</primary>
|
---|
511 | </indexterm>
|
---|
512 | </listitem>
|
---|
513 | </varlistentry>
|
---|
514 |
|
---|
515 | <varlistentry id="poff">
|
---|
516 | <term><command>poff</command></term>
|
---|
517 | <listitem>
|
---|
518 | <para>is the script that tears a PPP connection down.</para>
|
---|
519 | <indexterm zone="ppp poff">
|
---|
520 | <primary sortas="b-poff">poff</primary>
|
---|
521 | </indexterm>
|
---|
522 | </listitem>
|
---|
523 | </varlistentry>
|
---|
524 |
|
---|
525 | <varlistentry id="plog">
|
---|
526 | <term><command>plog</command></term>
|
---|
527 | <listitem>
|
---|
528 | <para>is a script that prints the tail of the PPP log.</para>
|
---|
529 | <indexterm zone="ppp plog">
|
---|
530 | <primary sortas="b-plog">plog</primary>
|
---|
531 | </indexterm>
|
---|
532 | </listitem>
|
---|
533 | </varlistentry>
|
---|
534 |
|
---|
535 |
|
---|
536 | <varlistentry id="pppd">
|
---|
537 | <term><command>pppd</command></term>
|
---|
538 | <listitem>
|
---|
539 | <para>is the Point to Point Protocol daemon.</para>
|
---|
540 | <indexterm zone="ppp pppd">
|
---|
541 | <primary sortas="b-pppd">pppd</primary>
|
---|
542 | </indexterm>
|
---|
543 | </listitem>
|
---|
544 | </varlistentry>
|
---|
545 |
|
---|
546 | <varlistentry id="pppdump">
|
---|
547 | <term><command>pppdump</command></term>
|
---|
548 | <listitem>
|
---|
549 | <para>is used to convert
|
---|
550 | <application>PPP</application> record files to a readable
|
---|
551 | format.</para>
|
---|
552 | <indexterm zone="ppp pppdump">
|
---|
553 | <primary sortas="b-pppdump">pppdump</primary>
|
---|
554 | </indexterm>
|
---|
555 | </listitem>
|
---|
556 | </varlistentry>
|
---|
557 |
|
---|
558 | <varlistentry id="pppstats">
|
---|
559 | <term><command>pppstats</command></term>
|
---|
560 | <listitem>
|
---|
561 | <para>is used to print
|
---|
562 | <application>PPP</application> statistics.</para>
|
---|
563 | <indexterm zone="ppp pppstats">
|
---|
564 | <primary sortas="b-pppstats">pppstats</primary>
|
---|
565 | </indexterm>
|
---|
566 | </listitem>
|
---|
567 | </varlistentry>
|
---|
568 |
|
---|
569 | </variablelist>
|
---|
570 |
|
---|
571 | </sect2>
|
---|
572 |
|
---|
573 | </sect1>
|
---|