North Texas Linux Users Group
| Visitors | Feedback | Search |



PPP Overview

What is PPP?

PPP is an acronym of "Point-to-Point Protocol".

PPP provides a means of establishing a network connection between your system or network and someone else's network.

When your computer or network is connected to another using PPP, it appears that you are on the same network but behind a router.

What are the benefits of PPP?

Why are so many people using it?

Primarily because by establishing a PPP connection to, for instance, the Internet, applications like telnet, ftp, and a Web Browser work as if you were sitting at a machine connected directly to a LAN.

The PPP connection is transparent to the end-user once the connection is established

PPP Vocabulary

ISP is an acronym of Internet Service Provider.

IP is an acronym of Internet Protocol.

Comm Port is a shorthand for communications port.

Dynamic IP means that on each dialup your computer is assigned a different IP address.

Dedicated IP means that on each dialup your computer is assigned the same IP address. Sometimes called Static IP.

PPP Theory

What a PPP connection seeks to establish is a network connection between our machine and a remote network.

The physical connection is established and maintained by means of a modem over a telephone line.

After establishing the connection, we should be able to use the PPP Lan connection as we would any Ethernet Lan connection.

Except for the perceptible difference in speed, we should not notice the difference between a PPP and a direct connection to the remote Lan.

To make the establishment of the connection simpler and routine, we'll use the chat program to do a lot of the repetitive work for us.

PPP Hardware and Software

All we need is an internal modem or an external modem and free serial port.

If you're using an external modem and serial port, the best results will be obtained by using a fast serial port; i.e., a serial port capable of sending and transmitting data at rates of 56kbps or faster.

Slower PPP links still work, but, of course, they require more patience and more time.

If you have a recent version of any of the following Linux distributions, PPP is probably included--note: other Linux distributions have PPP but this presentation is geared toward one of these three:

  • Red Hat
  • Slackware
  • Debian

You should not need to make any modifications to the PPP software.

You will need to configure the software properly in order to connect to your ISP successfully.

Installing PPP

PPP should come with most, if not all, recent Linux distributions.

If you have a Linux distribution on CD ROM, it probably contains the extra docs, which get installed in /usr/doc. It is highly recommended that you read everything you can find in /usr/doc which is related to PPP.

Configuring PPP

Your best source of information are the documents concerning PPP located in /usr/doc.

What follows is a simplified configuration checklist which assumes comm port 2 and a 28.8 modem:

1. edit /etc/ppp/options:

/dev/ttyS1
115200
-detach
defaultroute
noipdefault
debug
crtscts
lock
modem
mru 552
mtu 552

2. Copy useful scripts from /usr/doc/ppp-2.2.0f/scripts (or whatever is analogous on your system) to /usr/local/bin or other directory for easy execution.

The most important scripts to copy are ppp-on, ppp-on-dialer, ppp-off.

3. The modifications that are needed in these files will probably be obvious, or you may need to play around with them a bit to get them right. Do so with the debug option turned on in /etc/ppp/options as above. This way stuff gets logged to syslog and becomes easier to diagnose.

The most common modification is to ppp-on-dialer to make the script conform to your local login sequence.

You will also have to modify ppp-on to customize the dialin number for your ISP, your user name and your password; all of which you get when you sign up with your ISP.

Depending on the location in which you installed these scripts, you may have to change the environment variable DIALER_SCRIPT.

4. Now we have to get comm port 2 ready to send and receive PPP data.

It must be setup in high-speed mode by issuing the command:

setserial -a -v /dev/ttyS1 spd_vhi

If you have a plug-and-play internal modem set for comm port 3, and you are using either comm port 1 or comm port 2 or both, then you may have to issue the command:

setserial -a -v /dev/ttyS2 port 0x03e8 irq 5 baud_base 115200 spd_vhi

Notice: which ever form of the setserial command you have to use for your system to function correctly, it must be executed at boot, or at least before PPP is called. In other words, it is not sufficient simply to run this command once.

So to keep from having to run this command all the time yourself, it is best to put it in one of the rc files that get executed at every boot. Then your serial port will always be ready for high speed communications. A common file to use for this is /etc/rc.d/rc.local.

5. Ok. So it looks like we've got everything ready to go. What's next?

To initiate a PPP session, issue the command:

/usr/sbin/pppd /dev/ttyS1 38400

It is important to note here that the speed option given passed to pppd is not 115200 as one might expect but 38400.

References

  • /usr/doc/ppp-*
  • /usr/doc/HOWTO/PPP-HOWTO
  • /usr/doc/FAQ/PPP-FAQ.txt
  • /usr/doc/LPD/network-guide
  • comp.os.linux.setup
  • comp.protocols.ppp
  • comp.os.linux.networking
  • ntlug-discuss@hex.net
  • Red Hat Software has a Mailing List devoted to PPP.




| Help | About | News | Archive | LiNT | Calendar | Links | Membership | Bookstore | Forums | Search | Feedback |

Copyright © 1996, 1997 North Texas Linux Users Group. All rights reserved.
http://www.ntlug.org/archive/tp/ppp/ppp_01.html