oreilly.comSafari Books Online.Conferences.


Testing and Automating PPP

by Bill Unruh

After you have connected to your ISP, there are a few more steps you need to go through to test and automate your PPP connection in Linux.

The first thing you'll need to do is ping the address of the remote host.

(Note: The following example is for a particular connection on my system. The IP addresses will be different for your ISP.)

In the /var/log/ppp file, you should see two lines that provide your computer with the remote computer's IP numbers for the duration of the connection. For my system, these two lines would look like

Feb 7 12:52:21 ppptest pppd[27378]: local IP address
Feb 7 12:52:21 ppptest pppd[27378]: remote IP address

Next, you need to enter the following

/sbin/route -n 

and look for an entry in which the first entry is the remote IP address, and the last entry is ppp0. It must be there for the connection to work.

Now you'll need to add the IP address for the remote computer like so:

ping <remoteIPnumber>

Inserting the example IP address above, this line would look like:


You should get back a sequence of lines -- about one every second. This shows that your connection to the remote host is active. Type ^C (Ctrl-C) to stop the ping command. Sometimes the remote computer will not respond to the ping command because of the way your ISP is set up. Do not worry yet unless you get a "network or host unreachable" message.

Now, look at the lines you added to /etc/resolv.conf at the beginning of this script. You'll need to enter the ping command and the name server of the remote computer like so:

ping <nameserverIP>

where the IP address is taken from the file /etc/resolv.conf from the line that (for my system) reads

nameserver 123.456.789.012 

Again, you should get a series of responses. If you do not, there may not be support for ping on those machines. However, if you get a response saying that the host or network is unreachable, there is definitely something wrong, either with your setup or with the name server address your ISP gave you.

Now try


using that actual number.

This should work unless there is something wrong with my machine. In this case, try other IP numbers. If none of these work, then there is a problem with your connection -- for example, default route problems.

Now try pinging a name like


which is the location where this page is kept. The key thing to remember is that ping should report back on its first line the IP address of "axion." If it did, it means your name server is working. If the previous test worked, but this one did not, you either forgot to follow the initial instructions on this page about setting up the file /etc/resolv.conf, or your ISP has name server problems.

Previously in this series

Initial PPP Setup

Troubleshooting ISP Connection Problems

Try a few more names of machines that you know. If your system passes all these tests, try running Netscape and connecting to a page. Everything, I hope, now works.

If not, collect all of the details you can, such as the output in /var/log/ppp -- making sure that you remove your passwords from that file -- and ask for help in the comp.os.linux.networking, alt.os.linux.dial-up, or alt.comp.linux.isp newsgroups.

Be polite and look in the archives on Dejanews because your question may already have been answered many times. When you ask for help or search, make your subject and description as specific as possible. "Nothing works" as a symptom is very, very hard to suggest fixes for.

Pages: 1, 2, 3, 4

Next Pagearrow

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: