Peripherals Administration
  Procure somente este livro
Fazer download desta apostila em PDF

Terminals and Modems

1

Terminals and modems provide both local and remote access to system and network resources. Maintaining this access with Serial Port Manager, an Administration Tool application, is an important, if infrequent, responsibility of a system administrator.
Use the following table to find specific information on setting up terminals and modems.
About Terminalspage 2
About Modemspage 2
About Portspage 3
About Servicespage 3
About Serial Port Managerpage 5
How to Add Terminalspage 11
How to Add Modemspage 14
How to Initialize Ports Without Configuringpage 20
How to Disable Portspage 23
How to Remove Port Servicespage 24
Troubleshooting Tips for Terminals and Modemspage 25

About Terminals, Modems, Ports, and Services

This section explains some of the concepts behind modem and terminal management in the Solaris 2.x environment.

About Terminals

A terminal consists of an input device, most often a keyboard, and a display device, usually a cathode ray tube (CRT) screen. Often, however, the word "terminal" is used as a shorthand for alphanumeric terminal--a serial port device capable of displaying letters, numbers, and other characters such as those produced by a typewriter. The DEC VT-100(TM) model, for instance, is a popular type of alphanumeric terminal and is often emulated by many other terminals.

Note - Your system's bit-mapped graphics display is not the same as an alphanumeric terminal, which connects to a serial port and displays only text. You don't have to perform any special steps to administer the graphics display.

About Modems

A modem is a type of device known as data communication equipment. It translates, or modulates, digital information into an analog signal that can be transmitted via phone lines.
Modems can be set up in three basic configurations:
  • Dial-out
  • Dial-in
  • Bidirectional
A modem connected to your home computer might be set up to provide dial-out service, meaning you can access other computers from your own home, but nobody outside can gain access to your machine.
Dial-in service is just the converse. It allows people to access a system from remote sites, but it does not permit calls to the outside world.
Bidirectional access, as the name implies, incorporates both dial-in and dial-out capabilities.

About Ports

A port is a channel through which a device communicates with the operating system. The most concrete way to think of a port is as a "receptacle" into which a terminal or modem cable may be plugged.
However, a port is not strictly a physical receptacle, but an entity having both hardware (pins and connectors) and software (a device driver) components. A single physical receptacle often provides multiple ports, allowing connection of two or more devices.
Common types of ports include serial, parallel, small computer systems interface (SCSI), and Ethernet.

About Serial Ports

A serial port, using a standard communications protocol, transmits a byte of information bit-by-bit over a single line.
Devices that have been designed according to RS-232-C or RS-423 standards (this includes most modems, alphanumeric terminals, plotters, and some printers) can be plugged interchangeably (using standard cables) into serial ports of computers that have been similarly designed.
Serial Port Adapter Board When many serial port devices must be connected to a single computer, it may be necessary to add an adapter board to the system. The adapter board, with its driver software, provides additional serial ports for connecting more devices than could otherwise be accommodated.

About Services

Modems and terminals gain access to computing resources via the serial port software. The serial port software must be set up to provide a particular "service" for the device attached to the port. For example, you can configure a serial port to provide bidirectional service for a modem.

Port Monitors

The main mechanism for gaining access to a service is through a port monitor. A port monitor is a program that continuously watches out for requests to log in or access printers or files.
When a port monitor detects a request, it sets whatever parameters are required to establish communication between the operating system and the device requesting service. Then the port monitor transfers control to other processes that provide the services needed.
There are two types of port monitors included with the Solaris 2.x environment:
  • listen port monitor--controls access to network services, fielding remote print and file system requests. A common use of the listen port monitor is to listen for request from the LP printer service. For more information on the listen port monitor, see Appendix A, "The Service Access Facility." The listen port monitor is not used when you set up modems and alphanumeric terminals.
  • ttymon port monitor--provides access to the login services needed by modems and alphanumeric terminals. Serial Port Manager automatically sets up a ttymon port monitor to process login requests from these devices.

Note - You may be familiar with an older port monitor called getty. The new ttymon is more powerful; a single ttymon can replace multiple occurrences of getty. Otherwise, these two programs serve the same function.

About Serial Port Manager and Service Access Facility

When you configure a serial port for use with a modem or terminal, you have a choice between two tools:
  • Serial Port Manager--an Administration Tool application that provides a graphical user interface and the functionality of the Service Access Facility's pmadm command, a port monitor administration tool.
  • Service Access Facility--a collection of background processes and administrative commands used from the command line to configure and administer port services and monitors.
The following table highlights some situations when you may choose to use one tool or the other.
Table 1-1
ProcedureSuggested ToolComment
Set up terminals and modemsSerial Port ManagerSerial Port Manager quickly sets up typical port services for terminals and modems. Serial Port Manager provides most of the functionality of the pmadm command. Exceptions are noted in the following table entries.
Inform users that a port is disabledService Access Facility ttyadm -ittyadmin -i specifies the inactive (disabled) response message. The message is sent to a terminal or modem when a user attempts to log in when the port is disabled. This functionality is not provided when a port is disabled using Serial Port Manager.
Not hanging up a modem when a user logs off a hostService Access Facility ttyadm -httyadm -h specifies that the system will not hang up on a modem before setting or resetting to the default or specified value. If ttyadm -h is not used, when the user logs out of a host, the host will hang up the modem.
Require the user to type a character before the system displays a promptService Access Facility ttyadm -rttyadm -r specifies that ttymon should require the user to type a character or press Return a specified number of times before the "login:" prompt appears. When -r is not specified, pressing Return one or more times will print the prompt anyway. This option prevents a terminal server from issuing a welcome message that the Solaris host might misinterpret to be a user trying to log in. Without the -r option, the host and terminal server might begin looping and printing prompts to each other.

About Serial Port Manager

The Serial Port Manager configures the serial port software to work with terminals and modems by calling the pmadm command with the appropriate information. It features:
  • Templates for common terminal and modem configurations
  • Multiple port setup, modification, or deletion
  • Quick visual status of each port

Serial Port Templates

Serial Port Manager provides templates for the most common terminal and modem configurations that you can then modify for a particular device.
  • Terminal - Hardwired
  • Modem - Dial-in Only
  • Modem - Dial-out Only
  • Modem - Bidirectional
  • Initialize Only - No Connection

Serial Port Manager Security

The system being configured may be your local system or a remote system. Because the Serial Port Manager needs to modify system information, you must have special privileges for that system.
Table 1-2
For a...You Must...
Local system· Run Administration Tool as root, or · Be a member of the UNIX sysadmin group (GID 14) for that system
Remote systemBe a member of the UNIX sysadmin group (GID 14) for that system

Starting Serial Port Manager

Start the Serial Port Manager from the Administration Tool window. If you don't have Administration Tool running, start it by typing:
/usr/bin/admintool &

To start Serial Port Manager, click on the Serial Port Manager icon in the Administration Tool window.

Internal bitmap(486x270)

What Serial Port Manager Looks Like

When Serial Port Manager starts, you will see Serial Port Manager main window listing the ports on the local system. You may specify a remote system and view the ports on it by entering the name of the remote system in the Goto: field.

Imported image(470x251)

What You Can Do With Serial Port Manager

With the Serial Port Manager, you can
  • Initialize a port without configuring the service
  • Add a service
  • Modify a service
  • Disable a service
  • Delete a service
These actions are taken by first selecting one or more ports and then choosing an item from the Edit menu. Detailed steps begin on page 11.
When configuring port information, you choose Modify Service... from the Edit menu to bring up the Modify Service window. This window provides access to the port templates and provides information on the port in three levels of detail--Basic, More, and Expert.

Imported image(503x361)


Note - The Modify Service window will appear in the Basic detail mode. To view More or Expert details, select these from the Detail panel.

The descriptions of each item in the Modify Service window are listed in Table 1-3.
Table 1-3
DetailItemDescription
BasicPortLists the port or ports you selected from Serial Port Manager's main window.
ServiceSpecifies that the service for the specified port is turned on (enabled).
Baud RateSpecifies the line speed used to communicate with the terminal. The line speed represents an entry in /etc/ttydefs.
Terminal typeShows the abbreviation for the type of terminal, for example, ansi or vt100. Similar abbreviations are found in /etc/termcap. This value is set in the environment variable $TERM.
MoreOption: Initialize OnlySpecifies that the port software is initialized but not configured.
Option: BidirectionalSpecifies that the port line is used in both directions.
Option: Software CarrierSpecifies that the software carrier detection feature is used. If the option is not checked, the hardware carrier detection signal is used.
Login PromptShows the prompt displayed to a user after a connection is made.
CommentShows the comment field for the service.
Service TagLists the service tag associated with this port--typically an entry in the /dev/term directory.
Port Monitor TagSpecifies the name of the port monitor to be used for this port. Note: The default monitor is typically correct.
ExpertCreate utmp entrySpecifies that a utmp entry is created in the accounting files upon login.
Note: This item must be checked if a login service is used. See the Service item.
Connect on CarrierSpecifies that a port's associated service is invoked immediately when a connect indication is received.
ServiceShows the program that is run upon connection.
Streams ModulesShows the STREAMS modules that are pushed before the service is invoked.
Timeout (secs)Specifies the number of seconds before a port is closed if the open process on the port succeeds and no input data is received.

Instructions for Setting Up Terminals, Modems, and Ports

· How to Add Terminals

To add terminals to a system, follow these steps.
  1. Select the port or ports that will be used with a terminal.

  2. Choose Modify Service from the Edit menu.

    The Modify Service window appears in the Basic Detail mode. For additional details, select either the More or Expert Detail modes.

  3. Choose Terminal-Hardwired from the Use Template menu.

Imported image(486x345)

The Terminal-Hardwired template provides the following values for the selected port.
Table 1-4
DetailItemDefault Value
BasicPort--
ServiceEnabled
Baud Rate9600
Terminal type--
MoreOption: Initialize Onlyno
Option: Bidirectionalno
Option: Software Carrieryes
Login Promptlogin:
CommentTerminal - Hardwired
Service Tag--
Port Monitor Tagzsmon
ExpertCreate utmp entryyes
Connect on Carrierno
Service/usr/bin/login
Streams Modulesldterm,ttcompat
Timeout (secs)Never
  1. Change values of template entries if desired.

  2. Click on Apply to configure the port.

· Command Line Interface for Adding Terminals
The equivalent commands and steps for adding a terminal, as specified by the Terminal - Hardwired default values, are shown in Table 1-5.
Table 1-5
StepInstructionCommand to Type
1Determine the port monitor version number. In this
example, the version number is 1.
# ttyadm -V
1
2Type the sacadm command.
Substitute the appropriate port monitor tag for pmtag.
Also substitute the correct version number (as obtained
in the previous step) for vers.

# sacadm -a -p pmtag -t ttymon -c
/usr/lib/saf/ttymon -v vers
3Use the pmadm command to add a login service. Substitute for the arguments as appropriate.# pmadm -a -p pmtag -s svctag -i root -fu -v vers -m "'ttyadm -S y -d dev_path -l ttylabel -s /usr/bin/login -m ldterm,ttcompat'"
4Attach all cords and cables and turn on the terminal. See the documentation accompanying the terminal for connection instructions.

· How to Add Modems

To add a modem to a system, follow these steps.
  1. Select the port or ports that will be used with a modem.

  2. Choose Modify Service from the Edit menu.

    The Modify Service window appears in the Basic Detail mode. For additional details, select either the More or Expert Detail modes.

  3. Choose the modem configuration from the Use Template menu that meets or most closely matches your modem service.

    The modem template choices are described here.

Table 1-6
Modem ConfigurationDescription
Modem - Dial-In OnlyUsers may dial in to the modem but cannot dial out.
Modem - Dial-Out OnlyUsers may dial out from the modem but cannot dial in.
Modem - BidirectionalUsers may either dial in or out from the modem.
See Table 1-7 on page 16 for the default values of each template. If a UUCP service will be used to dial in to your modem on a Solaris 2.x system, see "How to Configure a Modem for Use With UUCP" for the rest of the procedure.
  1. Change values of template entries if desired.

  2. Click on Apply to configure the port.

· How to Configure a Modem for Use With UUCP
UUCP sends information to a service using seven bits and even parity. Solaris 2.x modem configurations use eight bits and no parity for internationalization purposes. To set up your modem service to work with UUCP, follow these instructions.
  1. Follow Step 1 through Step 3 in the "How to Add Modems" procedure.

  1. Select the Other item from the Baud Rate menu.

Imported image(455x222)

  1. Enter a baud rate value from the /etc/ttydefs file that provides seven bit, even parity service and click on Apply.

    In this example, the 9600E baud rate was selected. This provides a service with a 9600 baud rate, seven bits, and even parity.

  2. Change values of other template entries if desired.

  3. Click on Apply to configure the port.

Modem Template Default Values

The Modem templates provides the following values for the selected port.
Table 1-7
DetailItemModem - Dial-In OnlyModem - Dial-Out OnlyModem - Bidirectional
BasicPort------
ServiceEnabledEnabledEnabled
Baud Rate960096009600
Terminal type------
MoreOption: Initialize Onlyyesnono
Option: Bidirectionalnonoyes
Option: Software Carriernonono
Login Promptlogin:login:login:
CommentModem - Dial-In OnlyModem - Dial-Out OnlyModem - Bidirectional
Service Tag------
Port Monitor Tagzsmonzsmonzsmon
ExpertCreate utmp entryyesyesyes
Connect on Carriernonono
Service/usr/bin/login/usr/bin/login/usr/sbin/login
Streams Modulesldterm,ttcompatldterm,ttcompatldterm,ttcompat
Timeout (secs)NeverNeverNever
· Command Line Interface for a Dial-In Only Modem
The equivalent commands and steps for adding a dial-in only modem, as specified by the Modem - Dial-In Only default values, are shown here.
Table 1-8
StepInstructionCommand to Type
1Make sure the modem is properly connected and that the modem switches are set to allow dial-in only service. See the documentation accompanying the modem.
2Use the sacadm command to display all the port
monitors. The comment field indicates what port
monitor is associated with each port.
Examine the list of port monitors.
If the port to which you want to attach the modem
already has its own port monitor, skip to step 4.
# sacadm -l -t ttymon
3Create a port monitor for the port to be used with the
modem.
# sacadm -a -p pmtag -t ttymon -c
/usr/lib/saf/ttymon
-v 'ttyadm -V' -y "comment"
4Determine if the port already has a service configured with the pmadm command. If it does not, skip to step 6.# pmadm -l -s svctag
5If the port already has a service configured, delete it.# pmadm -r -p pmtag -s svctag
6Create a new dial-in only port service. Use the port service tag name (listed in the /dev/term directory) for the svctag.# pmadm -a -p pmtag -s svctag -i root -v 'ttyadm -V' -fu -m "'ttyadm -S n -d dev_path -s /usr/bin/login -l ttylabel -m ldterm,ttcompat'" -y "comment "
· Command Line Interface for a Dial-Out Only Modem
The equivalent commands and steps for adding a dial-out only modem, as specified by the Modem - Dial-Out Only default values, are shown here.
Table 1-9
StepInstructionCommand to Type
1Make sure the modem is properly connected and that the modem switches are set to allow dial-out only service. See the documentation accompanying the modem.
2Add the modem to the /etc/uucp/Devices file. The format to use is:ACU cua/svctag - speed type

Use the port service tag name (listed in the /dev/term directory) for the svctag.

# vi /etc/uucp/Devices
3Disable logins.# pmadm -d -p pmtag -s svctag
· Command Line Interface for a Bidirectional Modem
The equivalent commands and steps for adding a bidirectional modem, as specified by the Modem - Bidirectional default values, are shown here.
Table 1-10
StepInstructionCommand to Type
1Make sure the modem is properly connected and that the modem switches are set to allow bidirectional service. See the documentation accompanying the modem.
2Use the sacadm command to display all the port
monitors. The comment field indicates what port
monitor is associated with each port.
Examine the list of port monitors.
If the port to which you want to attach the modem
already has its own port monitor, skip to step 4.
# sacadm -l -t ttymon
3Create a port monitor for the port to be used with the
modem.
# sacadm -a -p pmtag -t ttymon -c
/usr/lib/saf/ttymon
-v 'ttyadm -V' -y "comment"
4Determine if the port already has a service configured with the pmadm command. If it does not, skip to step 6.# pmadm -l -t ttymon
5If the port already has a service configured, delete it.# pmadm -r -p pmtag -s svctag
6Create a new bidirectional port service. Use the port service tag name (listed in the /dev/term directory) for the svctag.# pmadm -a -p pmtag -s svctag -i root -v 'ttyadm -V' -fu -m "'ttyadm -b -S n -d /dev/term/svctag -s /usr/bin/login -l ttylabel -m ldterm,ttcompat'" -y "comment "
7Add the modem to the /etc/uucp/Devices file. The format to use is:

ACU cua/svctag - speed type Use the port service tag name (listed in the /dev/term directory) for the svctag.

# vi /etc/uucp/Devices

· How to Initialize Ports Without Configuring

To initialize ports without configuring for a specific device, follow these steps.
  1. Select the port or ports that you want to initialize.

  2. Choose Modify Service from the Edit menu.

    The Modify Service window appears in the Basic Detail mode. For additional details, select either the More or Expert Detail modes.

  3. Choose Initialize Only - No Connection from the Use Template menu.

Imported image(483x142)

The Initialize Only - No Connection template provides the following values for the selected port.
Table 1-11
DetailItemDefault Value
BasicPort--
ServiceEnabled
Baud Rate9600
Terminal type--
MoreOption: Initialize Onlyyes
Option: Bidirectionalno
Option: Software Carrierno
Login Promptlogin:
CommentInitialize Only - No Connection
Service Tag--
Port Monitor Tagzsmon
ExpertCreate utmp entryyes
Connect on Carrierno
Service/usr/bin/login
Streams Modulesldterm,ttcompat
Timeout (secs)Never
  1. Click on Apply to initialize the port.

· Command Line Interface for Only Initializing a Port
The equivalent command and step for initializing a port without allowing connections, as specified by the Initialize Only - No Connection values, are shown here.
Table 1-12
StepInstructionCommand to Type
1Create and initialize a new port service but allow no connections.# pmadm -a -p pmtag -s svctag -i root -v 'ttyadm -V' -fu -m "'ttyadm -I -d dev_path -s /usr/bin/login -l ttylabel'" -y "comment "

· How to Disable Ports

To disable service on configured ports, follow these steps.
  1. Select the port or ports that you want to disable.

  2. Choose Modify Service from the Edit menu.

  3. Select Disable in the Modify Service window.

Imported image(468x215)

  1. Click on Apply to disable the port.

· Command Line Interface for Disabling Ports
The equivalent commands and steps for disabling a port, as specified by the Service: Disabled item in the Modify Service window, are shown here.
Table 1-13
StepInstructionCommand to Type
1Determine the port monitor tag and the port monitor service tag for the port you want to disable.# pmadm -l
2Disable the port monitor service.# pmadm -d -p pmtag -s svctag

· How to Remove Port Services

To delete services on configured ports, follow these steps.
  1. Select the port or ports that has a service you want to delete.

  2. Choose Delete Service from the Edit menu.

Imported image(468x150)

You are asked if you really want to delete the service for the specified port or ports. You may cancel the delete operation or continue with it.
· Command Line Interface for Removing Port Services
The equivalent command for removing a port service, as specified by the Delete Service item in the Edit menu, is shown here.
Table 1-14
StepInstructionCommand to Type
1 Delete the port service.# pmadm -r -p pmtag -s svctag

Troubleshooting Tips for Terminals and Modems

Text Box(135x68)

If users are unable to log in over serial port lines after you've added a terminal or modem and set up the proper services, consider the following possible causes of failure.
  1. Begin by checking with the user.

    Malfunctions in terminals and modem use are typically reported by a user who has failed to log in or dial in. For this reason, it is best to begin troubleshooting by checking for a problem on the desktop.

    Some common reasons for login failure include:

  • Login ID or password is incorrect.
  • Terminal is waiting for X-ON flow control key (Control-q).
  • Serial cable is loose or unplugged.
  • Terminal configuration is incorrect.
  • Terminal is shut off or otherwise has no power.
  1. Check the terminal.

    Continue to troubleshoot by checking the configuration of the terminal or modem. Determine the proper ttylabel for communicating with the terminal or modem. Verify that the terminal or modem settings match those of the ttylabel.

  2. Check the terminal server.

    If the terminal checks out, continue to search for the source of the problem on the terminal or modem server. Use the sacadm command to verify that a port monitor has been configured to service the terminal or modem and that it has the correct ttylabel associated with it.

# pmadm -l -t ttymon

Examine /etc/ttydefs and double-check the label definition against the terminal configuration. Use sacadm to check the port monitor's status. Use pmadm to check the service associated with the port the terminal uses.
  1. Check the serial connection.

    If the Service Access Controller is starting the TTY port monitor and pmadm reports that the service for the terminal's port is enabled, and if the terminal's configuration matches the port monitor's, then continue to search for the

problem by checking the serial connection. A serial connection comprises serial ports, cables, and terminals. Test each of these parts by using it with two other parts that are known to be reliable.
Test all of the following:
  • Serial ports
  • Modems
  • Cables
  • Connectors