Here is a simple How-to to connect a Sun Solaris 2.4 Asynchronous PPP (bundled into the OS) with a leased line connection.
These are the files you need to edit:
Also, if you can, get hold of the following from SunSoft:
TCP/IP Network Administration Guide (250 pages)
Part No: 801-6632-10
SunSoft,
2550 Garcia Avenue,
Mountain View,
CA 94043, USA.
+1-415-960-1300, fax: +1-415-969-9131
My setup:
____ ===internal LAN===||===| | M | 9600 leased line || |___|====================(remote-end)==>Internet ||le0 || ipdptp0 -||-----------||---- | Sun IPC | | with Solaris 2.4 | --------------------
The IP numbers (fictitious here, use real ones for your config) are as follows:
le0: 1.2.3.4
ipdptp0: 5.6.7.2
remote-end: 5.6.7.1
Modem (M above) is a Racal 14.4 modem but strapped to run at 9600.
Here are the contents of the 6 files mentioned above:
a) /etc/uucp/Devices
#----------------------------------------------------------- remote-end term/b,M - Any direct ACU term/b,M - Any direct #-----------------------------------------------------------
Note: the 2nd serial port is being used here. If you are using the
first serial port, change "term/b" to "term/a" above.
b) /etc/uucp/Systems
#----------------------------------------------------------- remote-end Any ACU 9600 remote-end "" #-----------------------------------------------------------
Note: There is no send-expect string at the end. It is always up
and no login is needed.
c) /etc/asppp.cf
#----------------------------------------------------------- # ifconfig ipdptp0 plumb 5.6.7.2 5.6.7.1 netmask 255.255.255.252 up # path inactivity_timeout 0 # Don't timeout at all interface ipdptp0 peer_system_name remote-end # The name we log in with # (also in /etc/uucp/Systems) peer_ip_address remote-end debug_level 3 # upto 9. Output in /var/adm/log/asppp.log default_route ipcp_async_map 0x000a0000 # ipcp_async_map 0xFFFFFFFF # asynch map default if not specified # ipcp_compress vj # specifies VJ compression on (default) # ipcp_compress off # lcp_compression on # specifies whether PPP address, control and # lcp_compression off # protocol field compression is enabled. def=on lcp_mru 1500 # max receive unit packet size, in octets # 1500 being the default #-----------------------------------------------------------
Note: Change the netmask number above to whatever your internet
access provider suggests.
d) /etc/hosts
#----------------------------------------------------------- # Internet host table # 127.0.0.1 localhost 1.2.3.4 gateway gateway.mydomain.com mailhost mydomain.com 5.6.7.2 gateway.mydomain.com gateway loghost 5.6.7.1 remote-end remote-end.internetaccessprovider.net #-----------------------------------------------------------
e) /etc/init.d/asppp (Should have been provided by Sun)
#-----------------------------------------------------------
#!/bin/sh
#
#ident "@(#)asppp 1.14 94/02/01 SMI"
#
# Copyright (c) 1993 by Sun Microsystems, Inc.
#
# Asynchronous PPP start/stop script
#
PATH=/sbin:/usr/bin:/usr/sbin
export PATH
REQ_FILES="/usr/sbin/aspppd \
/usr/sbin/aspppls"
mode=$1
set `id`
if [ $1 != "uid=0(root)" ]; then
echo "$0: this script must be run as root ... fatal error"
exit 1
fi
for FILE in $REQ_FILES; do
if [ ! -f $FILE ]; then
echo "$0: Asynchronous PPP has been installed but"
echo "not configured correctly"
echo "$0: $FILE not found"
echo "$0: please refer to the PPP documentation"
exit 1
fi
done
case "$mode" in
'start')
# Start aspppd
if test -f /etc/asppp.cf
then
# execute the ifconfig lines.
nawk '/^[ \t]*ifconfig/ { system($0) }' < /etc/asppp.cf
/usr/sbin/aspppd -d 3
if [ $? -ne 0 ]; then
echo "aspppd not started, see /var/adm/log/asppp.log"
fi
fi
;;
'stop')
# Stop aspppd
id=`ps -e | grep aspppd | awk '{print $1}'`
if test -n "$id"
then
kill $id
fi
if test -f /etc/asppp.cf
then
# use ifconfig to make the interfaces down just in case
nawk '/^[ \t]*ifconfig/ { system("ifconfig " $2 " down")
}' < /etc/asppp.cf
fi
;;
*) # usage
echo "usage: $0 start|stop"
exit 1
;;
esac
#-----------------------------------------------------------
f) /etc/defaultrouter
#----------------------------------------------------------- 5.6.7.1 #-----------------------------------------------------------
Observations on the operation of the connection:
First, all the logging of the PPP activity is in /var/adm/log/asppp.log. It is a very useful log file and the amount of info logged is controlled by the debug_level parameter in /etc/asppp.cf file. The most amount of info (down to the packet itself) is level 9.
I experienced some problems with the link. It turned out to be a problem with the leased line itself. This problem manifests in the following manner:
a) The line drops and the asynchronous PPP link terminates.
b) The log file says that "Error 62" occurred and that the "timer expired".
There is no clue anywhere as to why the "timer expired" and no idea what "Error 62" is.
The problem was solved when it was determined that the transmit and receive levels of the leased lines were too low. By upping the signal level (in my case to about 300mV AC), the link was stablized. The problems occurred when the signal level was half of what it was to have been. The other end of the leased line is about 30-40 km away.
The aspppd is started when the system is booted up, and since my setup says that the timeout is 0 seconds, it will stay up all the time.
I hope someone will find this information useful, and if you do, send me some e-mail won't you?
Enjoy.