Previous Table of Contents Next


Print Server Setup

After you set up a local printer, you need to perform the following tasks to set up a Solaris 2.x system (with its printer) to act as a print server:

  Configure the port monitor.
  Register the network listen service.
  Identify the print clients.

Before you set up a system as a print server, you should first add and configure a local printer. See “Local PostScript Printer Setup” for instructions. The system also should be connected to a network.

You need the following information:

  The superuser password for the print server system.
  The name of the printer.
  The name of the print server.
  The names of the systems that will be print clients.

Adding the listen Service

For print clients to access a print server running Solaris 2.x system software, you must configure the listen port monitor on the print server to accept service requests and to notify the LP print service of such requests. In addition, you must configure the listen port monitor on each Solaris 2.x print client.

Follow these steps to add the listen port monitor:

1.  If you haven’t done so already, set up the local printer.
2.  Become superuser on the server system.
3.  Type sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v `nlsadmin -V` -n 9999 and press Return. The -a option adds the port specified by the -p option. The -t option identifies the type of service. The -c option specifies which command starts the port monitor, the -v option specifies the version of the network listen process, and the -n option specifies the number of times SAC will restart the process if it dies. The listen port monitor is configured.
4.  Type sacadm -l and press Return. When the network listen service is started and enabled, the following information appears on-screen:
# sacadm -l
PMTAG      PMTYPE  FLGS RCNT STATUS        COMMAND
tcp   listen - 9999 ENABLED  /usr/lib/saf/listen tcp #


NOTE:  It may take several minutes for the network listen service to become enabled.

Creating the listen Services

The LP print service uses a connection-oriented protocol to establish connections for incoming requests from remote systems. When the port monitor is configured, you register the following listen services:

  Service 0
  listenS5
  listenBSD

These services “listen” for print requests from print clients, or confirmations from the server. When the service detects a communication, it hands the process over to the lpsched daemon.

You use the universal address, or a modified version of it, to set up the listen port monitors. The first four digits identify the Internet family. The fifth through eighth digits identify the TCP port. (For the modified version, replace port number 0203 with 0ACE. The first digit is a zero.) To display the universal address, type lpsystem -A and press Return. The system's universal address appears, as shown in the following example:

# lpsystem -A
ØØØ2Ø2Ø3819418ØeØØØØØØØØØØØØØØØØ
#

Table 11-8 lists the variable input to the pmadm command used to configure the three listen port monitors.

Table 11-8 Variable Input to the pmadm Command Options

type Value nlscmd Value
lp nlsadmin -o /var/spool/lp/fifos/listenS5
lpd nlsadmin -o /var/spool/lp/fifos/listenBSD -A 'xaddress'
0 nlsadmin -c /usr/lib/saf/nlps_server -A 'xmodified_address'


NOTE:  Type x at the beginning of the universal (or modified universal) address exactly as shown. In addition, the address must be enclosed in single quotation marks so that the backslash is not stripped off.

The following steps describe how to create the three listen port monitors:

1.  Type pmadm -a -p tcp -s type -i root -m `nlscmd` -v `nlsadmin -V` and press Return. Repeat this step for each of the three service types. The listen port monitor is configured to listen to requests from the LP print service for both Solaris 2.x and SunOS 4.x print clients.
2.  Type cat /var/saf/tcp/log and press Return. Examine the messages to make sure that the services are enabled and initialized.

The following example registers all three network listen services for the print server pine:

# lpsystem -A
ØØØ2Ø2Ø3819418ØeØØØØØØØØØØØØØØØØ
# pmadm -a -p tcp -s lp -i root -m `nlsadmin -o
 /var/spool/lp/fifos/listenS5`
-v `nlsadmin -V`
# pmadm -a -p tcp -s lpd -i root -m `nlsadmin -o
 /var/spool/lp/fifos/listenBSD
-A 'xØØØ2Ø2Ø3819418ØeØØØØØØØØØØØØØØØØ'` -v `nlsadmin -V`
# pmadm -a -p tcp -s Ø -i root -m `nlsadmin -c/usr/lib/saf/nlps server -A
'xØØØ2ØACE819418ØeØØØØØØØØØØØØØØØØ'` -v `nlsadmin -V`
pine# cat /var/saf/tcp/log
1Ø/28/91 1Ø:22:51; 178; @(#)listen:listen.c    1.19.9.1
1Ø/28/91 1Ø:22:51; 178; Listener port monitor tag: tcp
1Ø/28/91 1Ø:22:51; 178; Starting state: ENABLED
1Ø/28/91 1Ø:22:51; 178; Service Ø: fd 6 addr
 xØØØ2ØACE819418ØeØØØØØØØ000000000
1Ø/28/91 1Ø:22:51; 178; Service lpd: fd 7 addr
 xØØØ2Ø2Ø3819418ØeØØØØØØØ000000000
1Ø/28/91 1Ø:22:52; 178; Net opened, 2 addresses bound, 56 fds free
1Ø/28/91 1Ø:22:52; 178; Initialization Complete
#


Previous Table of Contents Next