%general-entities; ]> $LastChangedBy$ $Date$ PPP-&ppp-version; PPP Introduction to PPP The PPP package contains the pppd daemon and the chat program. This is used for connecting to other machines; often for connecting to the Internet via a dial-up or PPPoE connection to an ISP. Package Information Download (HTTP): Download (FTP): Download MD5 sum: &ppp-md5sum; Download size: &ppp-size; Estimated disk space required: &ppp-buildsize; Estimated build time: &ppp-time; PPP Dependencies Optional (needed to do PPP filtering), (to authenticate incoming calls using PAM), and Linux ATM (to build the pppoatm.so plugin) User Notes: Installation of PPP PPP support (CONFIG_PPP), the asynchronous line discipline (CONFIG_PPP_ASYNC), and the driver for your serial port device must be compiled into the kernel or loaded as a kernel module. Udev doesn't load the ppp_generic module automatically, it must be mentioned in the /etc/sysconfig/modules file. PPP support Install PPP by running the following commands: ./configure --prefix=/usr && make This package does not come with a test suite. Now, as the root user: groupadd -g 52 pppusers && make install && make install-etcppp && install -m755 scripts/{pon,poff,plog} /usr/bin && instal -m644 scripts/pon.1 /usr/share/man/man1 Command Explanations make install-etcppp: This command puts example configuration files in /etc/ppp. USE_PAM=y: Add this argument to the make command to compile in support for PAM, usually needed for authenticating inbound calls against a central database. HAVE_INET6=y: Add this argument to the make command to compile in support for IPv6. CBCP=y: Add this argument to the make command to compile in support for Microsoft proprietary Callback Control Protocol. Configuring PPP Config Files /etc/ppp/* /etc/ppp/* Configuration Information The PPP daemon requires some configuration. The main trick is scripting the connection. For dialup and GPRS connections, this can be done either using the chat program which comes with this package, or by using external tools such as or KPPP from . The text below explains how to set up dialup and GPRS connections using only tools provided with the PPP package. All configuration steps in this section are executed as root user. Setting the passwords Passwords are stored in /etc/ppp/pap-secrets and /etc/ppp/chap-secrets files, depending on the authentication method used by the ISP. If in doubt, place the password into both files. E.g., if the username given by the ISP is jdoe, the password is guessit, the ISP uses PAP and the user wants to name this account dialup in order to distinguish it from other PPP accounts, the following file has to be created: touch /etc/ppp/pap-secrets chmod 600 /etc/ppp/pap-secrets cat >>/etc/ppp/pap-secrets <<"EOF" # username remotename password IP for the peer jdoe dialup guessit * EOF DNS Server Configuration If you don't run your own caching DNS server, create a simple ip-up script (to be called by pppd automatically once the connection is brought up) that populates the /etc/resolv.conf file with nameservers specified by the ISP. cat >/etc/ppp/ip-up <<"EOF" #!/bin/sh if [ "$USEPEERDNS" = "1" ] && [ -s /etc/ppp/resolv.conf ] then install -m 644 /etc/ppp/resolv.conf /etc/resolv.conf fi EOF chmod 755 /etc/ppp/ip-up If you use a caching DNS server such as or Pdnsd, the script above is wrong for you. In such case, write your own script that tells your caching nameserver to forward queries to upstream DNS servers specified in the $DNS1 and $DNS2 environment variables. Dialup Modem Connection Dialup connections are established with the help of a modem connected to a computer and the telephone line. The modem dials a telephone number of the ISP's modem, and they exchange data using the signal frequencies 300-4000 Hz. Typical data transfer rate is 40-50 kilobits per second, and the gateway ping time (latency) is up to 300-400 ms. In order to configure the dialup connection, it is required to know the telephone number of the ISP's modem pool, the username and the password. In order to configure a dialup connection, two files have to be created: a chat script that automates the connection procedure (common for all dialup accounts), and a peer file that provides configuration information about a specific connection to pppd: cat $gt;/etc/ppp/dialup.chat <<"EOF" ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED ABORT ERROR ABORT BLACKLISTED TIMEOUT 5 '' AT # \T is the phone number, passed from /etc/ppp/peers/dialup OK-+++\dATH0-OK ATD\T TIMEOUT 75 CONNECT \d\c EOF cat >/etc/ppp/peers/dialup <<"EOF" # Your username at the ISP user "jdoe" # What should be in the second column in /etc/ppp/*-secrets remotename "dialup" # Replace TTTTTTT with the ISP phone number connect "/usr/sbin/chat -T TTTTTTT -f /etc/ppp/dialup.chat" # Specify your modem serial port and speed below /dev/ttyS0 115200 # The settings below usually don't need to be changed updetach noauth hide-password debug lock defaultroute noipdefault usepeerdns EOF The first three lines of the /etc/ppp/dialup.chat file abort the script when it receives an indication of an error from the modem. Then the timeout is set to 5 seconds and the script checks that the modem responds to the dummy AT command at all. If not, measures are taken to dewedge it (by interrupting the data transfer and going on hook). Then the telephone number is dialed, and the script waits for the answer for 75 seconds. The serial connection is considered established when the modem sends the string CONNECT. GPRS and EDGE Connections GPRS and EDGE connections are established with the help of a cellular phone connected to a computer via serial or USB cable, or using Bluetooth. The phone exchanges data packets with the nearest base station, which can be up to 35 kilometers away. The maximum possible data transfer rate is 170 kilobits per second for GPRS and 474 kilobits per second for EDGE, but many cellular operators impose lower limits, such as 64 kilobits per second. The gateway ping time is 900 ms for GPRS, which makes playing many online games impossible and causes connection to ICQ to be unreliable. In order to configure a GPRS or EDGE connection, it is required to know the access point name (APN) and, rarely, the username and the password. In most cases, billing is based on the telephone number, and the username/password pair is not needed, as assumed in the example below. In order to configure a GPRS connection, two files have to be created: a chat script that automates the connection procedure (common for all GPRS accounts), and a peer file that provides configuration information about a specific connection to pppd: cat >/etc/ppp/gprs.chat <<"EOF" ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED ABORT ERROR ABORT BLACKLISTED TIMEOUT 5 '' AT OK-+++\dATH0-OK ATZ # \T is the APN, passed from /etc/ppp/peers/gprs # This example stores the APN as profile #1 in the phone. # The telephone number, *99***<profile_number>#, is always the same # If you want to store this as profile #2, change 1 to 2 in the # following two lines. OK AT+CGDCONT=1,"IP","\T" OK "ATD*99***1#" CONNECT \d\c EOF cat >/etc/ppp/peers/gprs <<"EOF" # Replace inet.example.com with the proper APN for your provider connect "/usr/sbin/chat -T inet.example.com -f /etc/ppp/gprs.chat" # Specify your cellphone serial port and speed below # Note: you must manually send some vendor-specific AT commands # to certain old cellular phones (such as Sony-Ericsson T200) # in order to achieve connection speed more than 9600 bits ber second. /dev/ttyS1 115200 # The settings below usually don't need to be changed noccp noauth updetach debug lock defaultroute noipdefault usepeerdns EOF Establishing the connection In order to establish a PPP connection described by the /etc/ppp/peers/peername file, run, as root or as a member of the pppusers group: pon peername In order to tear the connection down, run: poff peername Contents Installed Programs Installed Libraries Installed Directories chat, pon, poff, plog, pppd, pppdump, pppoe-discovery and pppstats Several plugin modules installed in /usr/lib/pppd/&ppp-version; /etc/ppp, /usr/include/pppd and /usr/lib/pppd Short Descriptions chat defines a conversational exchange between the computer and the modem. Its primary purpose is to establish the connection between the Point-to-Point Protocol Daemon (PPPD) and the remote pppd process. chat pon is the script that establishes a PPP connection pon poff is the script that tears a PPP connection down. poff plog is a script that prints the tail of the PPP log. plog pppd is the Point to Point Protocol daemon. pppd pppdump is used to convert PPP record files to a readable format. pppdump pppstats is used to print PPP statistics. pppstats