1. Home
  2. Tutorials
  3. PPP
Yolinux.com Tutorial

YoLinux Tutorial - Using PPP

Dialing the ISP:

Five methods are presented here:
  1. Command line PPP and Manual configuration: - Works with any Linux distribution.
  2. Using the Linuxconf configuration tool (For Red Hat compatible distributions) - Configures the scripts ifup/ifdown to start and stop a PPP connection - Does the same thing as Gnome control panel
  3. Using the Gnome control panel configuration tool - Configures the scripts ifup/ifdown to start and stop a PPP connection - My favorite for Redhat 6.2 and Gnome
  4. WVDIAL and the Redhat "Dialup configuration tool"
  5. GUI dial program X-isp. Download/Installation/Configuration

Pitfalls and troubleshooting

Other resources:

Note: Configurations for ppp must be performed as root. Also check your manual or the manufacturer for settings/commands useful to your modem. Also, it is wise to choose one method of configuration as the different methods may conflict with one another.

Free Information Technology Magazines and Document Downloads
TradePub link image

General PPP Info:

Point to Point Protocol, or ppp, is used to create your connection over one's analog telephone modem to your ISP and the internet. Your computer will use communication ports, known as "COM" ports to access your modem. Linux will refer to these hardware COM ports as Unix devices as follows:

Device DOS com port number
/dev/ttyS0 COM1
/dev/ttyS1 COM2 (Typically used for external modems)
/dev/ttyS2 COM3
/dev/ttyS3 COM4

Currently many systems will auto-detect your modem and assign the device /dev/modem. Use this device if configured properly.

When connected to the internet, a Domain Name Server (DNS) is provided by your ISP to resolv the names of URL's. The IP addresses of these DNS servers must be provided during configuration as well as the ISP access phone number, your login and password.

1) Command line ppp and Manual configuration:

This example is the manual configuration specific to Red Hat 5.2 /6.0/6.1/6.2 and a US Robotics 56k external modem.

Perform the following configuration as user root.

Edit the following files:

File: /etc/resolv.conf - Add:

domain your-isp.com          - When connected, you become a node under their domain.
nameserver XXX.XXX.XXX.XXX   - Use nameserver IP addresses specified by your ISP
nameserver XXX.XXX.XXX.XXX      
nameserver XXX.XXX.XXX.XXX

File: /etc/nsswitch - Change: (older systems use hosts.conf)
Change from:


hosts:      files nisplus nis dns 


hosts:      files dns nisplus nis


File: /etc/ppp/options - File should look like this:

debug              - log transactions to /var/log/messages
/dev/ttyS1         - ( S1 = COM2, S2 = COM3, S3 = COM4)
115200             - Baud rate. Max supported bu UART chipset, not modem.
modem              - Serial link is connected to a modem
crtscts            - Use hardware flow control (RTS and CTS) to control serial line
asyncmap 0         - Choice of mapping of control characters
defaultroute       - PPP becomes the default route to the internet
noipdefault        - Not a static IP address. IP address assigned by ISP.
lock               - Don't let other processes besides PPP use device (/var/lock/)
connect "/usr/sbin/chat -v -t 240 -f /etc/ppp/chat-isp"

Valid baud rates: 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800
Choose the rate which is the next number higher than your modem speed.

For a full list of options see pppd man page.

File: /etc/ppp/chat-isp - File should look like this:

'' ATZ
OK ATE1M1V1X4L3S0=0Q0&C1&D2DT*70,XXX-XXXX - Use dial in number specified by your ISP CONNECT "" and modem settings specified by your modem manual ogin: login_id (ATDT as a minimum) sword: your_password
Note that it really is "ogin:" and not "login:" and "sword:" and not "password:".

Other options include:


Configuration Done!


  • The *70 is used to suppress call waiting. Do not include this if your telephone service does not support this.
  • The string ATE1M1V1X4L3S0=0Q0&C1&D2DT is specific to a USR 56k modem. Use ATDT if you do not know what to put here. It is modem feature specific.
  • See http://www.56k.com/inits/ for a full list of init strings based on the modem manufacturer.
  • The /etc/ppp/options file may be omitted by placing all the pppd arguments on the command line. Example: pppd /dev/ttyS1 115200 modem crtscts .... Some or all options may be placed in the file. Those not specified in the file may be specified on the command line.

Using PPP

  1. Login as a user.
  2. In a command shell, su (to switch user to root) and login as root.
  3. As root, /usr/sbin/pppd
Test connection with command /sbin/ifconfig and look for device ppp0. This will display the IP address and node name assigned by your ISP for this connection.

Then start Netscape: (as user)

OR by clicking on toolbar icon.

Hang up / Disconnect: (From root shell)

 killall -HUP pppd


[Pitfall]: If your network is using a SOCKS proxy server and Netscape can not resolve the URL destination, try executing this command before starting Netscape. In this scenario, you must start netscape from the same shell in which you executed the "export" command in order for Netscape to pick up the environment variable.
Where XXX.XXX.XXX.XXX is the IP address of the SOCKS proxy server.

[Pitfall]: Its seems weird, but on a typical default installation, you must be root to execute pppd. You must use the su command to switch your user id to root. This will maintain the user configuration. Read on to learn how to configure users to run pppd.


  1. pppd searches the /etc/ppp/options file
  2. ppp will use the chat-isp script which is input to the chat program which invokes the dialog with your modem.
  3. ppp will create a network device ppp0 and use it to communicate with the ppp program at the other end. This is where your local IP address is defined.
  4. ppp will configure your routing table with a route to the ppp link.

Launching PPP from the Gnome desktop:

The pppd command requires root privileges. There are two ways to grant this privilege to a user for the sole purpose of using pppd.
  1. Use "set-uid" root privilege "sticky bit"
  2. Use the sudo facility.
Command preparation:
  1. Setting the "sticky bit":

    chmod u+s /usr/sbin/pppd

    To view everything pppd is doing while it is operating, launch pppd from a console terminal with the command exec /usr/sbin/pppd -detach

  2. Using the sudo facility:

    To launch PPP as a regular user one must get root privileges to run PPP.

    Add the user id to the "sudoer" list: /etc/sudoers

    user_id   host_name=NOPASSWD:/usr/sbin/pppd 
    Note: The RPM package sudo must be installed.

Add a Gnome icon to the desktop to launch PPP:

Right button click on the open desktop + New + Launcher:

  • Name: PPP
  • Command:
    1. /usr/sbin/pppd
    2. nohup sudo /usr/sbin/pppd
  • Type: Application
  • select "Run in Terminal"
  • Click the icon to select and display an icon.

To terminate pppd, issue the command: killall pppd

2)Using the LinuxConf configuration tool:

Note: Linuxconf is no longer included with most Linux distributions. (Red Hat 7.3+)

  • Launch linuxconf. (Command /bin/linuxconf)
  • Select "Config" + Networking" + "Client Tasks" + "PPP/SLIP/PLIP"
    • Select "Add"
      • Select type of interface: PPP
      • Then select Accept.
    • Panel "PPP interface"
      • Add the following entries:
        • Phone number:
        • Modem port: /dev/modem
        • Login name:
        • Password:
      • Selected options: (Tab "Hardware")
        • Use hardware flow control
        • Abort connection on well-known errors
        • Allow any user to (de)activate interface
        • Line speed: 115200
        • Modem port: /dev/modem
        You can also verify other Tab option "Communication". Then select "Done".
  • Select "Config" + Networking" + "Client Tasks" + "Name server specification (DNS)"
    • List the IP addresses of the DNS name servers as provided by your ISP
    This edits the /etc/resolv.conf file.

The previous set-up configures the ifup and ifdown commands.
See "Adding a toolbar applet to invoke ifup/ifdown" in the Gnome control panel configuration below.

3)Using the Gnome control panel configuration tool:

  • Launch the Gnome control panel. (Command /usr/bin/control-panel).
  • Select the "Telephone/Modem" icon.
    • This launches a selection panel. Select the device/com port you wish to use.
      Device DOS com port number
      /dev/ttyS0 COM1
      /dev/ttyS1 COM2 (Typically used for external modems)
      /dev/ttyS2 COM3
      /dev/ttyS3 COM4

      Currently many systems will auto-detect your modem and assign the device /dev/modem. Use this device if configured properly.
      Then select "Ok".
      This will set up a symbolic link between the device /dev/modem and the serial port.
  • Select the "Network" icon.
    • Tab - "Names": Enter the Nameserver IP addresses provided by your ISP. These are the IP addresses of the ISP's Domain Name Servers (DNS) used for domain name resolution. This information will update the file /etc/resolv.conf
    • Tab - "Interfaces":
      • Select button "Add".
        • This Launches a new dialog box. Select the interface type: PPP. Then select "Ok".
        • Enter the phone number of your ISP as well as your login and password. Select "Done".
        • New dialog box asks "Save current configuration?" Save/Concel: "Save"
      • Select button "Edit":
        • Selected options: (Tab "Hardware")
          • Use hardware flow control
          • Abort connection on well-known errors
          • Allow any user to (de)activate interface
          • Line speed: 115200
          • Modem port: /dev/modem
          You can also verify other Tab option "Communication". Then select "Done".
        • New dialog box asks "Save current configuration?" Save/Concel: "Save"

The console commands:

  • Start ppp connection to internet: /sbin/ifup ppp0
  • Terminate ppp connection to internet: /sbin/ifdown ppp0
These commands can be added as a Gnome desktop launcher or by a toolbar applet.

Adding a toolbar applet to invoke ifup/ifdown:

  • Right click on an empty space on the Gnome toolbar.
  • From the menu that appears, left click the selections "Add Applet" + "Network" + "RH PPP Dialer"
  • Select the appropriate interface: ppp0 + "Ok".

This creates a small icon on the toolbar which contains a performance meter. (Measures Kilobits/sec.)

  • Select this icon on the toolbar to either start or stop a ppp connection to the internet.
  • This will launch a dialog box with the question "Start interface ppp0?".
    Select choice Yes to connect or No.
  • Selecting the toolbar icon a second time will present the question: "Stop interface ppp0?".
    Select choice Yes to disconnect or No.


This configuration of scripts /sbin/ifup / /sbin/ifdown will alter/create the files:
  • File: /etc/sysconfig/network-scripts/ifcfg-ppp0
    PERSIST=yes            - Re-dial if connection is broken.
    DEFROUTE=yes           - Direct unspecified network traffic out this connection
    MODEMPORT=/dev/modem   - Can also use raw device i.e. /dev/ttyS1
    WVDIALSECT=            - Can place optional text label here.
  • File /etc/sysconfig/network-scripts/chat-ppp0
    'ABORT' 'BUSY'
    'ABORT' 'Invalid Login'
    'ABORT' 'Login incorrect'
    '' 'ATZ'
    'OK' 'ATDT*70,555-1212'
    'CONNECT' ''
    'ogin:' 'my-login'
    'ord:' 'my-password'
    'TIMEOUT' '5'
    '~--' ''

Red Hat network config file (typical): /etc/sysconfig/network


The scripts will employ the commands:

  • usernetctl - allows user to manipulate a network interface (if permitted)
  • ipcalc - perform simple manipulation of IP addresses
  • route - manipulate the IP routing table

4) wvdial and Redhat "Dialup configuration tool":

From the Gnome start menu select:

  • Red Hat 6.x: "Internet" + "Dialup Configuration Tool"
  • Red Hat 7.1:
    • "Programs" + "Internet" + "Dialup Configuration Tool" (RP3)
    • select the desktop icon "Dialup Configuration".
If you are not root it will display a dialog box which prompts for the root password. It will lead you through a series of simple questions such as the account name (give name of ISP), the phone number to your ISP, login name and password. The first time this is launched it will probe for your modem.

This method of dialing is simple but less flexible because it does not rely on chat. This method is only good for generic ISP's which query for a login and password.

Man page for wvdial


This configuration of ifup/ifdown will alter/create the files:
  • File: /etc/wvdial.conf
    Modem = /dev/ttyS1
    Baud = 115200
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0
    [Dialer Defaults]
    Modem = /dev/ttyS1
    Baud = 115200
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0
    [Dialer BIGISP]
    Username = login-name
    Password = super-secret-password
    Phone = 373-9131
    Dial Prefix = *70
    Inherits = Dialer Defaults
    Stupid mode = 0
  • File: /etc/sysconfig/network-scripts/ifcfg-ppp1
  • Uses but does not configure the file: /etc/ppp/peers/wvdial
  • File: /etc/ppp/peers/ppp0
    connect "/usr/bin/wvdial --remotename ppp0 --chat script-name
  • File: /etc/ppp/pap-secrets
    Contains login and password information.

5) GUI dial program X-isp. Download/Installation/Configuration:

Home page: Xisp

Requires pppd (v2.2.0 or better, X11R6, XPM library (libXpm >= v3.4f) and XFroms.

Install xisp:

   tar zxf xisp-2.5p4.tar.gz
   cd xisp-2.5p4/SunOS/ufc-crypt
   cd ../..
   gnp Makefile              - Use your favorite editor gnp, vi...
                           USRLOCAL = opt/bin    - Choose destination directory
                           EXTRALIBS = SunOS/ufc-crypt/libufc.a

Edit file xispid.c: by line 67, change in two places
Change from:

   #ifdef GLIBC2
   static const char *private_strerror (errnum)
   static char *private_strerror (errnum)
   static const char *private_strerror (errnum)

Edit file xispdial.c: Edit line 603

   /*strcat(modemInit, " H0"); */     -- Comment out this line
                                         H0 = Hang up!!!!

Then issue the command:

As root:
   make install

This results in the following files:

   /etc/ppp/ip-up                  - make back-up. Copy to ip-up.bak before install
   /etc/ppp/ip-down                - make back-up. Copy to ip-down.bak

File: /etc/ppp/peers/xisp_dialer (created by install

   connect /usr/lib/ppp/xispdial


As root create directory: /etc/ppp/peers

Create files: /etc/ppp/peers/xisp_ttyS1 (for COM2)
This is the default in xisp_modem thus:

   cp xisp_modem xisp_ttyS1


Running xisp creates the file $HOME/.xispenv, $HOME/.xisp-up, $HOME/.xisp-down and /tmp/.xisppipe.UserName

Xisp will start the process:

   /usr/sbin/pppd 38400 call xisp_ttyS1 bsdcomp 0.0 noipdefault modem lock mru 1500
   /usr/sbin/chat -V -f /root/.xispscript
The file /root/.xispscript is created and the deleted.

X-Isp Menu Configuration:

   "Options" + "Account Information"
Phone no: XXX-XXXX - Enter number i=of your ISP Account name: login-id Password: password Authentication protocol: None "Options" + "Dialing and Login" Maximum tries: 2 Inter-dialing delay: 60 Max wait: 50 Ring bell: No ISP will call back: No Terminal after connection: No Expect: Send: ogin: %U sword: %P "Options" + "Communications Options" Device: /dev/ttyS1 Serial port COM1 (0-COM1 1-COM2 2-COM3 3-COM4) Reset: ATZ - Default Init: DT Connect String: CONNECT Serial Port Baud Rate: 38400 Flow Control: Hardware RTS/CTS Dialing method: Tone SW Compression: OFF Asyncmap: 00 "Options" + " TCP/IP Options" Dynamic local: Yes Dynamic remote: Yes Add default route to routing table: Yes Netmask: MTU: 1500 - Same as pppd default values MRU: 1500 DNS support: No - Thus system will use resolv.conf
If you specify "Yes", xisp will blow away
your /etc/resolv.conf file!!!

The X-Isp process generates temporary scripts $HOME/.xispscript and .xisppap

This program alters /etc/ppp/ip-up and /etc/ppp/ip-down. Make backups of these scripts.

Operation of xisp requires that /etc/resolv.conf contain the IP addresses of ISP's DNS.

Pitfalls and Troubleshooting:

  • [Pitfall]: Kernel is not installed with ppp support: Check (Pre Red Hat 7.1 kernel 2.4) with the command:
           dmesg | grep -i ppp
    This should return a message acknowledging ppp and the version. If not it may have been installed as a module. By default, the Redhat configuration and kernel are ready to support pppd. You can manually load the module with the command:
           insmod ppp
    If this fails, you must re-build the kernel with ppp support or re-install linux.

    Note: My Red Hat 7.1 (kernel 2.4) installation has no reference to PPP in the file /etc/modules.conf.

  • [Pitfall]: Must use a modem cable with external modems. Most cables do NOT include a wire for each pin in the connector. A modem cable will contain the wires necessary for modem support.
  • [Pitfall]: Many BIOS's can control/assign COM ports. Make sure the bios enables or assigns the use of the COM port you wish to use.
  • [Pitfall]: Many internal modem cards are NOT supported by Linux because they are "winmodems". They work under Windows because the necessary windows drivers can talk to the modem card. Linux requires a pure hardware modem which uses the Linux COM port drivers. Also the "winmodems" are inferior because they require additional processing to communicate and add an additional burden on the CPU.
  • [Pitfall]: Slow modem connect speed story (FYI): Once upon a time I was working in an old mill town in eastern Connecticut and my new 56.6k modem would not connect faster than 26k. I added caller ID to my phone service and the caller ID feature did not work. The telephone company's solution was to upgrade a card at one of the junctions boxes. My caller ID started to work and my modem started to connect at full speed. The upgrade to the telephone company's hardware did the trick.
  • [Pitfall]: According to more than one source, one may test the modem connection manually with the following commands: (IT NEVER WORKED FOR ME!!!)
    • echo -e "ATZ\n" > /dev/ttyS1 - Reset
    • echo -e "ATDTXXX-XXXX\n" > /dev/ttyS1 - Dial phone number XXX-XXXX
    • echo -e "ATH0\n" > /dev/ttyS1 - Hang-up

  • To see the serial port settings use the command: setserial /dev/ttyS1
    Results on my PC: /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3, Flags: spd_vhi
    Serial port settings may be altered with the setserial command.
    See file: /etc/rc.serial for settings used during boot sequence.
    The "standard MS-DOS" port associations are given below:
    Device DOS port Port Address IRQ
    /dev/ttyS0 (COM1) 0x3f8 4
    /dev/ttyS1 (COM2) 0x2f8 3
    /dev/ttyS2 (COM3) 0x3e8 4
    /dev/ttyS3 (COM4) 0x2e8 3

  • Use the following command to view the interrupts used by your system: cat /proc/interrupts
  • The COM2 serial port on the rear of the typical PC is a 25 pin DB-25 male connector.
  • The devices labeled /dev/ttyS* are for dial in and dial out by modem.
    Devices labeled /dev/cua* are dial out ports only.
  • The file /etc/gettydefs contains the tty line speed settings for the serial ports. (Dial in)
  • Modem Standards:
    Standard Name Bits Per Second (BPS)
    V.90 56,600
    V.34 28,800
    V.32bis 14,400
    V.32 9,600
    V.23 1,200
    V.22bis 2,400
    V.22 1,200
    V.21 300
    V.29 (Group III FAX) 9,600
    V.27ter (Group III FAX) 4,800
    V.17 (Group III FAX) 14,400

Kernel 2.4 PPP Changes:

Devfs will generate the /dev/ entry or use the command: mknod /dev/ppp c 108 0


alias char-major-108 ppp_generic 
alias /dev/ppp ppp_generic 
alias tty-ldisc-3 ppp_async 
alias tty-ldisc-14 ppp_synctty 
alias ppp-compress-21 bsd_comp 
alias ppp-compress-24 ppp_deflate 
alias ppp-compress-26 ppp_deflate

Devfs config file: /etc/devfsd.conf

The default Red Hat 7.1 install uses "module autoloading":

Other PPP Resources:

Man pages:

  • pppd - Point-to-Point Protocol Daemon
  • chat - Automated conversational script with a modem
  • resolv.conf - network name resolver configuration file (system access to DNS)
  • nsswitch.conf - System Databases and Name Service Switch configuration file
  • sudo - execute a command as another user (including root)
  • nohup - run a command immune to hangups, with output to a non-tty
  • killall - kill processes by process name

Analog Modem Resources:

Modems for use with the Linux serial port, PPP and your phone line. Digital cable modems and DSL typically use traditional ethernet connections through a network card (NIC).

Diald Resources:

The diald daemon is used to automatically dial out when a network request is made.

Book imageBooks:

Amazon book image "Ubuntu Unleashed 2017 edition:"
Covering 16.10 and 17.04, 17.10 (12th Edition)
by Matthew Helmke, Andrew Hudson and Paul Hudson
Sams Publishing, ISBN# 0134511182

Amazon book image "Ubuntu Unleashed 2013 edition:"
Covering 12.10 and 13.04 (8th Edition)
by Matthew Helmke, Andrew Hudson and Paul Hudson
Sams Publishing, ISBN# 0672336243
(Dec 15, 2012)

Amazon book image "Ubuntu Unleashed 2012 edition:"
Covering 11.10 and 12.04 (7th Edition)
by Matthew Helmke, Andrew Hudson and Paul Hudson
Sams Publishing, ISBN# 0672335786
(Jan 16, 2012)

Amazon book image "Red Hat Enterprise Linux 7: Desktops and Administration"
by Richard Petersen
Surfing Turtle Press, ISBN# 1936280620
(Jan 13, 2017)

Amazon book image "Fedora 18 Desktop Handbook"
by Richard Petersen
Surfing Turtle Press, ISBN# 1936280639
(Mar 6, 2013)

Amazon book image "Fedora 18 Networking and Servers"
by Richard Petersen
Surfing Turtle Press, ISBN# 1936280698
(March 29, 2013)

Amazon book image "Fedora 14 Desktop Handbook"
by Richard Petersen
Surfing Turtle Press, ISBN# 1936280167
(Nov 30, 2010)

Amazon book image "Fedora 14 Administration and Security"
by Richard Petersen
Surfing Turtle Press, ISBN# 1936280221
(Jan 6, 2011)

Amazon book image "Fedora 14 Networking and Servers"
by Richard Petersen
Surfing Turtle Press, ISBN# 1936280191
(Dec 26, 2010)

Amazon book image "Practical Guide to Ubuntu Linux (Versions 8.10 and 8.04)"
by Mark Sobell
Prentice Hall PTR, ISBN# 0137003889
2 edition (January 9, 2009)

Amazon book image "Fedora 10 and Red Hat Enterprise Linux Bible"
by Christopher Negus
Wiley, ISBN# 0470413395

"Red Hat Fedora 6 and Enterprise Linux Bible"
by Christopher Negus
Sams, ISBN# 047008278X

"Fedora 7 & Red Hat Enterprise Linux: The Complete Reference"
by Richard Petersen
Sams, ISBN# 0071486429

"Red Hat Fedora Core 6 Unleashed"
by Paul Hudson, Andrew Hudson
Sams, ISBN# 0672329298

"Red Hat Linux Fedora 3 Unleashed"
by Bill Ball, Hoyt Duff
Sams, ISBN# 0672327082

"Red Hat Linux 9 Unleashed"
by Bill Ball, Hoyt Duff
Sams, ISBN# 0672325888
May 8, 2003

I have the Red Hat 6 version and I have found it to be very helpful. I have found it to be way more complete than the other Linux books. It is the most complete general Linux book in publication. While other books in the "Unleashed" series have dissapointed me, this book is the best out there.

"Redhat Linux 9 (Visual QuickPro Guide)"
by Harold Davis
ISBN #032121918X, Peachpit Press, Addison Wesley

The best basic Linux book around for the GUI generation. This book can be best described as a guide to using the GUI configuration tools.


Bookmark and Share