oreilly.comSafari Books Online.Conferences.


Initial PPP Setup
Pages: 1, 2

Resolver Information

The computers on the Internet are referenced by numbers called IP numbers. However, as people are often bad at remembering numbers, names are used instead (such as instead of The name resolver is a program that asks another computer, the nameserver, to translate Internet names to IP numbers which your computer can actually use. Once you are connected, you are able to actually resolve host names, edit /etc/resolv.conf and add a line (or lines) like

nameserver 111.222.333.444

Instead of 111.222.333.444 use the Domain Name Server IP address (DNS-IPaddress) which your ISP gave you. If they gave you two numbers enter another nameserver line with the second address.

It can also be useful to include a line like domain where is the domain name of your ISP. For example, my /etc/resolv.conf file looks like


[Note: Do NOT put leading zeros on any of those numbers. They will not work. is a different number from]

Edit /etc/host.conf and make sure the line

order hosts, bind

is in there. Also check /etc/nsswitch.conf and make sure a line like

hosts:  files dns

is there. (that line may also contain other options like nis, which will do no harm)

Also make sure that all of these files are readable by everyone.

chmod a+r /etc/resolv.conf /etc/host.conf /etc/nsswitch.conf

No Default Route

Your computer passes messages for addresses it does not know to the default route. ppp assumes that there can only be one default route on any system. This is almost always the route to ISP's computer. However, if pppd finds that a default route already exists, it will not set up one to your ISP, causing problems (nothing gets through). In order that you not have any conflicts between the routing across ppp and onto some network you have, run

/sbin/route -n

(or you can also run

/bin/netstat -nr

which does the same thing) while not connected via ppp, and look for a default entry. (First entry in line is This almost certainly should not be there. (Unless you already have a hookup to the internet via an ethernet connection, you do not want such a default route.) Unless you know that your computer has an ethernet connection to other computers already, the only thing there should be a route to or If there is such a default route (line starting with, and you want the ppp interface to be your default route, (the usual situation), run

/sbin/route del default

Also find out what was setting that wrong default route, and stop it from doing so. (If you cannot figure out what is doing so, put that line

/sbin/route del default

at the end of whichever of /etc/rc.local or /etc/rc.d/rc.local exists on your system.)

PPPD module support

Now check to see if the module support for ppp is set up properly. Run


You should get a line of garbage which repeats about 10 times and then the command exits. This is good. Skip to the PPPD Options section.

If you get nothing and the command return to the prompt after a few seconds, this is probably OK as well, but try

/usr/sbin/pppd `tty`
where those are backward apostrophes (under the ~ on the US keyboard). This should give you the lines of garbage. If you do get this line of garbage, skip the next section. If you do not get that line of garbage, it is probable that the module support is not set up properly.

Setting up module support

If you did not get that line of garbage, but instead get "permission denied", you are not running as root. Log on as root and try again.

If you get a message saying that your kernel does not support ppp, do not recompile the kernel. This error message is a grab bag error message which the pppd program produces almost anytime something goes wrong. What it almost certainly means in the 2.0.x series of kernels is that you are not running kerneld.

To test if kerneld is running, run the command

ps aux|grep kerneld|grep -v grep

It will produce output if kerneld is running. If kerneld is running (or you have the 2.2.x kernels which use kmod instead) and you get this error message, try doing

insmod slhc
insmod ppp

and try again. ( these load the modules permanently and you may have to put those lines into the file rc.local (/etc/rc.d/rc.local on RedHat and in various places under /etc on other distributions)

(If none of this works, then there are more severe problems that this note cannot solve.)

Assuming that you find that kerneld is not running, then on a Redhat system, run

/etc/rc.d/init.d/kerneld start

or even just


(which should work on any Linux system).

[ If kerneld was not running, you will need to make sure that it is set to run each time you switch on your system. Unfortunately every distribution has a slightly different way of starting up daemons at bootup. In Redhat, also make sure that there are lines like S01kerneld as links to /etc/rc.d/init.d/kerneld in each of the directories /etc/rc.d/rc1.d to /etc/rc.d/rc5.d in RedHat. On other systems, you may need to put a line like


into /etc/rc.local, or /etc/rc.d/rc.local, or ....]


One final item, especially for Redhat systems, make sure that your give your machine a name (any single word name you want). You can set it with

hostname <yourhostname>

But you also want to change it permanently. In Redhat/Mandrake, put the line


into /etc/sysconfig/network. On other systems I am not sure, but you could always put the hostname command at the end of your rc.local file. This is not essential to running ppp, but if you do not do it, you will find yourself unable to run any X application while running ppp.

The 2.4.x series of kernels.

The kernel and module support has changed significantly for the 2.4.x series of Linux kernels, and require a number of additional actions on your part.

First, you must make sure that you are use at least pppd 2.4.0b2.(Do not be confused with the fact that both the kernel numbering and the ppp version numbering are now almost the same. This is just an accident.) The older 2.3.x series of ppp will not work with the new kernel.

Now you must make sure that you have the device /dev/ppp on your system. Do

ls -lga /dev/ppp

which should show that this file is owned by root, and has only read and write permissions for root. If it does not exist, do

mknod /dev/ppp c 108 0
chmod 600 /dev/ppp 

Now, you must also make sure that you have the correct entries in the /etc/modules.conf file. (Note that this file has changed name from conf.modules on the older kernels to modules.conf on the 2.4.x series of kernels.) Enter the lines

alias /dev/ppp          ppp_generic
alias char-major-108    ppp_generic
alias tty-ldisc-3       ppp_async
alias tty-ldisc-14      ppp_synctty

into /etc/modules.conf if they are not already there. At this point the the test above (just running /usr/sbin/pppd) should work and produce garbage.

PPP options

You have now set up the critical files on your system and you know that you have a an operational pppd. You now need to set up the ppp options so that you can get debugging information when you try to connect, and so that it is minimally usable.

Edit /etc/ppp/options so it contains


[note that if you are in the unlikely situation that you already have a working default route to an Ethernet, omit the defaultroute option. If you are not sure, put that option in.]

[Also other options can be used. In general do not do so unless advised to do so. More harm is done by putting in too many un-understood options than by putting in too few. If you have a local Ethernet, and if your ISP demands that they assign your IP address for the PPP connection, then also use

You could also put in a line containing debug here but we will use it explicitly on the command line.]

Bill Unruh works for the Advanced Research Department of the Canadian Institute for Physics and Astronomy.

Return to


Linux Online Certification

Linux/Unix System Administration Certificate Series
Linux/Unix System Administration Certificate Series — This course series targets both beginning and intermediate Linux/Unix users who want to acquire advanced system administration skills, and to back those skills up with a Certificate from the University of Illinois Office of Continuing Education.

Enroll today!

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: