Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 1996 12:12:08 -0600 (CST)
From:      Robert J Fowler <rjf@cs.rice.edu>
To:        questions@freebsd.org
Subject:   PPP dialup script/ protocol initialization problem.
Message-ID:  <199611141812.MAA21244@helena.cs.rice.edu>

next in thread | raw e-mail | index | archive | help
I'm having problems getting user ppp to work using a dialing script.
The main symptoms are  ppp gets a SIGHUP and freezes before either
a "login OK!" or "login failed." appears.  Furthermore,
the log messages appear in a strange order.  It's repeatable in that
I get the same screen outputs and log messages each time.

Manual dialup works just fine.  I've started to grub around in the
sources and have concluded that it'll take at least an evening or two
of hacking to figure out just what's going on (more if I have to learn
about the ppp spec) and how to fix it, so I'm posting this in the hope
that there's a quick fix and/or someone's seen this before. 

** Configuration:

Cyrix 686 in a Gigabyte MB running at 133/66 MHx.
A late model (mfg date Aug 96) USR Sportster 28.8/33.3 internal modem.
Running 2.1.5R and the version of ppp included in the Walnut Creek CD distribution.
IP addresses at both ends are assigned dynamically.  

**The relevant bits of my ppp.conf file:

default:
 set device /dev/cuaa1
 set debug 0 1 2 3 		<<--- see mini flame below.
 set authname rjf
 set authkey SomeThing
 set speed 38400
 disable lqr
 deny lqr
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\T TIMEOUT 40 CONNECT"
rice28:
 set phone 9423324
 set login "TIMEOUT 12 ername:-\r-ername: \\U TIMEOUT 30 ssword: \\P rice.edu\> ppp"
 set timeout 900
 set ifaddr 0 128.42.5.64/24 255.255.255.0

-- Note: I inserted the "TIMEOUT 30"  on the chance that chat was timing out.

-- Mini-flame on : The man page and examples for ppp have problems.
In particular, there's no complete reference for commands.  It was
necessary to browse the source to determine that the debug level
variable modified by the "set debug" command is in fact a bit vector
and that the commant takes a sequence of integers in [0-5] ( or ascii
strings naming the features to log).  Also, the examples use
"ername:-\\r-ername:", though my reading of the parser in chat.c
indicates that it's really expecting "ername:-\r-ername:".  I intend
to merge my notes about this with the man page some time soon. 
OTOH, it's like the early days of Unix when the only reliable
documentation was the source.;-) Mini-flame off.

**** For the sake of reference,  a transcript of a successful manual login.

alae2: {66} ppp rice28
User Process PPP. Written by Toshiharu OHNO.
Log level is 0f
Using interface: tun0
Interactive mode
ppp on alae2> passwd xxxxx
ppp ON alae2> term
Enter to terminal mode.
Type `~?' for help.
atdt9423324
CONNECT 26400/ARQ/V34/LAPM/V42BIS
         -------------- Approx.  16 lines of greeting message deleted
Username: rjf
Password: 
lethe.rice.edu>ppp
Entering PPP mode.
Async interface address is unnumbered (Ethernet0)
Your IP address is 128.42.5.45. MTU is 1500 bytes
Header compression will match your system.

~ppp ON alae2> Packet mode.

PPP ON alae2> add 0 0 HISADDR
PPP ON alae2> 

*****  In contrast, here's the screen transcript when I attempt to use "dial"

alae2: {51} ppp rice28
User Process PPP. Written by Toshiharu OHNO.
Log level is 0f
Using interface: tun0
Interactive mode
ppp on alae2> passwd XXXXX
ppp ON alae2> dial
Dial attempt 1
dial OK!
	    <<---- Hangs here forever.  All Log appear before ^C'ing.
^C^C
alae2: {52}

 --  Note that a login success/failure message never appears. --

*********  Here's the corresponding log fragment ********

11-14 00:09:01 [8631] Using interface: tun0
11-14 00:09:01 [8631] PPP Started.
11-14 00:09:36 [8631] Expecting 
11-14 00:09:36 [8631] sending: ATE1Q0
11-14 00:09:36 [8631] Expecting OK-AT-OK
11-14 00:09:36 [8631] Wait for (5): OK --> OK
11-14 00:09:36 [8631] sending: ATDT9423324
11-14 00:09:36 [8631] Expecting CONNECT
11-14 00:09:36 [8631] Wait for (40): CONNECT --> CONNECT
11-14 00:09:54 [8631] Expecting ername:-r-ername:
11-14 00:09:54 [8631] Wait for (12): ername: --> ername:
11-14 00:09:55 [8631] sending: rjf
11-14 00:09:55 [8631] Expecting ssword:
11-14 00:09:55 [8631] Wait for (12): ssword: --> ssword:
11-14 00:09:55 [8631] sending: \P
11-14 00:09:55 [8631] Expecting rice.edu>
11-14 00:09:55 [8631] Wait for (12): rice.edu> --> rice.edu>
11-14 00:09:56 [8631] sending: ppp
11-14 00:09:56 [8631] SIGHUP
11-14 00:09:56 [8631] *Connected!
11-14 00:09:57 [8631] PPP Terminated.

Since the *Connected! msg is printed in ModemTimeout() when it detects
that DCD goes high, why is it appearing as late as it does, i.e.
near the end of the login chat?  Clearly some number of things are
happening out of order.  What causes this and what's the fix?
Suspects: Clock/timer problems related to the 686?  Modem configuration?
A difference in how the two dialing methods deal with the
ASCII text sent by the remote host when it starts its ppp?
A  bug in the protocol initialization code?

Thanks in advance,

Rob Fowler











Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611141812.MAA21244>