John's RAS Daemon

rasd for Linux Version 0.8

The first dial in modem I set up on a Linux box used chat to talk to the modem.  I had so many reliability problems that I wrote my own ras daemon which did what I wanted it to do.

RAS or Remote Access Service is the term Microsoft use for the Linux concept of ppp.  All the daemon does is initialise a modem and then wait for it to ring.  When it does it answers the call and forks pppd which does it's thing.  When pppd exits, rasd makes sure that the modem is hung up and then waits for it to ring again.

Configuration is extremely simple, a ppp options file is set up for each dial in modem (I have 5 on my machine).  One instance of the daemon is run for each modem.  The daemon looks in the options file for the device name and line speed and optionally a non-standard pppd location and then goes about it's work.  No need for gettys or connect scripts.

Downloads

File Format Architecture Operating System Download
Source tar.gz any linux rasd-0.8.tar.gz
Binary RPM i386 RHEL2/CentOS-2 rasd-0.8-1.el2.i386.rpm
Binary RPM i386 RHEL3/CentOS-3 rasd-0.8-1.el3.i386.rpm
Binary RPM i386 RHEL4/CentOS-4 rasd-0.8-1.el4.i386.rpm

 

Instructions

Installation is simple, first download and install the RPM.  If you are not running one of the listed Operating Systems then pick the closest or you may have to build from source.

Make sure you have installed the latest ppp from your vendor.  Some old RedHat pppd versions have been buggy.

Create a file called /etc/ppp/options.ras0 and add the following options:

# Written by John Newbigin
# for use with the rasd
/dev/ttyS0
115200
# plugin /usr/lib/pppd/smb.so
ms-dns 192.168.1.1
ms-dns 192.168.1.2
ms-wins 192.168.1.10
ms-wins 192.168.1.11
asyncmap 0
escape 43
modem
connect /bin/true
auth
crtscts
noipdefault
+pap
#papcrypt
login
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
#debug
10.0.0.100:192.168.1.100

You should make sure you know what all these options do.  try man pppd.

Then start the ras daemon with the supplied rc script.  If you want more that one dial in device then create more options files and edit the rc script to start them.

If you need to supply a special init string for your modem then add this line to your options file:

#init=AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0

The line shown above is the default init string.  You can also specify the location of the pppd like this

#pppd=/usr/local/sbin/pppd.special

rasd will find your device and speed from the options file.  The device must start with /dev/

You can see what is going on by looking in /var/log/ras.log


Last modified 20050810
Maintained by John Newbigin