Configuring PPP on Linux

Step 1: Configure DNS

A first step is to add the numeric IP address of your ISP's DNS server to /etc/resolv.conf:


nameserver 10.20.30.40

This won't interfere with your local network if it is using static IP addresses.

Step 2: Dialup Prompts

The next step is to discover the prompts from your ISP dialup server.
(These prompts require answers from a "chat" script, see next step).
One way is to call your ISP dialup server using a textual communications program
such as minicom or Windows's Hyperterminal.

Typically, a ISP dialup server prompts for a username/password, then the desired protocol (PPP).
For example:


login:     myusername
password:  mypwd
protocol:  ppp

BTW, persistent "LCP timeout" or "[LCP ConfRequest]" error messages can be caused by chat failing to correctly respond to the prompts. If that happens, then the dialup server never initiates PPP.

Step 3: Chat Script

Formulate a "chat" script that will reply to each dialup prompt.
Each prompt/answer pair in a chat script is separated by spaces
For example:


#!/bin/sh
pppd -detach connect 'chat -s -v "" ATDTnnn-nnnn CONNECT "" login: myusername password: mypwd protocol ppp' /dev/modem 115200 debug crtscts modem defaultroute

This script will call the dialup server and will try to establish a PPP connection.
/dev/modem is a symlink to the serial port #0 at /dev/cua0.

Hopefully, PPP on Linux is now working.


index   home