=========================================================================
PPPSETUP 1.98 on SLACKWARE.

Written by Robert S. Liesenfeld <xunil@bitstream.net> <IRC:Xunil>
Changes for 1.98 by Kent Robotti <robotti@erols.com>
Patched for Slackware by Patrick Volkerding <volkerdi@slackware.com>

You should get these docs if you don't already have them:

ftp://sunsite.unc.edu/pub/Linux/docs/howto/PPP-HOWTO
ftp://sunsite.unc.edu/pub/Linux/docs/faqs/PPP-FAQ

Press [Enter] to continue with pppsetup...
=========================================================================
These are your PPP configuration files and instructions...
=========================================================================

# This is your /etc/ppp/pppscript.

TIMEOUT 60
ABORT ERROR
ABORT BUSY
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
"" "AT&FH0"
OK "086733222"
TIMEOUT 75
CONNECT 

# This is your /etc/ppp/options file.

lock
defaultroute
noipdefault
modem
/dev/cua0
115200
crtscts
debug
passive
asyncmap 0
name "avonside"

I created the symbolic link: /dev/modem -> /dev/cua0

# This is your /etc/ppp/options.demand dialing file.

lock
defaultroute
noipdefault
modem
/dev/cua0
115200
crtscts
debug
passive
asyncmap 0
name "avonside"
ipcp-accept-local
ipcp-accept-remote
0.0.0.0:10.10.10.10
demand
connect "/usr/sbin/chat -v -f /etc/ppp/pppscript"

If you have a ethernet connection you should change the local:remote
IP addresses in the options.demand file, to your actual local and
remote address.  Example: 215.346.117.89:312.217.187.96

# This in your /etc/resolv.conf file.

search avonside.school.nz
nameserver 203.29.160.2

203.29.160.2   <-IMPORTANT: This should be the IP address of
                    your service providers nameserver.

# This is your /etc/ppp/pap-secrets file.

Look at /etc/ppp/pap-secrets.

Does everything look correct? if not, run 'pppsetup' again...

=========================================================================
To connect to your service provider.
=========================================================================

~# ppp-go      <-Make PPP connection.)

You'll hear and see the modem dialing then once connected,
logging you in Username: or Login: and Password: etc.

You won't see a Username or Login: and Password: prompt
if they're using PAP or CHAP to authenticate you.

If they use PAP or CHAP you'll just see CONNECT -- got it.

If the connection was successful you'll see the Local IP and
Remote IP address printed to the screen, you can press [Enter].

If you run ppp-go in X windows you probably won't see a Local
and Remote IP address printed to the screen, you'll just see
the connection process come to a end, wait a few seconds and
press [Enter] at that point.

If you don't connect for whatever reason e.g. Failed No
Dialtone, Busy, No Carrier, Whatever, Exit, just press
[Enter] at that point.

if you have syslogd running, you can see the output messages
from pppd and chat in the /var/log/messages and or debug file.

Sample /var/log/messages file.

firewall pppd[562]: Serial connection established.
firewall pppd[562]: Using interface ppp0
firewall pppd[562]: Connect: ppp0 <--> /dev/modem
firewall pppd[562]: local IP address 215.87.78.18
firewall pppd[562]: remote IP address 205.94.97.35

You don't have a successful PPP connection until you
receive a local & remote IP address like above.

If you have the X window system, you could connect in a Xterm.

firewall # startx
firewall # ppp-go
firewall # netscape mosaic etc.

~# ppp-off     <-To end the ppp connection.)

~# ppp-go -h   <-For help.)

There is no support in linux for "WinModems", if you have a
WinModem you will not be able to use it in linux.

There is support for plug n play modems, if you have a pnp
modem you may need "isapnptools" to get it recognized.

=========================================================================
#### A copy of this text can be found in: /etc/ppp/pppsetup.txt ####
=========================================================================

Done... You can exit now...

End...
=========================================================================
PPP-2.3.0 and later has a demand dialing option, you can use it this way,
the options file for demand dialing will be /etc/ppp/options.demand.

Start ppp-go -d, pppd will just stay in the background until you try to 
connect to some site, then pppd will dial your service provider and make 
the ppp connection.

~# ppp-go -d        <-Start pppd this way for demand dialing.)
 #                  <-It should drop you back to #.)
 	      
~# ftp ftp.funet.fi               <-Pppd will start dialing.)             
 # lynx http://www.foo.com        <-Pppd will start dialing etc.)
 # ppp-off -d       <-To end and restart pppd in demand dialing mode.)
 # ppp-off                        <-To end the ppp connection.)

End...
=========================================================================
These are some other ways to make a PPP connection.

The best way to make a PPP connection is to create a chat script, if
you're having trouble with the chat script you can use these methods
below to make the PPP connection.

You can also use these methods below to see what's going on when you
connect to your service provider, i.e. what do they require, do they
present you with a Login: or Username: and Password: prompt etc.

What steps do you have to go through before they start PPP at there
end?

First make sure the IP address of your service providers nameserver  
is in the /etc/resolv.conf file.

nameserver 205.117.312.56   <-For example.)
 
=========================================================================
Using 'dip' to make the PPP connection.
=========================================================================

~# dip -tv
Host name lookup failure

If you get the above messgae when you start 'dip', it's because you
don't have your hostname in the /etc/hosts file.

~# hostname
foobar

If your hostname were 'foobar' you should put it in the /etc/hosts file.

127.0.0.1   localhost
0.0.0.0     foobar.localnet foobar

~# dip -tv
dip> port /dev/cua1
can't open - problems with locking cua1

If you get the above message after "port /dev/modem", it means you have a
lock file in /var/lock/LCK..cua1, remove the lock file and kill dip.

~# rm /var/lock/LCK*
 # killall -9 dip

~# dip -tv

dip> port /dev/cua1    <-Where's the modem? cua0 = com1 cua1 = com2 etc.)
dip> speed 115200      <-Modem speed: 19200 38400 57600
dip> term

at&fw2                 <-Modem init string.)
atdt1234567            <-Replace 1234567 with the phone number.)

Usally you give your username and password then ppp is started, if
they use PAP or CHAP you probably won't be asked for a username and
password, they will just say that PPP has been started or nothing.

Press Ctrl ] to exit dip term mode when PPP is started at their end.

dip> default              <-Use default route.)
dip> mode ppp             <-Start PPP at your end.)

~# ping sunsite.unc.edu   <-To see if you're connected.)

~# dip -k                 <-To kill dip and the PPP connection.)

=========================================================================
Using 'minicom' to make the PPP connection.
=========================================================================

Keep the /etc/ppp/options file that was created by pppsetup, it should 
have at least these options in it.

lock
defaultroute
noipdefault
/dev/cua1         <- cua0 = com1 cua1 = com2 cua2 = com3 cua3 = com4           
57600
modem
crtscts
debug
asyncmap 0

~# minicom -m -s

at&fw2
atdt1234567

Press Alt Q to exit minicom without reset after PPP is started at 
the other end.

~# pppd                <-Start PPP at your end.)

~# ppp-off             <-To end the PPP connection.)
 # killall -INT pppd   <-If you don't have 'ppp-off' end it this way.)

End...
=========================================================================
