Subject: Re: PPP
To: None <curfman@cards.com>
From: Ken Hornstein <kenh@entropic.com>
List: netbsd-help
Date: 01/25/1995 13:38:24
>   So i've gotten a little ways on getting ppp working on my
>NetBSD 1.0 box.  very little. I do have PPP in the kernel.
>
>1: /etc/hosts is "127.0.0.1 localhost gateway"
>   should I place my IP addres in here like:
>      127.0.0.1 localhost
>      xxx.x.x.x gateway

Probably a good idea, but I don't think it will matter.  Having 127.0.0.1
be the address for both localhost _and_ your machine is wrong, though.

>2: I have no network interface defined in my kernel - do i need to
>   use ifconfig for any reason?

Probably not.

>3: I use "route add -net <remote IP> <my IP>" - which at this point
>   is 127.0.0.1 - back to one - should I place my xxx.x.x.x Ip address
>   here - or do i even need to run route?

I would just use the "default" switch to pppd to have it setup a default route
when it connected - it will automatically delete it when it disconnects.

>4: I then run pppd like this:
>
>      pppd -d /dev/tty00 38400 $LOCALIP:$REMOTEIP 
>      connect 'chat -v '''' atdt'$PHONE_NUMBER' CONNECT '''' ogin: 
>      '$USER_NAME' assword: '$PASSWORD passive defaultroute modem crtscts lock
>
>   (on one line of course).  

Assuming you don't have "local" set in /etc/ttys, pppd is blocking waiting for
carrier to be asserted from your modem (it should dial as soon as this command
gets issued).  You have a couple of options:

- hack pppd so it opens the tty device with O_NONBLOCK (that's what I did)
- set "local" in /etc/ttys
- configure your modem so carrier detect is always asserted.

--Ken