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