Is there any open source PPP that's easier to use than Sun's aspppd?

Is there any open source PPP that's easier to use than Sun's aspppd?

Yes, PPPd. As you can see, aspppd, the Solaris-bundled ppp product, is
difficult to setup and use ("infamous"). Part of the problem is it
uses the old BNU/UUCP programs and configuration files, which are
too general and weren't really intended for PPP.


PPPd, which I use, has been ported to Solaris and is easier to
configure, performs better, and is still free. It's available
in binary and source from Peter Marelas at
http://www.phase-one.com.au/solaris-x86/pppd/
PPPd 2.3.5 works for Solaris 2.6 - 8.
More recent versions of PPPd are not required but are available
(source only) from

ftp://cs.anu.edu.au/pub/software/ppp/

Follow instructions in file README.sol2 to compile.


I use PPPD with Solaris 7. PPPD 2.3.5 also works with 2.5.1 and 2.6.
This product isn't designed for use with SMP machines.


For Solaris 7, you can use the binaries compiled for Solaris 2.6 (not 2.5.1).
If you compile on Solaris 7, you need to modify source file common/zlib.c
to compile it. Change every definition of variable "u" to "u1".
There's 5 occurrences at lines 4215, 4290, 4329, and 4337, and 4347.
For example, change "inflate_huft *u[BMAX];" to "inflate_huft *u1[BMAX];".


Besides PPPD, mentioned here, Andrew Gabriel mentions there's also DP
(for Dialup PPP). DP documentation and source is available from
http://www.acn.purdue.edu/dp/
I don't have any personal experience with this software.


PPPD Configuration


To configure, you set up a chat script to handle the ISP dialog and
enter the phone number and other parameters in the pppd options file.
Examples I use are below (files are in /etc/ppp unless otherwise mentioned).


I removed files chap-secrets and pap-secrets, as I don't need them for
my ISP. File connect-errors has error output, if any, from bad connections.


File /etc/ppp/ip-down:


#!/usr/bin/sh
# Turn off IP forwarding
/usr/sbin/ndd -set /dev/ip ip_forwarding 0




File /etc/ppp/ip-up:


#!/usr/bin/sh
# Turn on IP forwarding
/usr/sbin/ndd -set /dev/ip ip_forwarding 1




File /etc/ppp/ppp-on:


#!/usr/bin/sh
# Set up a PPP link
PEER=myisp
LOCKDEV=ppp0
#PPPDOPTS=-d # uncomment for debugging
if [ -f /etc/ppp/$LOCKDEV.pid ] ; then
echo "PPP device $LOCKDEV is locked"
exit 1
fi
/usr/local/bin/pppd $PPPDOPTS call $PEER
exit 0



File /etc/ppp/ppp-off:


#!/usr/bin/sh
# /etc/ppp/ppp-off
# Shutdown a PPP link
LOCKDEV=ppp0
# If the ppp pid file is present then the program is running. Stop it.
if [ -r /etc/ppp/$LOCKDEV.pid ] ; then
kill -INT `cat /etc/ppp/$LOCKDEV.pid`
# If unsuccessful, ensure that the pid file is removed.
if [ ! "$?" = "0" ] ; then
echo "removing stale /etc/ppp/$LOCKDEV.pid file."
rm -f /etc/ppp/$LOCKDEV.pid
exit 1
fi
# Success. Terminate with proper status.
echo "ppp link $LOCKDEV terminated"
exit 0
fi
echo "ppp link $LOCKDEV is not active"
exit 1



File etc/ppp/peers/myisp:


cua1 # modem is connected to /dev/cua1 (cua0 may be a serial mouse)
115200 # bits per second (use 38400 or 57600 if this doesn't work)
lock # Use a UUCP-style lock to ensure exclusive access
crtscts # use hardware flow control
noauth # don't require the ISP to authenticate itself
modem # modem control line
passive # wait for LCP packets
connect '/usr/local/bin/chat -v -f /etc/ppp/peers/chat-myisp'
noipdefault # remote PPP server must supply your IP address.
# Remove if the remote host doesn't send your IP during
# IPCP negotiation and uncomment the next:
#204.94.88.94: # our ip address:gateway address (both are optional)
defaultroute # use the ISP as our default route




File etc/ppp/peers/chat-myisp:


ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
ABORT "Username/Password Incorrect"
"" "ATZ"
OK "ATDT555-2871"
CONNECT ""
"ogin:" "^Updan"
"ssword:" "\qaardvark"



The last two files require the most modification.
Make sure to remove read permission ("chmod go-r chat-*")
from chat-myisp, as it has your login and password information.


Messages go to /var/adm/messages. A good PPP session should look
something like this:


Oct 24 22:47:49 dan.cts.com pppd[1439]: Connect: ppp0 <--> /dev/cua1
Oct 24 22:47:50 dan.cts.com pppd[1439]: local IP address 204.94.88.94
Oct 24 22:47:50 dan.cts.com pppd[1439]: remote IP address 205.163.84.83
Oct 24 23:08:52 dan.cts.com pppd[1439]: Connection terminated.


Your "netstat -rn" output should have lines that look similar to this:


Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
209.68.192.32 204.94.88.94 UH 1 1 ppp0
default 209.68.192.32 UG 1 1



Your "ifconfig ppp0" output should look similar to this:


ppp0: flags=10008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4> mtu 1500 index 15
inet 204.94.88.94 --> 209.68.192.32 netmask ffffff00



For debugging pppd, I add the -d option to pppd (in ppp-on), add
this line in /etc/syslog.conf,
and restart syslogd (fields are tab-separated):



daemon.* /var/adm/pppd.log


Then, you get the chat script dialog captured to help isolate the problem.
Print out and read the docs mentioned above if you have problems.


Once the PPP link is working, you can enable DNS hostnames as follows:
First, Modify this line in /etc/nsswitch.conf to something like:



hosts: files dns


Second, add lines similar to this in /etc/resolv.conf:



domain PutYourISPDomainNameHere.com
nameserver 192.188.72.18
nameserver 192.188.72.21



For more information,
See "man pppd"
and "man chat" and the FAQ and SETUP files provided with pppd.
A helpful step-by-step guide is the Linux PPP HOWTO at
http://www.linuxdoc.org/
The configuration file information is the same for Solaris, except change
tty references from

/dev/ttyS0 - ttyS4
to
/dev/cua0 - cua4
.






Home
FAQ