Subject: dialin pppd and mgetty
To: None <netbsd-help@netbsd.org>
From: Laine Stump <lainestump@rcn.com>
List: netbsd-help
Date: 11/12/1999 01:37:34
I'm running NetBSD-current as of a couple weeks ago, but this is a general
question...

I've had dialout pppd running on my system for about a year, and now want
to do dialin. I'm encountering two unrelated problems:

1) After I added the mgetty line to /etc/ttys and did kill -HUP 1, I get an
mgetty process running, and it answers the phone when I dial in. However,
after I logout and hangup, init never starts up another mgetty - I have to
manually to kill -HUP 1 to get another one. Here's the line I added to
/etc/ttys:

tty00   "/usr/pkg/sbin/mgetty -x 9 -s 115200 -I 617-555-1212" vt220 on

The mgetty debug logs show nothing (of course, since mgetty isn't running).
As I recall, the way things are supposed to happen is:

    * init forks, with the original process doing some sort of wait on the
new process,
      and the new process running mgetty.
    * after a user logs in, mgetty execs the user's shell (bash or pppd in
my case)
      thus giving the shell the same pid as mgetty had (so init is still
waiting)
    * when the shell exits, init wakes up and starts another mgetty.

That last step doesn't seem to be happening. Any ideas?

2) I've configured mgetty to run pppd if it sees an LCP configure request
at the login prompt, and this works. It also gets through PAP and starts
IPCP, but never finishes. It seems that the other end doesn't want to
answer my Configure requests to setup my own IP address (it neither ACKs
nor NACKs them).

The remote end is Windows NT, and it is successfully dialing into several
different ISPs (and the NetBSD box is successfully dialing into two
different ISPs as well). The PPP configuration on the NT side is set to get
all info from the remote (in this case, NetBSD). 
The line in mgetty's login.config file that calls pppd when a call comes in
is:

    /AutoPPP/ -	-	/usr/sbin/pppd file /etc/ppp/peers/dialin

and /etc/ppp/peers/dialin contains:

	debug
	crtscts
	login
	ms-dns 10.0.20.11
	10.0.22.2:10.0.21.3
	proxyarp
	lock

This is probably some setting that needs to be setup weird for NT. Is there
maybe a boilerplate somewhere for dialin PPP? (there isn't anything in the
networking FAQ on the website).

****************** pppd log ****************

Nov 12 00:51:59 idris pppd[9464]: pppd 2.3.9 started by root, uid 0
Nov 12 00:51:59 idris pppd[9464]: Using interface ppp0
Nov 12 00:51:59 idris pppd[9464]: Connect: ppp0 <--> /dev/tty00
Nov 12 00:51:59 idris pppd[9464]: sent [LCP ConfReq id=0x1 <asyncmap 0x0>
<auth pap> <magic 0x9080498d> <pcomp> <accomp>]
Nov 12 00:52:00 idris pppd[9464]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0>
<auth pap> <magic 0x9080498d> <pcomp> <accomp>]
Nov 12 00:52:02 idris pppd[9464]: rcvd [LCP ConfReq id=0x0 <asyncmap 0x0>
<magic 0x38a6> <pcomp> <accomp> <callback CBCP>]
Nov 12 00:52:02 idris pppd[9464]: sent [LCP ConfRej id=0x0 <callback CBCP>]
Nov 12 00:52:02 idris pppd[9464]: rcvd [LCP ConfReq id=0x1 <asyncmap 0x0>
<magic 0x38a6> <pcomp> <accomp>]
Nov 12 00:52:02 idris pppd[9464]: sent [LCP ConfAck id=0x1 <asyncmap 0x0>
<magic 0x38a6> <pcomp> <accomp>]
Nov 12 00:52:02 idris pppd[9464]: rcvd [LCP code=0xc id=0x2 00 00 38 a6 4d
53 52 41 53 56 34 2e 30 30]
Nov 12 00:52:02 idris pppd[9464]: sent [LCP CodeRej id=0x2 0c 02 00 12 00
00 38 a6 4d 53 52 41 53 56 34 2e 30 30]
Nov 12 00:52:02 idris pppd[9464]: rcvd [LCP code=0xc id=0x3 00 00 38 a6 4d
53 52 41 53 2d 31 2d 4c 41 50 52 41 54]
Nov 12 00:52:02 idris pppd[9464]: sent [LCP CodeRej id=0x3 0c 03 00 16 00
00 38 a6 4d 53 52 41 53 2d 31 2d 4c 41 50 52 41 54]
Nov 12 00:52:02 idris pppd[9464]: rcvd [PAP AuthReq id=0x1 user="laine"
password="xxxxx"]
Nov 12 00:52:02 idris pppd[9464]: user laine logged in
Nov 12 00:52:02 idris pppd[9464]: sent [PAP AuthAck id=0x1 "Login ok"]
Nov 12 00:52:02 idris pppd[9464]: sent [IPCP ConfReq id=0x1 <addr
10.0.21.2> <compress VJ 0f 01>]
Nov 12 00:52:02 idris pppd[9464]: sent [CCP ConfReq id=0x1 <deflate 15>
<deflate(old#) 15> <bsd v1 15>]
Nov 12 00:52:02 idris pppd[9464]: rcvd [CCP ConfReq id=0x4]
Nov 12 00:52:02 idris pppd[9464]: sent [CCP ConfAck id=0x4]
Nov 12 00:52:02 idris pppd[9464]: rcvd [IPCP ConfReq id=0x5 <compress VJ 0f
01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-wins 0.0.0.0> <ms-dns3 0.0.0.0>
<ms-wins 0.0.0.0>]
Nov 12 00:52:02 idris pppd[9464]: sent [IPCP ConfRej id=0x5 <ms-wins
0.0.0.0> <ms-wins 0.0.0.0>]
Nov 12 00:52:02 idris pppd[9464]: rcvd [IPCP ConfAck id=0x1 <addr
10.0.21.2> <compress VJ 0f 01>]
Nov 12 00:52:02 idris pppd[9464]: rcvd [CCP ConfRej id=0x1 <deflate 15>
<deflate(old#) 15> <bsd v1 15>]
Nov 12 00:52:02 idris pppd[9464]: sent [CCP ConfReq id=0x2]
Nov 12 00:52:02 idris pppd[9464]: rcvd [IPCP ConfReq id=0x6 <compress VJ 0f
01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Nov 12 00:52:02 idris pppd[9464]: sent [IPCP ConfNak id=0x6 <addr
10.0.21.3> <ms-dns1 10.0.20.11> <ms-dns3 10.0.20.11>]
Nov 12 00:52:02 idris pppd[9464]: rcvd [CCP ConfAck id=0x2]
Nov 12 00:52:05 idris pppd[9464]: sent [IPCP ConfReq id=0x1 <addr
10.0.21.2> <compress VJ 0f 01>]
Nov 12 00:52:29 idris last message repeated 8 times
Nov 12 00:52:32 idris pppd[9464]: sent [IPCP ConfReq id=0x1 <addr
10.0.21.2> <compress VJ 0f 01>]
Nov 12 00:52:35 idris pppd[9464]: IPCP: timeout sending Config-Requests 
Nov 12 00:52:35 idris pppd[9464]: sent [LCP TermReq id=0x4 "No network
protocols running"]
Nov 12 00:52:35 idris pppd[9464]: Hangup (SIGHUP)
Nov 12 00:52:35 idris pppd[9464]: Modem hangup
Nov 12 00:52:35 idris pppd[9464]: Connection terminated.
Nov 12 00:52:35 idris pppd[9464]: Exit.