ppp success story

ppp success story

Post by Timothy Buckele » Wed, 23 Dec 1998 04:00:00



Attached are my notes concerning just one successful set of setting for
getting ppp going.
Enjoy!
Timothy Buckelew

[ notes 7K ]
It took me a long time to get ppp to work.  In the end,
I was making one small error in sensing the strings being
sent out by my internet service provider.  The tipoff was
an "alarm" message from chat, the dialing program.

Included below are tips and one set of files with settings that work
with RedHat5.1.  Note this is just one way to go about it.
There may be setup programs that work better for you,
like netcfg and wvdial.  Advice often comes in the form,
"Just do this...", and beginners are stuck not knowing what happened
if it doesn't work.  The examples below may give some
depth of understanding.

You can modify files with an editor.  I like "joe", because it is
simple and self-explanatory; and you can move around with the
arrow keys.  Real programmers use vi.

==============================================================

First use a simple communications program to see how your
modem is responding and how your ISP performs:

minicom is helpful in ISP setup. I use this string to
start it, so that ALT commands will work: minicom -M

Initialize your modem with a simple command like AT&D2.
Your modem should respond with "OK".
Then call your ISP, with a command like, ATDT5551212

Using minicom I could see that this is what my modem says:

CONNECT 57600

After about 3 seconds my ISP outputs the following two lines:

** Ascend TNT Terminal Server **

login:

Then of course after I enter my name, it comes back with this:

Password:

Then I enter my password, exit Minicom with ALT-Z, Q, Yes
(just ALT-Q works, too.)

Next launch pppd with the script,

"pppd -d -detach /dev/modem 57600 &"

I have named it "pup" for "ppp up". In other works, put the
script in a file called "pup" in /usr/bin.  Give pup executable
permissions with the command, "chmod +x /usr/bin/pup")
==================================================================
/dev/modem should be a link to your proper ttySn.  It should look
like this in the directory, /dev:

lrwxrwxrwx   1 root     tty            10 Nov  7 23:29 modem -> /dev/ttyS1

You create it like this:
ln -s  /dev/ttyS1 modem

==================================================================
You can watch the results  of your attempts to connect,
on another xterm that is running

"tail -f /var/log//messages".
==================================================================
Then I launch netscape, telnet, ping, or whatever, and it works fine.
The connect speed, 57600, seems to be OK. I get consistent
40000+ (sometimes 50000) bps transfer rates with a ThunderLink
(a WHAT?) v.90 modem.   Nice.

=================================================================
This is the output from
tail -f /var/log/messages     upon SUCCESSFUL minicom login:

Nov 28 11:40:18 localhost pppd[744]: pppd 2.3.3 started by root, uid 0
Nov 28 11:40:18 localhost pppd[744]: Using interface ppp0
Nov 28 11:40:18 localhost pppd[744]: Connect: ppp0 <--> /dev/modem
Nov 28 11:40:21 localhost pppd[744]: local  IP address 209.6.64.43
Nov 28 11:40:21 localhost pppd[744]: remote IP address 10.220.10.116

==================================================
Now for the automatic way.
Here are the successful ppp files:
=====================================================

Here is my ppp-on. Put it in /usr/sbin  so that it can be executed
from any directory.  Give it permissions as follows:
chmod 755 /usr/sbin/ppp-on  

#!/bin/sh
#

TELEPHONE=555-1212      #fake
ACCOUNT=aqua            #Use your own
PASSWORD=xxxxxxxx       #fake; put your real password here
LOCAL_IP=0.0.0.0        #
REMOTE_IP=0.0.0.0       #
NETMASK=255.255.255.0   #
#
export TELEPHONE ACCOUNT PASSWORD
#
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
#
exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS1 57600 \
        asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
        noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT &

==========================================================

Here is MY ppp-on-dialer.  Leave it in /etc/ppp and give it the
same executable permissions  (i.e., chmod 755 /etc/ppp/ppp-on-dialer)
The ISP strings you will be sensing will be different from mine.

#!/bin/sh
exec chat -v                                            \
        TIMEOUT         3                               \
        ABORT           '\nBUSY\r'                      \
        ABORT           '\nNO ANSWER\r'                 \
        ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
        ''              \rAT                            \
        'OK-+++\c-OK'   ATH0                            \
        TIMEOUT         30                              \
        OK              ATDT$TELEPHONE                  \
        "CONNECT 57600"   ''                            \
        "ver **"      ''                              \
        ogin:--ogin:    $ACCOUNT                        \
        assword:        $PASSWORD

=========================================================
Note that "ver **".  That is to sense the last few characters
of the line sent by the ISP, that reads
"** Ascend TNT Terminal Server **"   If your ISP is sending
lines other than "Login:" and "Password:", you may have
to deal with them similarly.
=========================================================
Here is the output from tail -f /var/log/messages for
the SUCCESSFUL ppp-on login:

Nov 28 13:02:19 localhost chat[1093]: expect (CONNECT 57600)
Nov 28 13:02:19 localhost chat[1093]: ^M
Nov 28 13:02:53 localhost chat[1093]: ATDT555-1212^M^M     [fake again]
Nov 28 13:02:53 localhost chat[1093]: CONNECT 57600
Nov 28 13:02:53 localhost chat[1093]:  -- got it
Nov 28 13:02:53 localhost chat[1093]: send (^M)
Nov 28 13:02:53 localhost chat[1093]: expect (ver **)
Nov 28 13:02:53 localhost chat[1093]: ^M
Nov 28 13:02:57 localhost chat[1093]: ^M
Nov 28 13:02:57 localhost chat[1093]:
Nov 28 13:02:57 localhost last message repeated 23 times
Nov 28 13:02:57 localhost chat[1093]: ** Ascend TNT Terminal Server **
Nov 28 13:02:57 localhost chat[1093]:  -- got it
Nov 28 13:02:57 localhost chat[1093]: send (^M)
Nov 28 13:02:57 localhost chat[1093]: expect (ogin:)
Nov 28 13:02:57 localhost chat[1093]: ^M
Nov 28 13:02:57 localhost last message repeated 2 times
Nov 28 13:02:57 localhost chat[1093]: login:
Nov 28 13:02:57 localhost chat[1093]:  -- got it
Nov 28 13:02:57 localhost chat[1093]: send (aqua^M)
Nov 28 13:02:57 localhost chat[1093]: expect (assword:)
Nov 28 13:02:57 localhost chat[1093]:  aqua^M
Nov 28 13:02:57 localhost chat[1093]: Password:
Nov 28 13:02:57 localhost chat[1093]:  -- got it
Nov 28 13:02:57 localhost chat[1093]: send (########^M)    [fake again]
Nov 28 13:02:57 localhost pppd[1092]: Serial connection established.
Nov 28 13:02:58 localhost pppd[1092]: Using interface ppp0
Nov 28 13:02:58 localhost pppd[1092]: Connect: ppp0 <--> /dev/ttyS1
Nov 28 13:03:02 localhost pppd[1092]: local  IP address 209.6.67.152
Nov 28 13:03:02 localhost pppd[1092]: remote IP address 10.220.10.119

==================================================
Here are the contents of my /etc/resolv.conf:

domain ultranet.com
nameserver 146.115.8.20
nameserver 146.115.8.19
==================================================
And here are the contents of my /etc/ppp/options:

0.0.0.0:
/dev/modem
lock
crtscts
defaultroute
asyncmap 0
mtu 576
mru 576

==================================================

To end the session, enter "ps ax" on an xterm, look for the
PID of the pppd, and kill it with "kill nnnn", where nnnn
is the PID.

(Alternatively, you can enter "killall pppd", or use the
furnished script, ppp-off.)

==================================================

Hope this helps somebody.  I know I have been helped many times
by newsgroup contributions.

Sincerely yours,

Timothy Buckelew

 
 
 

ppp success story

Post by k. s. man » Thu, 24 Dec 1998 04:00:00



>Attached are my notes concerning just one successful set of setting for
>getting ppp going.
>Enjoy!
>Timothy Buckelew

I tried a similar procedure and ended up dialing the phone number. It came
back with

CONNECT 50600 (or something like that)

then it printed out some garbage and won't respond to any further commands.
Any ideas on what might be wrong?

Thanks
manu

 
 
 

ppp success story

Post by Timothy Buckele » Thu, 24 Dec 1998 04:00:00




> >Attached are my notes concerning just one successful set of setting for
> >getting ppp going.
> >Enjoy!
> >Timothy Buckelew

> I tried a similar procedure and ended up dialing the phone number. It came
> back with

> CONNECT 50600 (or something like that)

> then it printed out some garbage and won't respond to any further commands.
> Any ideas on what might be wrong?

> Thanks
> manu

  The garbage is a good sign.  That's normal output from your ISP.  After you
see that, there is moment for you to get pppd started, either by manual
method, or through the ppp-on script (if you are ready for that.)  So I think
the next thing for you to is to get your 'ppp-on'  and 'ppp-on-dialer' scripts
prepared and running.
 
 
 

ppp success story

Post by Thorolv Valentinse » Fri, 25 Dec 1998 04:00:00


Glad it worked, man!

For the time being, I'm not part of that successful story. I still use
Win 98 to get connected.

Thorolv Valentinsen

Haugesund, Norway

Timothy Buckelew wrote:

> Attached are my notes concerning just one successful set of setting for
> getting ppp going.
> Enjoy!
> Timothy Buckelew

>   ------------------------------------------------------------------------
> It took me a long time to get ppp to work.  In the end,
> I was making one small error in sensing the strings being
> sent out by my internet service provider.  The tipoff was
> an "alarm" message from chat, the dialing program.

> Included below are tips and one set of files with settings that work
> with RedHat5.1.  Note this is just one way to go about it.
> There may be setup programs that work better for you,
> like netcfg and wvdial.  Advice often comes in the form,
> "Just do this...", and beginners are stuck not knowing what happened
> if it doesn't work.  The examples below may give some
> depth of understanding.

> You can modify files with an editor.  I like "joe", because it is
> simple and self-explanatory; and you can move around with the
> arrow keys.  Real programmers use vi.

> ==============================================================

> First use a simple communications program to see how your
> modem is responding and how your ISP performs:

> minicom is helpful in ISP setup. I use this string to
> start it, so that ALT commands will work: minicom -M

> Initialize your modem with a simple command like AT&D2.
> Your modem should respond with "OK".
> Then call your ISP, with a command like, ATDT5551212

> Using minicom I could see that this is what my modem says:

> CONNECT 57600

> After about 3 seconds my ISP outputs the following two lines:

> ** Ascend TNT Terminal Server **

> login:

> Then of course after I enter my name, it comes back with this:

> Password:

> Then I enter my password, exit Minicom with ALT-Z, Q, Yes
> (just ALT-Q works, too.)

> Next launch pppd with the script,

> "pppd -d -detach /dev/modem 57600 &"

> I have named it "pup" for "ppp up". In other works, put the
> script in a file called "pup" in /usr/bin.  Give pup executable
> permissions with the command, "chmod +x /usr/bin/pup")
> ==================================================================
> /dev/modem should be a link to your proper ttySn.  It should look
> like this in the directory, /dev:

> lrwxrwxrwx   1 root     tty            10 Nov  7 23:29 modem -> /dev/ttyS1

> You create it like this:
> ln -s  /dev/ttyS1 modem

> ==================================================================
> You can watch the results  of your attempts to connect,
> on another xterm that is running

> "tail -f /var/log//messages".
> ==================================================================
> Then I launch netscape, telnet, ping, or whatever, and it works fine.
> The connect speed, 57600, seems to be OK. I get consistent
> 40000+ (sometimes 50000) bps transfer rates with a ThunderLink
> (a WHAT?) v.90 modem.   Nice.

> =================================================================
> This is the output from
> tail -f /var/log/messages     upon SUCCESSFUL minicom login:

> Nov 28 11:40:18 localhost pppd[744]: pppd 2.3.3 started by root, uid 0
> Nov 28 11:40:18 localhost pppd[744]: Using interface ppp0
> Nov 28 11:40:18 localhost pppd[744]: Connect: ppp0 <--> /dev/modem
> Nov 28 11:40:21 localhost pppd[744]: local  IP address 209.6.64.43
> Nov 28 11:40:21 localhost pppd[744]: remote IP address 10.220.10.116

> ==================================================
> Now for the automatic way.
> Here are the successful ppp files:
> =====================================================

> Here is my ppp-on. Put it in /usr/sbin  so that it can be executed
> from any directory.  Give it permissions as follows:
> chmod 755 /usr/sbin/ppp-on

> #!/bin/sh
> #

> TELEPHONE=555-1212      #fake
> ACCOUNT=aqua            #Use your own
> PASSWORD=xxxxxxxx       #fake; put your real password here
> LOCAL_IP=0.0.0.0        #
> REMOTE_IP=0.0.0.0       #
> NETMASK=255.255.255.0   #
> #
> export TELEPHONE ACCOUNT PASSWORD
> #
> DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
> #
> exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS1 57600 \
>         asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
>         noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT &

> ==========================================================

> Here is MY ppp-on-dialer.  Leave it in /etc/ppp and give it the
> same executable permissions  (i.e., chmod 755 /etc/ppp/ppp-on-dialer)
> The ISP strings you will be sensing will be different from mine.

> #!/bin/sh
> exec chat -v                                            \
>         TIMEOUT         3                               \
>         ABORT           '\nBUSY\r'                      \
>         ABORT           '\nNO ANSWER\r'                 \
>         ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
>         ''              \rAT                            \
>         'OK-+++\c-OK'   ATH0                            \
>         TIMEOUT         30                              \
>         OK              ATDT$TELEPHONE                  \
>         "CONNECT 57600"   ''                            \
>         "ver **"        ''                              \
>         ogin:--ogin:    $ACCOUNT                        \
>         assword:        $PASSWORD

> =========================================================
> Note that "ver **".  That is to sense the last few characters
> of the line sent by the ISP, that reads
> "** Ascend TNT Terminal Server **"   If your ISP is sending
> lines other than "Login:" and "Password:", you may have
> to deal with them similarly.
> =========================================================
> Here is the output from tail -f /var/log/messages for
> the SUCCESSFUL ppp-on login:

> Nov 28 13:02:19 localhost chat[1093]: expect (CONNECT 57600)
> Nov 28 13:02:19 localhost chat[1093]: ^M
> Nov 28 13:02:53 localhost chat[1093]: ATDT555-1212^M^M     [fake again]
> Nov 28 13:02:53 localhost chat[1093]: CONNECT 57600
> Nov 28 13:02:53 localhost chat[1093]:  -- got it
> Nov 28 13:02:53 localhost chat[1093]: send (^M)
> Nov 28 13:02:53 localhost chat[1093]: expect (ver **)
> Nov 28 13:02:53 localhost chat[1093]: ^M
> Nov 28 13:02:57 localhost chat[1093]: ^M
> Nov 28 13:02:57 localhost chat[1093]:
> Nov 28 13:02:57 localhost last message repeated 23 times
> Nov 28 13:02:57 localhost chat[1093]: ** Ascend TNT Terminal Server **
> Nov 28 13:02:57 localhost chat[1093]:  -- got it
> Nov 28 13:02:57 localhost chat[1093]: send (^M)
> Nov 28 13:02:57 localhost chat[1093]: expect (ogin:)
> Nov 28 13:02:57 localhost chat[1093]: ^M
> Nov 28 13:02:57 localhost last message repeated 2 times
> Nov 28 13:02:57 localhost chat[1093]: login:
> Nov 28 13:02:57 localhost chat[1093]:  -- got it
> Nov 28 13:02:57 localhost chat[1093]: send (aqua^M)
> Nov 28 13:02:57 localhost chat[1093]: expect (assword:)
> Nov 28 13:02:57 localhost chat[1093]:  aqua^M
> Nov 28 13:02:57 localhost chat[1093]: Password:
> Nov 28 13:02:57 localhost chat[1093]:  -- got it
> Nov 28 13:02:57 localhost chat[1093]: send (########^M)    [fake again]
> Nov 28 13:02:57 localhost pppd[1092]: Serial connection established.
> Nov 28 13:02:58 localhost pppd[1092]: Using interface ppp0
> Nov 28 13:02:58 localhost pppd[1092]: Connect: ppp0 <--> /dev/ttyS1
> Nov 28 13:03:02 localhost pppd[1092]: local  IP address 209.6.67.152
> Nov 28 13:03:02 localhost pppd[1092]: remote IP address 10.220.10.119

> ==================================================
> Here are the contents of my /etc/resolv.conf:

> domain ultranet.com
> nameserver 146.115.8.20
> nameserver 146.115.8.19
> ==================================================
> And here are the contents of my /etc/ppp/options:

> 0.0.0.0:
> /dev/modem
> lock
> crtscts
> defaultroute
> asyncmap 0
> mtu 576
> mru 576

> ==================================================

> To end the session, enter "ps ax" on an xterm, look for the
> PID of the pppd, and kill it with "kill nnnn", where nnnn
> is the PID.

> (Alternatively, you can enter "killall pppd", or use the
> furnished script, ppp-off.)

> ==================================================

> Hope this helps somebody.  I know I have been helped many times
> by newsgroup contributions.

> Sincerely yours,

> Timothy Buckelew

 
 
 

ppp success story

Post by John Carrol » Fri, 25 Dec 1998 04:00:00


From time to time I see messages from folks who are having trouble
getting ppp set up and running.  Frankly, I think the current approach
with the ppp-on-dialer, or whatever it is, is a mess, but then I'm no
expert.  A couple of years ago I upgraded to Slackware something or
other so I could run ELF, but when I tried to use the new ppp scripts,
things went sour.  So I decided to bypass those things and just use the
single script I'd been using on my pre-Elf Slackware boxes.  And it
worked.  Don't know if it will work for everyone, but it's worked for me
with three different ISPs, so maybe it's a decent script that I stole
from someone years ago and modified a little bit.  Here's the
ppp-on script, for anybody interested.

#!/bin/sh
# Set up a ppp connection to ISP
# Device=cua3

/usr/sbin/pppd connect '/usr/sbin/chat -v "" \
"yourmodemstring" OK ATDTPHONENUMBER CONNECT 'login pap-restart \
10 +ua /etc/ppp/pap-secrets /dev/cua3 38400 netmask 255.255.255.0 \
debug crtscts modem defaultroute noipdefault kdebug 2
#
# That's all there is to it.  I put it in /usr/bin as root and
# chmod 755 ppp-on.

I make an empty file /etc/ppp/options  (chmod 644)

The etc/ppp/pap-secrets file reads simply
username
password

Finally, to get the modem up to speed, I put the following in
/etc/rc.d/local

#!/bin/sh
setserial /dev/cua3 spd-vhi   (use your own "cua" of course)
stty sctscts < /dev/cua3
#################################################################

Don't know if this will help anybody or if there's some reason not to
use it, but it's worked fine for me in the four years I've been running
Linux.  And I don't have to worry about the scripts that come with the
distribution.

John Carroll