This document contains a great deal of information - and with each version it grows!
As a consequence, this section aims to provide a concise overview of the actions you will need to take to get your Linux system connected as a client to a PPP server.
If your Linux distribution does not include the PPP software, you will need to obtain this from the Linux PPP daemon.
This is the latest official version at the time of writing. However, choose the latest version available from this site (ppp-2.3 is in beta at the time of writing and should be released soon).
The PPP package contains instructions on how to compile and install the software so this HOWTO does not!
Linux PPP operations come in two parts
Many distributions seem to provide PPP kernel support in their default installation kernels, but others do not.
If at boot your kernel reports messages like
PPP Dynamic channel allocation code copyright 1995 Caldera, Inc. PPP line discipline registered.
your kernel does have PPP support compiled in.
That said, you will probably want to compile your own kernel whatever your distribution to provide the most efficient use of system resources given your particular hardware configuration. It is worth remembering that the kernel cannot be swapped out of memory and so keeping the kernel as small as possible has advantages on a memory limited machine.
This document provides minimal kernel re-compilation instructions at section Configuring your Linux Kernel.
For greater detail, see the Kernel-HOWTO at The Linux Kernel HOWTO
There are an almost infinite number of ways in which a PPP server can be set up. In order to connect to your ISP (or corporate PPP server to access your intranet), you will need to obtain information on how the PPP server operates.
Because you are using Linux, you may have some difficulty with some ISP help desks (and work site based PPP intranet servers) which know only about MS Windows clients.
However, a rapidly growing number of ISPs use Linux to provide their service - and Linux is also penetrating the corporate environment as well, so you may be lucky if you do strike problems.
Section Getting the Information you need about the PPP server tells you what you need to know about the PPP server to which you are going to connect - and how to find out the information you need to know.
In order to connect to a PPP server and to obtain the best possible data transfer rate, your modem needs to be configured correctly.
Similarly, the serial ports on your modem and computer need to be set up correctly.
Section Configuring your modem and serial port provides information on this.
In addition to the files that run PPP and perform the automated log in
to the PPP server, there are a number of text configuration files that
have to be set up for your computer to be able to resolve names like
www.interweft.com.au
to the IP address that is actually used to
contact that computer. These are:-
/etc/resolv.conf
/etc/host.conf
Section Setting up Name to Address Resolution for details on setting this up.
In particular, you do NOT need to run a name server on your Linux PC in order to connect to the Internet (although you may wish to). All you need is to know the IP number of at least one name server that you can use (preferably one at your ISPs site).
As establishing a PPP link between you Linux computer and another PPP server requires manipulation of network devices (the PPP interface is a network interface) and the kernel routing table, pppd requires root privileges.
For details on this, see section Using PPP and root privileges.
There are a number of configuration and dialer files that need to be set up to get PPP operational. There are examples as part of the PPP distribution and this section shows what files you should have:-
/etc/ppp/options /etc/ppp/scripts/ppp-on /etc/ppp/scripts/ppp-on-dialer /etc/ppp/options.tpl
You may need to create some additional files depending on exactly what you are aiming to achieve with PPP:-
/etc/ppp/options.ttyXX /etc/ppp/ip-up /etc/ppp/pap-secrets /etc/ppp/chap-secrets
In addition, the PPP daemon can use a large number of command line options and it is important to use the right ones; so this section takes you through the standard PPP options and helps you choose the options you should use.
For details on this, see Setting up the PPP connection files.
Many ISPs and corporate PPP servers use PAP. If your server does not require you to use PAP (if you can log in manually and receive the standard user name/password text based prompts it does not use PAP), you can safely ignore this section.
Instead of logging into such a server using a user name and password when prompted to enter them by the server, a PPP server using PAP does not require a text based login.
The user authentication information instead is exchanged as part of the link control protocol (LCP) which is the first part of establishing a PPP link.
Section If your PPP server uses PAP (Password Authentication Protocol) provides information on the files you need to set up to establish a PPP link using PAP.
Having set up the basic files, it is a good idea to test these by connecting (using minicom or seyon) and starting pppd on your Linux PC by hand.
See Section Setting up the PPP connection manually for full details of setting this up.
Once you are able to log in by hand, you can now move to setting up a set of scripts that will automate the establishment of the connection.
Section
Automating your connections - Creating the connection scripts covers setting up the necessary scripts, with
considerable attention paid to chat
and scripting the login process
to the PPP server.
This section discusses scripts for user name/password authentication as well as scripts for PAP/CHAP authenticating servers.
Once your link is up and working, you need to be able to deactivate the link.
This is covered in Section Shutting down the PPP link.
Many people have problems getting PPP to work straight away. The variation in PPP servers and how they require you to set up the connection is enormous. Similarly, there are many options to PPP - and some combinations of these just do not work together, ever.
In addition to the problems of logging in and starting the PPP service, there are problems with the modems and the actual telephone lines as well!
Section Fixing problems provides some basic information about common errors, how to isolate these and fix them.
This is NOT intended to provide more than just the basics. Al Longyear maintains the PPP-FAQ which contains much more information on this topic!
Once a PPP link is operational (specifically, once the IP layer is operational), Linux PPP can automatically run (as the root user), a script to perform any function you can write a script to accomplish.
Section
After the link comes up provides information on the
/etc/ppp/ip-up
script, the parameters it receives from PPP and
how to use it to do things like acquire your email from your ISP
account, send any queued email waiting transmission on your machine and
such.
As noted in the introduction, dynamic IP numbers affect the ability of your Linux PC to act as a server on the Internet.
Section Problems with standard IP services on a Dynamic IP number PPP link provides information on the (main) services affected and what you can do (if anything) to overcome this.