*BSD News Article 44355


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!comp.vuw.ac.nz!waikato!status.gen.nz!pinnacle.co.nz!not-for-mail
From: jonc@pinnacle.co.nz (Jonathan Chen)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: FreeBSD2.0R as PPP client - help PLEASE !
Date: 22 May 1995 18:01:43 +1200
Organization: Pinnacle Software Ltd, Auckland, New Zealand
Lines: 46
Message-ID: <3pp9c7$9ub@kea.pinnacle.co.nz>
References: <3pm3t5$peo@stang.netspace.net.au>
NNTP-Posting-Host: kea.pinnacle.co.nz
Keywords: ppp client freebsd
X-Newsreader: NN version 6.5.0 #2

In <3pm3t5$peo@stang.netspace.net.au>
ahill@stang.netspace.net.au (Anthony Hill) writes:

[snip]
>/etc/ppp/options as per the ppp.faq. (I removed the noipdefault line

Leave that in and remove the line containing your IP address and the remote
hosts IP address.

> 
>I dial and connect to my provider using tip cua01, start ppp on the remote end, and exit tip
>(without haging the modem up). Now I type /usr/sbin/pppd /dev/cua01 38400.

A simpler way to do this is to use the "chat" and a chat file. I use the
following command to initiate a connection :

    root# pppd tty01 19200 connect 'chat -v -f chat.my-isp'

And in the chat.my-isp file:

    ABORT BUSY
    ABORT ERROR
    ABORT 'NO DIALTONE'
    ABORT 'NO CARRIER'
    '' ATZ OK ATDT1234567 CONNECT \d
    TIMEOUT 5
    ogin:\s--ogin:\s mylogin ssword: mypasswd prompt:\s /usr/lib/ppp/ppp

This dials, connects and negotiates the addresses from just one line entered.
To kill the connection:
    root # kill `cat /var/run/ppp0.pid`
which has the added advantage of hanging up the phone if the modem is set up
appropriately.

The most problem that I ever had with this was working out the chat script,
and that was debugged by adding the following line in /etc/syslog.conf:

    # Hand chat debug messages to root
    local2.debug            root

The PPP.FAQ was helpful, but I ignored quite a bit of it and depended more
on the online manuals.
-- 
-------------------------------------------------------------------
Jonathan Chen <jonc@pinnacle.co.nz> |    When all else fails, RTFM.
-------------------------------------------------------------------