Changeset 782820d


Ignore:
Timestamp:
03/12/2008 11:52:02 AM (16 years ago)
Author:
Alexander E. Patrakov <alexander@…>
Branches:
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
Children:
0fb3692
Parents:
a90bc8c
Message:

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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • connect/dialup/ppp.xml

    ra90bc8c r782820d  
    6060
    6161    <bridgehead renderas="sect4">Optional</bridgehead>
    62     <para role="optional"><xref linkend="libpcap"/> (needed to do PPP filtering)
     62    <para role="optional"><xref linkend="libpcap"/> (needed to do PPP filtering),
     63    <xref linkend="linux-pam"/> (to authenticate incoming calls using PAM),
    6364    and <ulink url="http://linux-atm.sourceforge.net/">Linux ATM</ulink> (to
    6465    build the pppoatm.so plugin)</para>
     
    7374
    7475    <note id="ppp-kernel">
    75       <para><application>PPP</application> support must be
    76       compiled into the kernel or available as a kernel module.</para>
     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>
    7782    </note>
    7883
     
    9196    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
    9297
    93 <screen role='root'><userinput>make install &amp;&amp;
    94 make install-etcppp</userinput></screen>
     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>
    95106
    96107  </sect2>
     
    101112    <para><command>make install-etcppp</command>: This command puts example
    102113    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>
    103130
    104131  </sect2>
     
    121148      <title>Configuration Information</title>
    122149
    123       <para>The <application>PPP</application> daemon requires very little
    124       configuration. The main trick is scripting the connection. This can be done
     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
    125153      either using the <command>chat</command> program which comes with
    126       this package or by using <xref linkend="wvdial"/>.</para>
    127 
     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>
    128367    </sect3>
    129368
     
    139378
    140379      <seglistitem>
    141         <seg>chat, pppd, pppdump, pppoe-discovery and pppstats</seg>
     380        <seg>chat, pon, poff, plog, pppd, pppdump, pppoe-discovery and pppstats</seg>
    142381        <seg>Several plugin modules installed in
    143         <filename class='directory'>/usr/lib/pppd/2.4.3</filename></seg>
     382        <filename class='directory'>/usr/lib/pppd/&ppp-version;</filename></seg>
    144383        <seg>/etc/ppp, /usr/include/pppd and /usr/lib/pppd</seg>
    145384      </seglistitem>
     
    164403      </varlistentry>
    165404
     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
    166436      <varlistentry id="pppd">
    167437        <term><command>pppd</command></term>
  • introduction/welcome/changelog.xml

    ra90bc8c r782820d  
    4444      <para>March 12th, 2008</para>
    4545      <itemizedlist>
     46        <listitem>
     47          <para>[alexander] - Added dialup and GPRS configuration instructions
     48          to the PPP page.</para>
     49        </listitem>
    4650        <listitem>
    4751          <para>[dj] - Updated to OpenLDAP-2.3.39.</para>
Note: See TracChangeset for help on using the changeset viewer.