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