Subject: Re: pppd won't work from init?
To: Port-i386 <port-i386@netbsd.org>
From: Bruce Anderson <brucea@wavefront.com>
List: port-i386
Date: 10/16/1998 16:53:00
On Fri, Oct 16, 1998 6:24 AM, Jukka Marin <mailto:jmarin@pyy.jmp.fi> wrote:
> Trying to get a few pppd's started by init, I noticed that the chat
script
> always fails (I'm not sure if it runs at all, pppd just reports the
connect
> script failed).  With the same config files, pppd works just fine when
run
> manually or from /etc/rc.local.  I wanted to use init to keep the pppd's
> running at all times, but it doesn't seem to be possible.. am I doing
> something wrong here?
> 
> This is with a 1.3.1 kernel, BTW.
> 
> (After I get this working, I'll try hacking pppd to use a radius server
> for authentication...)
> 
>   -jm
> 
Start pppd from /etc/ttys
Take a look at my set up for a in bound null-modem connection to my
Classic II (lynx).
Out bound connections are done by using a peers file.

On my server cougar: (NetBSD 1.3.2 pppd 2.3.1)
% grep tty01 /etc/ttys
#tty01  "/usr/libexec/getty std.19200"  vt102   on secure
tty01   "/usr/sbin/pppd"                unknown on secure

% cat /etc/ppp/options.tty01
38400
0.0.0.0:lynx
passive
-detach
local
lock
netmask 255.255.255.255
proxyarp
asyncmap 80000000               # represents the character 0x1f or  ^_.
lcp-echo-interval 15            # ping the remote every 15 seconds
lcp-echo-failure 20             # declare link down after 20 pings fail

/etc/ppp/options (is empty)

And out bound connections use the 'call' syntax /etc/ppp/peers/ 
% pppd call 603
where 603 is a file /etc/ppp/peers/603

% cat /etc/ppp/peers/603
tty00 57600                     # modem port and speed
#connect '/etc/ppp/chat-script "603-9702 <acct name>" ' # connect script
connect '/etc/ppp/chat-script "603-9609" ' # connect script
# welcome '/sbin/route delete default' # delete any current default routes
first
ipparam "Your-ISP.com XXX.XXX.XXX.XXX,XXX.XXX.XXX.XXX
Your-ISP.com,Your.com"
disconnect /etc/ppp/ppp-down
lock                            # lock the modem port on connect
modem                           # use full modem control
passive                         # wait for remote to come up
crtscts                         # use hardware flow control
asyncmap 80000000               # represents the character 0x1f or  ^_.
defaultroute                    # add default routing when link comes up
noipdefault                     # no local defaults for IP addresses
ipcp-accept-local               # allow remote to specify our IP address
ipcp-accept-remote              # allow remote to specify his IP address
lcp-echo-interval 15            # ping the remote every 15 seconds
lcp-echo-failure 20             # declare link down after 20 pings fail
netmask 255.255.255.0           # netmask for our assigned IP address
domain wavefront.net            # domain name we're connecting into
user <acct name>                # account name to use to log onto remote