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