home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.unix
- From: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz)
- Subject: v25i126: Indianapolis Standard Printer Interface for Networked printers, Part15/15
- Sender: sources-moderator@pa.dec.com
- Approved: vixie@pa.dec.com
-
- Submitted-By: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz)
- Posting-Number: Volume 25, Issue 126
- Archive-Name: ispin/part15
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 15 (of 15)."
- # Contents: ISPIN/misc/PC-LANtoISPIN/README
- # ISPIN/misc/PC-LANtoISPIN/lpr~lpd_ISPIN
- # Wrapped by socrates@indy6 on Tue Jan 28 15:27:23 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'ISPIN/misc/PC-LANtoISPIN/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ISPIN/misc/PC-LANtoISPIN/README'\"
- else
- echo shar: Extracting \"'ISPIN/misc/PC-LANtoISPIN/README'\" \(7134 characters\)
- sed "s/^X//" >'ISPIN/misc/PC-LANtoISPIN/README' <<'END_OF_FILE'
- X11/21/91
- X
- XAll the articles in the various PC and networking magazines on the topic
- Xof "Network Printing" are enough to make me gag myself with a printer ribbon.
- X
- XThey aren't talking about networked printers at all! They're talking hard-
- Xwired printers on networked systems. That's baby stuff.
- X
- XWith ISPIN, we have printers ON THE NETWORK. If you're this deep into the
- Xapplication, you already know how we do it.
- X
- XThis document outlines our recent (like last week) successful efforts to
- Xissue print jobs from MS-DOS PC clients of a Novell server to a UNIX box
- Xon the same LAN which (among other things) is acting as an ISPIN server.
- X
- XWe've been doing network printing from UNIX boxes, through X.25 apads and
- Xlocal switches, to printers for about three years. A 10BASE-T ethernet,
- XNovell server, and MS-DOS client PCs were recently introduced to our local
- Xenvironment.
- X
- XRight away, the Novellers (ex MS-DOSers) started talking about how expensive
- Xand difficult it is to do network printing. The PC and network mags said
- Xpretty much the same.
- X
- XHey, bud. I got yer network printing right here.
- X
- XAs with all things UNIX, there are/will be many possible ways to do this
- X(see OTHER WAYS TO SKIN THE CAT).
- X
- XHere's our setup:
- X
- X Hardware:
- X * X.25 network with asynchronous pads
- X - all of our printers, dumb ascii terminals,
- X and UNIX cpu serial i/o ttys are connected
- X - provides RS-232C serial i/o connectivity
- X - we use it for both local and wide area
- X (nationwide) connectivity
- X - on a smaller or local scale, a "smart switch"
- X or stat mux (like Tellabs, Equinox, Mitron,
- X David, etc) can do the same thing
- X
- X * 10BASE-T Ethernet, cards, transceivers, concentrator
- X - connects MS-DOS PCs, Novell server, UNIX box
- X
- X Software:
- X * UNIX
- X - of course
- X - some particular features of this UNIX:
- X * support Sys V lp/lpsched - for ISPIN
- X * support TCP/IP - for LAN communications
- X * support BSD lpr/lpd
- X * In our case, it's a Sequent, running a
- X dual universe ucb/att environment. Pyramid
- X does this too. Others?
- X * see "OTHER WAYS..."
- X
- X * ISPIN - to run on the UNIX box
- X
- X * packet driver software - This is a software
- X frontend for the ethernet card on the MS-DOS
- X PC. Our Cabletron cards came with a very effective
- X packet driver. If yours didn't, the Clarkson
- X drivers would fit here. The packet driver allows
- X the PC to talk to the UNIX box via TCP/IP while
- X also allowing the PC to talk IPX/SPX to Novell.
- X
- X * lpr client software for the PC - We're using
- X an application called "LPR, LPQ, LPRM Network
- X Printing Utilities (for MS-DOS Computers)" by
- X Paul Hilchey, University of British Colombia. We
- X got it as part of Clarkson University's CUTCP
- X suite.
- X
- XHOW WE DID IT
- X
- XISPIN on the Sequent has been cranking for years. The PC/Novell/Ethernet thing
- Xwas set up recently. Then we:
- X
- X 1. Hooked up the Sequent to the Ethernet and did the
- X necessary BSD networking configuration stuff.
- X
- X 2. Cranked up the Sequent's lpd subsystem. We had
- X previously used only the Sys V side's lp/lpsched.
- X
- X 3. Configured lpr queue members which pass their work
- X to corresponding Sys V lp queue members. See the file
- X "lpr~lpd_ISPIN", a document by John Withers (IRS,
- X Springfield District Office) which describes this
- X procedure.
- X
- X 4. Installed the client LPR software on the PC(s).
- X Some config work here - not bad - good documentation.
- X We'll probably put the executable on the Novell
- X server so the diskless people can use it too.
- X
- X 5. Started printing. The PC users who are on the LAN
- X can print anything which resides on their own box
- X or on the Novell to any networked printer on the
- X X.25.
- X
- X LAN users, LAN files, WAN printing.
- X
- XHOW IT WORKS
- X
- X 1. The BSD lpd is a network server daemon and a
- X local print request server daemon. On the network
- X side, it's waiting for print requests and data
- X to come in over the LAN.
- X
- X 2. The lpr client program on the PC establishes a
- X TCP/IP connection with the UNIX's lpd, then sends
- X the request and the data.
- X
- X 3. John's lpr/lpd-to-lp/lpsched interface hands off
- X the job to the Sys V scheduler, which ultimately
- X calls ISPIN.
- X
- X
- XOTHER WAYS TO SKIN THE CAT
- X
- X There are just a few components of this scenario which are absolutely
- X required to make it work.
- X
- X REQUIREMENTS:
- X 1. UNIX
- X 2. Sys V lp/lpsched subsystem
- X - ISPIN doesn't do BSD lpr/lpd - yet
- X 3. ISPIN
- X
- X ALTERNATIVES:
- X 1. As previously mentioned, if you don't have X.25
- X apads for cpu to printer virtual connections,
- X smart switches or stat muxes will work. ISPIN
- X is so flexible you could even do it with dialup
- X modems (feasible, but not recommended).
- X
- X 2. The only reason we have the BSD lpr/lpd subsystem
- X involved is because it supports the networked
- X client/server model and the software is available.
- X
- X If you don't have a dual universe UNIX (ucb/att),
- X finding both lp/lpsched and lpr/lpd on the same
- X system would be rare.
- X
- X A network client/server pair could be cooked-up
- X to support Sys V lp/lpsched directly, thus avoiding
- X the extra step of passing through BSD lpr/lpd.
- X I haven't seen a UNIX System V Release 4 box yet,
- X but I have heard that this is a supported feature.
- X
- XMore later,
- XLSB
- END_OF_FILE
- if test 7134 -ne `wc -c <'ISPIN/misc/PC-LANtoISPIN/README'`; then
- echo shar: \"'ISPIN/misc/PC-LANtoISPIN/README'\" unpacked with wrong size!
- fi
- # end of 'ISPIN/misc/PC-LANtoISPIN/README'
- fi
- if test -f 'ISPIN/misc/PC-LANtoISPIN/lpr~lpd_ISPIN' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ISPIN/misc/PC-LANtoISPIN/lpr~lpd_ISPIN'\"
- else
- echo shar: Extracting \"'ISPIN/misc/PC-LANtoISPIN/lpr~lpd_ISPIN'\" \(4195 characters\)
- sed "s/^X//" >'ISPIN/misc/PC-LANtoISPIN/lpr~lpd_ISPIN' <<'END_OF_FILE'
- XTHIS PROCEDURE WAS DEVELOPED & DOCUMENTED BY JOHN WITHERS, SYSTEMS ADMINISTRATOR
- XAT INTERNAL REVENUE SERVICE, SPRINGFIELD DISTRICT OFFICE
- X
- XDate: Thu Jan 10 08:51 CST 1991
- XFrom: pharaoh!withers (withers)
- XMessage-Id: <101240010132614EMU0000@pharaoh>
- XTo: lbartz@ispin
- XSubject: Revised 'How To' document!
- X
- XThis reflects my 'reflections' and our discussion:
- X
- XUsing ISPIN in the UCB universe (Pyramid, Sequent, et. al)
- X(Requires no modification to ISPIN)
- X
- XThis 'hack' evolved from our use of the UCB line printer spooler (lpr/lpd)
- Xon our Pyramid MIServer4/1 instead of the ATT line printer spooler
- X(lp/lpsched). We had implemented lpr/lpd in all of our applications and
- Xdidn't really want to change just to run ISPIN.
- X
- XGeneral procedure.
- X
- XIn the ATT universe:
- X
- X1) Compile and install ISPIN.
- X2) Configure the ATT line printer spooler for network printers as
- X described in the ISPIN documentation. TEST ISPIN directly from
- X the ATT universe to make sure your rtab entries are good. (This
- X one bit me BIG-TIME!)
- X
- X Just one word of warning. NEVER EVER define the same
- X serial port as output for both lpsched and lpd. Why?
- X LPSCHED opens his output devices and holds them open
- X (non-exclusive) set as it thinks appropriate. LPD
- X opens the device each time it wants to print to it and
- X assumes that it is in some sort of 'virgin' state before
- X it sets it up. The net result is that LPD output to the
- X shared device is garbled and un readable. I did this
- X when I was testing my basic configuration of 'lpsched'
- X when ISPIN didn't work the way I expected and it took
- X a lot of head scratching to figure out what happened.
- X
- XIn the UCB universe:
- X
- X1) In a convenient directory (I used /usr/local/lib/filters) create
- X a shell script like the following (I called it FILTER):
- X
- X#!/bin/att /bin/sh
- X#
- X# This shell script acts as a 'universe bridge' to collect information
- X# from the UCB/LPR print spooler and pass it the ATT/LP print spooler
- X# so it can be processed by ISPIN (Thanks Larry)
- X#
- X
- XQUE=`basename $0`
- XNOW=`date "+%T %D"`
- Xecho "$NOW - Printer $QUE requested" >> /usr/local/lib/filters/filter.log
- Xexec lp -d$QUE -
- X
- X2) Link this file (FILTER) to a file with the same name as the ISPIN
- X controlled Queue under control of lpsched. (IMPORTANT!)
- X
- X For example, if you created a queue called 'spr_iss', use the
- X command 'ln FILTER spr_iss' to create the filter for the lpd.
- X
- X3) Edit /etc/printcap to define the new print spool for lpd.
- X This is how I did it for the que 'spr_iss' mentioned above:
- X
- X#
- X# Definition of remote printers via the 'bridge' filter to ISPIN
- X#
- Xspr_iss|ISS printer #1 (Shared Centronics):\
- X :tr=\f:lf=/usr/adm/lpd-errs:pl=66:pw=255:\
- X :of=/usr/local/lib/filters/spr_iss:\
- X :sd=/usr/spool/lpd/remote:\
- X :lo=remoteLOCK:\
- X :lp=/dev/null:
- X
- X Notes: a) I used the same sd (spool directory) for all of the ISPIN queues.
- X This simplifies life a lot, otherwise you would have to have
- X a directory for each queue on both the UCB and ATT sides.
- X Besides, as far as I can tell, files 'cross the bridge' very
- X rapidly and the chances of them stacking up on the UCB side
- X is quite slim, if everything is working. (RECOMENDATION)
- X/* editorial comment:
- X I disagree with John on this. I believe each queue
- X member should have its own spool directory. This
- X would prevent confusion of sequence numbers, data
- X files, and control files.
- X
- X LSB
- X*/
- X b) I used the same lo (lock file) for all the ISPIN queues.
- X This controls the number of files which can cross at the same
- X time. It should be fast enough, one a time. (RECOMENDATION)
- X c) Set of (output filter) to the full path of the script you created
- X in step two (2) above. (REQUIRED)
- X d) The lp (line printer) entry should always point to /dev/null.
- X For a more complete explanation, see the ISPIN documentation,
- X the reasoning is the same. (REQUIRED)
- X e) I kept the queue names the same on both sides of the bridge, but
- X you don't need to. The only requirement is that the output
- X filter name be the same as the ATT queue name. (RECOMENDATION)
- X
- END_OF_FILE
- if test 4195 -ne `wc -c <'ISPIN/misc/PC-LANtoISPIN/lpr~lpd_ISPIN'`; then
- echo shar: \"'ISPIN/misc/PC-LANtoISPIN/lpr~lpd_ISPIN'\" unpacked with wrong size!
- fi
- # end of 'ISPIN/misc/PC-LANtoISPIN/lpr~lpd_ISPIN'
- fi
- echo shar: End of archive 15 \(of 15\).
- cp /dev/null ark15isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 15 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
-