Date: Wed, 30 Jun 93 13:50:33 EST
From: dave@eram.esi.com.au (Dave Horsfall)
To: dplist@acn.purdue.edu
Subject: DP intallation guide

Here is a guide I whipped up when I got frustrated by the installation
instructions.  I'm not knocking it, but it was obviously written by
someone too familiar with the procedure :-)

I'd appreciate any feedback...

-- Dave

-----

		Installing Dialup PPP 2.3 (DP)
		------------------------------

These notes are to be used in conjunction with the "official"
installation notes; they provide additional information not already
covered (or not made clear).

DP-related information:
	Use loadable modules; they are far more convenient.  This
	releases uses a different directory structure from the previous
	one, and can be customised; I have used a different layout from
	that supplied, so consult /etc/dp.conf.  WARNING: do NOT
	attempt to unload the modules, once loaded!  This leaves
	dangling references which will crash the system.

	Various changes need to be made to system files:

	/etc/passwd:
	/etc/group:
		Add user names of the form "Plogin", in group "ppp",
		and invoking "dplogin" as the login shell.  The "P" is
		just a convention to indicate a PPP login.  Be careful
		to update the NIS master (Yellow Pages) if using it.

	/etc/rc.local:
		Provision needs to be made to "ifconfig" the dp ports,
		load the modules and start the daemon.  Also, GATED must
		be run instead of ROUTED; an example follows.

		(Comes after start of key server)
		#
		# Load the dialup PPP modules.
		#
		if [ -f /etc/dp.conf ]; then
			. /etc/dp.conf
			if [ -f $DPMODULE_DIR/startdp ]; then
				echo "Loading DP modules:"
				$DPMODULE_DIR/startdp
				modstat
			fi
		fi
		...
		(After 1st ifconfig -a)
		#
		# Start PPP dialup daemon.
		#
		if [ -f /etc/dp.start ]; then
			echo "Starting Dialup PPP daemon"
			/etc/dp.start
		fi
		...
		if [ -f /usr/local/etc/gated -a -f /etc/gated.conf ]; then
			gated;          echo 'running gateway daemon.'
		elif [ -f /usr/etc/in.routed ]; then
			in.routed;      echo 'running routing daemon.'
		fi

	/etc/hosts:
	/etc/networks:
		Update in the usual way.  Note that despite what it
		says in the documentation, an entire network does NOT
		have to be assigned to each "wire" - just use the local
		Ethernet address for the source, and whatever is
		required on the destination.  Note that netmasks do not
		appear to apply to serial connections.

	Misc:
		Be sure to set up the various DP configuration files
		correctly, otherwise you will get some mysterious
		failures.  The general setup directory is $DP_DIR; this
		contains per-site configuration and the binaries etc;
		and another directory is $DPCONF_DIR.  Files to pay
		attention to are:

		$DP_DIR/access:
			This directory contains the files that control
			access to particular systems.  For example, the
			timeouts or the blocked protocols could vary
			from system to system.  These files are named
			in the "conf" file (see later).

		$DP_DIR/aux:
			An auxiliary program can be run, following a
			connect.  For now, the only one is `ckmailq'
			which checks for any delayed mail and invokes
			sendmail.

		$DP_DIR/bin:
			The daemons and PPP login shell are here, along
			with some utilities.

		$DP_DIR/cron:
			Various house-keeping scripts live here, such
			as summarising the logs on a daily and weekly
			basis.  Make sure CRON has been told.

		$DP_DIR/modem:
			Scripts and programs to initialise the modems
			for PPP are here; I have not used them, as I
			prefer to do them by hand.

		$DP_DIR/modules:
			Herein lie the loadable modules and the scripts
			for handling same.

		$DP_DIR/script:
			These are the send-expect scripts for talking
			first to the modem, then the remote login.
			They may need to be customised for recognising
			"CONNECT FAST" from an original Trailblazer.

GATED:
	Since we don't want our dial-out lines to be triggered by
	ROUTED sending RIP packets every 30 seconds, we must use GATED
	instead (or hard-wire the routes by hand and not use ROUTED at
	all).  Here is a sample /etc/gated.conf file:

	#
	# /etc/gated.conf - GATED configuration file for eram.esi.com.au.
	#
	# We don't want RIP packets triggering the dial-out lines.
	#

	#
	Tracing, until I'm sure it works.
	#
	#tracefile	"/var/tmp/gated.trace" ;
	#traceoptions	general kernel ;
	#traceoptions	config rip update ;
	#traceoptions	all ;

	#
	# START OF DEFINITION STATEMENTS.
	#
	interface	all passive ;	# Don't time out my interfaces.

	#
	# START OF PROTOCOL STATEMENTS.
	#
	rip supplier {
	  interface dp0 noripin noripout ;	# Don't let RIP trigger a call.
	} ;
	hello		off ;
	egp		off ;
	bgp		off ;

	#
	# START OF STATIC STATEMENTS.
	#
	static {
	  their-host.domain.au	gateway our-host.domain.au ;
	  their-net		gateway	their-host.domain.au ;
	} ;

	#
	# START OF CONTROL STATEMENTS.
	#
	accept proto rip {		# Trust machines under our control.
	  listen	their-net;
	} ;
	propagate proto rip {		# And tell likewise ...
	  proto rip {			# ... to these gateways only.
	    announce their-net;
	  } ;
	} ;

	#
	# End of /etc/gated.conf
	#

RWHOD:
	This sprays out packets every minute or so; it must be disabled
	(or a modified copy run).

MODEM:
	If at all possible, lock the interface speed to 38400 with
	RTSCTS handshaking, for maximum performance.  Also, run the
	GETTY at 38400 as well.  It may also be necessary, with the
	Trailblazer modems, to emit the PEP tones last (they can
	confuse some V.32 modems calling in).

	Here is a sample setup for a WorldBlazer:

	at&v
	WorldBlazer - SA - Version LA7.02 - Active Configuration
	 B0  E1  L2  M1  Q2  T   V1  X1  Y0
	&C1 &D3 &G0 &J0 &L0 &Q0 &R3 &S0 &T4 &X0
	S000:1   S001=0   S002=43  S003=13  S004=10  S005=8   S006=2   S007=60
	S008=2   S009=6   S010=14  S011=70  S012=50  S018=0   S025=5   S026=1
	S038=0   S041=0   S045=0   S046=0   S047=4   S048=0   S050=0   S051:6
	S056=17  S057=19  S058:2   S059=0   S060=0   S061=1   S062=15  S063=0
	S064=0   S068=255 S069=0   S090=0   S092:1   S093=8   S094=1   S100=0
	S104=0   S105=1   S111=255 S112=1   S113=126 S114=0   S115=0   S151=4
	S155=0   S180=2   S181=1   S183=25  S190=1   S191=7   S253=10  S254=255
	S255=255

OTHER:
	It may be necessary to set various parameters on the PPP
	protocol, such as limiting the MTU (Maximum Transmission Unit)
	to 256 to get better interactive response during a file
	transfer, and setting the bit-mask to escape certain control
	characters such as ^S etc.  Another "gotcha" is the existence
	of older PPP implementations that do not recognise the extended
	VJ compression option etc; these are easily dealt with by
	explicitly stating the version to use (or disabling it
	altogether).

	Finally, beware of older SUN IPC boards (and perhaps others):
	they can generate interrupts at an astonishing rate.  The
	reason is not clear, but seems to depend on how the cable is
	terminated, or the voltage level delivered by the modem.
	Apparently it has to do with cross-talk from a data line to a
	clock line; a fix is to ground the clock line if not used.

REFS:
	USENET newsgroup "comp.protocols.ppp", including the FAQ list.

	Internet mailing list "dplist@acn.purdue.edu" for dial-up stuff
	(e-mail to dplist-request to join).

Dave Horsfall - dave@esi.com.au

