Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 1997 21:40:24 -0700
From:      Michelle Brownsworth <michelle@eugene.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   "Sorry - PPP is not available on this system" msg
Message-ID:  <v03007801aeff64c81afb@[207.48.96.49]>

next in thread | raw e-mail | index | archive | help
I'm planning to hang a single modem on my server's COM1 port with the
notion of having a 24-hour dedicated 33.6 connection from home.  To that
end, after perusing the pertinent Handbook and FAQ sections, I've been
attempting to configure dialin and PPP.

It seemed logical to create a ppp user account as the first order of
business, as recommended somewhere in the docs, can't remember where:

/etc/passwd
------------
ppp:*:2000:2000:PPP Login User:/home/ppp:/usr/local/bin/ppplogin


/usr/local/bin/ppplogin
----------------------
#!/bin/sh:
/usr/sbin/ppp -direct


As the next step, I configured the three files discussed in the Handbook
section on Serial Communication : Dialin Service : Configuration Files
(11.3.5.), and echoed in the FAQ "How can I enable dialup logins on my
modem?" (10.8), in conformance to my setup:

/etc/gettytab
-------------
#
# Additions for a V.32bis or V.34 Modem
# Starting at 57.6 Kbps
#
vm|VH300|Very High Speed Modem at 300,8-bit:\
   :nx=VH57600:tc=std.300:
vn|VH1200|Very High Speed Modem at 1200,8-bit:\
   :nx=VH300:tc=std.1200:
vo|VH2400|Very High Speed Modem at 2400,8-bit:\
   :nx=VH1200:tc=std.2400:
vp|VH9600|Very High Speed Modem at 9600,8-bit:\
   :nx=VH2400:tc=std.9600:
vq|VH57600|Very High Speed Modem at 57600,8-bit:\
   :nx=VH9600:tc=std.57600:

/etc/ttys
---------
# Serial terminals
ttyd0 "/usr/libexec/getty VH57600"  dialup   on  secure

/etc/rc.local

# Set hardware (RTS/CTS) flow control for modem port COM1
stty -f /dev/ttyd0 crtscts

bash# kill -1 1
bash# ps ax
12140  d0  Is+    0:00.01 /usr/libexec/getty VH57600 ttyd0

bash# stty -a -f /dev/ttyd0
speed 57600 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
        -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
        -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -ignbrk
        -brkint -inpck -ignpar -parmrk
oflags: -opost -onlcr -oxtabs
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
        -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
        min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
        stop = ^S; susp = ^Z; time = 0; werase = ^W;


So far, so good.

bash# whereis pppd
/usr/sbin/pppd

bash# /usr/sbin/ppp*
-r-sr-xr-x   1 root  bin      86016 Jul 17 02:34 ppp
-r-sr-xr-x   1 root  bin      65536 Jul 17 02:34 pppd
-r-xr-sr-x   1 bin   kmem     12288 Jul 17 02:34 pppstats

Okay, so I had the PPP daemon.  However...

bash# pppd
Sorry - PPP is not available on this system

DOH!  Okay, we're obviously not ready, yet.  Back to the Handbook,  PPP and
SLIP : Setting up kernel PPP : Working as a PPP server (12.2.2).  It
recommended I create the following three files for dialin PPP:


/etc/ppp/options (configuration file)
----------------
crtscts                         # Hardware flow control
netmask 255.255.255.0           # netmask ( not required )
206.100.174.68:206.100.174.69   # ip's of local and remote hosts
                                # local ip must be different from one
                                # you assigned to the ethernet ( or other )
                                # interface on your machine.
                                # remote IP is ip address that will be
                                # assigned to the remote machine
domain ppp.primelogic.com       # your domain
passive                         # wait for LCP
modem                           # modem line


/etc/ppp/pppserv (script to start pppd)
-----------------
#!/bin/sh
ps ax |grep pppd |grep -v grep
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then
        echo 'killing pppd, PID=' ${pid}
        kill ${pid}
fi
ps ax |grep kermit |grep -v grep
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then
        echo 'killing kermit, PID=' ${pid}
        kill -9 ${pid}
fi

# reset ppp interface
ifconfig ppp0 down
ifconfig ppp0 delete

# enable autoanswer mode
/usr/local/etc/kermit/kermit -y /etc/ppp/kermit.ans

# run ppp
pppd /dev/ttyd0 57600


/etc/ppp/pppservdown (script to stop pppd)
---------------------
#!/bin/sh
ps ax |grep pppd |grep -v grep
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then
        echo 'killing pppd, PID=' ${pid}
        kill ${pid}
fi
ps ax |grep kermit |grep -v grep
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then
        echo 'killing kermit, PID=' ${pid}
        kill -9 ${pid}
fi
ifconfig ppp0 down
ifconfig ppp0 delete

kermit -y /etc/ppp/kermit.noans


/etc/ppp/kermit.ans (kermit script to enable auto-answer)
-------------------
set line /dev/ttyd0
set speed 57600
set file type binary
set file names literal
set win 8
set rec pack 1024
set send pack 1024
set block 3
set term bytesize 8
set command bytesize 8
set flow none

pau 1
out +++
inp 5 OK
out ATH0\13
inp 5 OK
echo \13
out ATS0=1\13   ; change this to out ATS0=0\13 if you want to disable
                ; autoanswer mod
inp 5 OK
echo \13
exit


Okay.  Now to get that pppd up and running...

bash# ./pppserv
ifconfig: ioctl (SIOCGIFFLAGS): no such interface
ifconfig: ioctl (SIOCGIFFLAGS): no such interface


Sorry - PPP is not available on this system

DOH!  Obviously, I something's amiss.  The ifconfig msg is no doubt caused
by the pppserv script's "ifconfig ppp0 down" and
"ifconfig ppp0 delete" lines, but I'm not sure what it wants, how to
specify an interface that will satisfy it, or if it's even necessary.  In
fact, I don't know if the scripts found in the Handbook section in question
(12.2.2) are even relevant to 2.1.5; the author did place the following
caveat at the beginning of the section:

"This document is written based on the author's experience with FreeBSD
versions 1.0, 1.1, and 1.1.5.1 (and experience with dialup modems on other
UNIX-like operating systems); however, this document may not answer all of
your questions or provide examples specific enough to your environment."

The fact that the scripts are designed to be run by a comparatively ancient
FreeBSD version is not encouraging.  Another puzzlement:  How is it
specified that /etc/ppp/options is the configuration file that pppd is
supposed to use?  And why is it necessary to employ Kermit in the dialin
process to setup the modem to auto answer via the /etc/ppp/kermit.ans
script?  Nevertheless, it still seems odd that pppd can't be started from
the command line.

I'm comin' up empty here...

.\\ichelle

--------------------
Michelle Brownsworth
System Administrator
IMS, Inc.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v03007801aeff64c81afb>