Contidos dentro
Localizar Mais Documentação
Destaques de Recursos de Suporte
| 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 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
| Procedure | Suggested Tool | Comment |
| Set up terminals and modems | Serial Port Manager | Serial 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 disabled | Service Access Facility ttyadm -i | ttyadmin -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 host | Service Access Facility ttyadm -h | ttyadm -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 prompt | Service Access Facility ttyadm -r | ttyadm -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 system | Be 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.
-

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.
-

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.
-

-
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
| Detail | Item | Description |
| Basic | Port | Lists the port or ports you selected from Serial Port Manager's main window. |
| Service | Specifies that the service for the specified port is turned on (enabled). |
| Baud Rate | Specifies the line speed used to communicate with the terminal. The line speed represents an entry in /etc/ttydefs. |
| Terminal type | Shows 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. |
| More | Option: Initialize Only | Specifies that the port software is initialized but not configured. |
| Option: Bidirectional | Specifies that the port line is used in both directions. |
| Option: Software Carrier | Specifies that the software carrier detection feature is used. If the option is not checked, the hardware carrier detection signal is used. |
| Login Prompt | Shows the prompt displayed to a user after a connection is made. |
| Comment | Shows the comment field for the service. |
| Service Tag | Lists the service tag associated with this port--typically an entry in the /dev/term directory. |
| Port Monitor Tag | Specifies the name of the port monitor to be used for this port. Note: The default monitor is typically correct. |
| Expert | Create utmp entry | Specifies 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 Carrier | Specifies that a port's associated service is invoked immediately when a connect indication is received. |
| Service | Shows the program that is run upon connection. |
| Streams Modules | Shows 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.
-
-
Select the port or ports that will be used with a terminal.
-
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.
-
Choose Terminal-Hardwired from the Use Template menu.
-

- The Terminal-Hardwired template provides the following values for the selected port.
-
Table 1-4
| Detail | Item | Default Value |
| Basic | Port | -- |
| Service | Enabled |
| Baud Rate | 9600 |
| Terminal type | -- |
| More | Option: Initialize Only | no |
| Option: Bidirectional | no |
| Option: Software Carrier | yes |
| Login Prompt | login: |
| Comment | Terminal - Hardwired |
| Service Tag | -- |
| Port Monitor Tag | zsmon |
| Expert | Create utmp entry | yes |
| Connect on Carrier | no |
| Service | /usr/bin/login |
| Streams Modules | ldterm,ttcompat |
| Timeout (secs) | Never |
-
-
Change values of template entries if desired.
-
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
| Step | Instruction | Command to Type |
| 1 | Determine the port monitor version number. In this
example, the version number is 1. | # ttyadm -V
1 |
| 2 | Type 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 |
| 3 | Use 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'" |
| 4 | Attach 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.
-
-
Select the port or ports that will be used with a modem.
-
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.
-
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 Configuration | Description |
| Modem - Dial-In Only | Users may dial in to the modem but cannot dial out. |
| Modem - Dial-Out Only | Users may dial out from the modem but cannot dial in. |
| Modem - Bidirectional | Users 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.
-
-
Change values of template entries if desired.
-
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.
-
-
Follow Step 1 through Step 3 in the "How to Add Modems" procedure.
-
-
Select the Other item from the Baud Rate menu.
-

-
-
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.
-
Change values of other template entries if desired.
-
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
| Detail | Item | Modem - Dial-In Only | Modem - Dial-Out Only | Modem - Bidirectional |
| Basic | Port | -- | -- | -- |
| Service | Enabled | Enabled | Enabled |
| Baud Rate | 9600 | 9600 | 9600 |
| Terminal type | -- | -- | -- |
| More | Option: Initialize Only | yes | no | no |
| Option: Bidirectional | no | no | yes |
| Option: Software Carrier | no | no | no |
| Login Prompt | login: | login: | login: |
| Comment | Modem - Dial-In Only | Modem - Dial-Out Only | Modem - Bidirectional |
| Service Tag | -- | -- | -- |
| Port Monitor Tag | zsmon | zsmon | zsmon |
| Expert | Create utmp entry | yes | yes | yes |
| Connect on Carrier | no | no | no |
| Service | /usr/bin/login | /usr/bin/login | /usr/sbin/login |
| Streams Modules | ldterm,ttcompat | ldterm,ttcompat | ldterm,ttcompat |
| Timeout (secs) | Never | Never | Never |
· 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
| Step | Instruction | Command to Type |
| 1 | Make 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. |
|
| 2 | Use 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 |
| 3 | Create 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" |
| 4 | Determine if the port already has a service configured with the pmadm command. If it does not, skip to step 6. | # pmadm -l -s svctag |
| 5 | If the port already has a service configured, delete it. | # pmadm -r -p pmtag -s svctag |
| 6 | Create 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
| Step | Instruction | Command to Type |
| 1 | Make 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. |
|
| 2 | Add 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 |
| 3 | Disable 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
| Step | Instruction | Command to Type |
| 1 | Make sure the modem is properly connected and that the modem switches are set to allow bidirectional service. See the documentation accompanying the modem. |
|
| 2 | Use 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 |
| 3 | Create 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" |
| 4 | Determine if the port already has a service configured with the pmadm command. If it does not, skip to step 6. | # pmadm -l -t ttymon |
| 5 | If the port already has a service configured, delete it. | # pmadm -r -p pmtag -s svctag |
| 6 | Create 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 " |
| 7 | Add 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.
-
-
Select the port or ports that you want to initialize.
-
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.
-
Choose Initialize Only - No Connection from the Use Template menu.
-

- The Initialize Only - No Connection template provides the following values for the selected port.
-
Table 1-11
| Detail | Item | Default Value |
| Basic | Port | -- |
| Service | Enabled |
| Baud Rate | 9600 |
| Terminal type | -- |
| More | Option: Initialize Only | yes |
| Option: Bidirectional | no |
| Option: Software Carrier | no |
| Login Prompt | login: |
| Comment | Initialize Only - No Connection |
| Service Tag | -- |
| Port Monitor Tag | zsmon |
| Expert | Create utmp entry | yes |
| Connect on Carrier | no |
| Service | /usr/bin/login |
| Streams Modules | ldterm,ttcompat |
| Timeout (secs) | Never |
-
-
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
| Step | Instruction | Command to Type |
| 1 | Create 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.
-
-
Select the port or ports that you want to disable.
-
Choose Modify Service from the Edit menu.
-
Select Disable in the Modify Service window.
-

-
-
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
| Step | Instruction | Command to Type |
| 1 | Determine the port monitor tag and the port monitor service tag for the port you want to disable. | # pmadm -l |
| 2 | Disable the port monitor service. | # pmadm -d -p pmtag -s svctag |
· How to Remove Port Services
- To delete services on configured ports, follow these steps.
-
-
Select the port or ports that has a service you want to delete.
-
Choose Delete Service from the Edit menu.
-

- 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
| Step | Instruction | Command to Type |
| 1 | Delete the port service. | # pmadm -r -p pmtag -s svctag |
Troubleshooting Tips for Terminals and Modems

- 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.
-
- 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.
-
- 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.
- 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.
-
- 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
|
|