On Sat, 22 Jan 2000, Larry Owens wrote:
>
> I've been trying to set up a home network with dial-on-demand. So far,
> I've had no luck. I think it's because 6.1 uses WVDIAL instead of pppd and
> chat, but I'm not sure. Has anyone mananged to make this work?
It's not true that "6.1 uses WVDIAL instead of pppd and chat". Both are
present out of the box in 6.1. WVDIAL is very easy to get to work for
manual connections. It's good for testing whether your modem is working.
However, wvdial is not meant for automagic operations. From what I can
see, pppd is the intended tool for automagic, including demand, connections.
The demand option was added to make pppd functional enough to not require
using diald, which others may suggest you try instead. However, I wanted
to keep my system as vanilla RedHat as possible.
You can prove that pppd demand option works "by hand":
/usr/sbin/pppd /dev/ttyS3 115200 10.0.0.1:10.0.0.2 ipcp-accept-local \
ipcp-accept-remote demand holdoff 5 idle 60 persist debug lock \
modem crtscts defaultroute noauth \
connect '/usr/sbin/chat -v -f /etc/ppp/chatscript'
where I created /etc/ppp/chatscript as:
TIMEOUT 5
"" ATZ
OK ATDT 5551212
ABORT "NO CARRIER"
ABORT BUSY
ABORT "NO DIALTONE"
ABORT WAITING
TIMEOUT 45
CONNECT ""
"ogin:" mysuername
"sword:" mypassword
(note: the pppd command is all one line, the \ above just indicates
a continuation line).
Now, this works just fine for me. The short idle time of 60 seconds
lets me see the line drop and I can hear it dial when I try to access
the net again. Obviously this should be more like 3000 seconds or
somesuch. Likewise, debug should be dropped for production.
Also note that the "ogin:" prompt is what my ISP uses (login:) and
"password:" in the chatscript.
So, this proves that pppd works with demand option.
Now, you don't want to have to type the command every time you
restart your system, so how do you automate it?
It's been suggested to use linuxconf to configure pppd.
When I do this,
linuxconf creates the files in /etc/sysconfig/network-scripts:
ifcfg-ppp0:
DEVICE="ppp0"
ONBOOT="yes"
USERCTL="no"
MODEMPORT="/dev/ttyS3"
LINESPEED="115200"
PERSIST="yes"
DEFABORT="yes"
DEBUG="no"
INITSTRING="ATZ"
DEFROUTE="yes"
HARDFLOWCTL="yes"
ESCAPECHARS="no"
PPPOPTIONS="ipcp-accept-local ipcp-accept-remote demand holdoff 5 noauth"
PAPNAME="myusername"
REMIP="10.0.0.2"
NETMASK=""
IPADDR="10.0.0.1"
MRU=""
MTU=""
DISCONNECTTIMEOUT="60"
RETRYTIMEOUT="5"
BOOTPROTO="dhcp"
PEERDNS="yes"
chat-ppp0:
'ABORT' 'BUSY'
'ABORT' 'NO CARRIER'
'ABORT' 'NO DIALTONE'
'ABORT' 'Invalid Login'
'ABORT' "Login Incorrect'
'' 'ATZ'
'OK' 'ATDT5551212'
'CONNECT' ''
'ogin:' 'myusername'
'sword:' 'mypassword'
(single quote used everwhere above)
/etc/ppp/options:
lock
(I'm doing IP Masq so I start my rc.firewall script from
/etc/ppp/ip-up.local)
If I leave "demand" out of the options, it works.
If I include "demand" in the options list, it doesn't work
(appears to hang)
So how can I make this work?
(Note: yes, I got the ppp update from redhat: ppp-2.3.10-3 as
suggested in the 6.1 "gotchas")
(Note: most of the documentation out there is too old to help
with the demand option of pppd. What was very helpful was a search
of the redhat-list archives at www.moongroup.com (Thanks Chuck Mead!!!)
Also, there doesn't appear to be anything online that describes the
current pppd in very much detail. Apparently, there are about 70 options
for pppd and there is a book that is said to describe them, but nothing
online. There wasn't much out there that suggested using fake local
IP numbers (10.0.0.1 & 2) which are used until the ppp connection is
made and then the options ipcp-accept-local and -remote allow these to
be redefined by the ppp/dhcp connection. However, if you know
what you should fill in, linuxconf is a very easy way to configure it.)
Now, why is demand not working with the above configuration?
***************************************************************************
Jerry Winegarden OIT/Technical Support Duke University
[EMAIL PROTECTED] http://www-jerry.oit.duke.edu
***************************************************************************
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.