Solaris Resources at Kempston

Configuring high-speed dialup on Solaris 7 and Solaris 8

www.kempston.net/solaris/ www.kempston.org/solaris/

This page contains detailed step-by-step instructions to configure Solaris 7 and Solaris 8 for high-speed dial-out and dial-in using V90 modems. It shows how to use Solaris to dialup and connect to a remote system with the Solaris system acting as a terninal on the remote system. It also shows how to configure Solaris to answer an incoming telephone call and provide terminal access to the calling system. It doesn't cover connecting a Solaris system to an ISP; this is a special form of dial-out and is covered in Configuring PPP on Solaris to connect to an ISP. It also doesn't cover configuring a Solaris system as a PPP server, accepting incoming PPP connections; this is covered in Configuring PPP dial-in on Solaris but this page is a prerequisite before configuring a PPP server.

What this page does cover is using Solaris to dialup a remote system and run a terminal session on that remote system. It also covers the reverse scenario: allowing remote systems to dialup your Solaris system and run terminal sessions on it.

Why would you want to do this? You may want to use your Solaris system to connect to a BBS, for example, or to any remote system which allows terminal-mode dial in access. Or you may want to configure your Solaris system at the office to give your customers dial in access or to enable you to connect to it from a Windows PC at home.

Important Notes

The instructions assume that your modem is external and attached to one of the two standard serial ports. Note that you must have a real modem; monstrosities known as WinModems are of no use whatsoever with unix. Unfortnately, I have no experience of using internal modems with Solaris and there may be additional configuration issues with these. I'm not able to advise about issues with internal modems but there's some useful advice at Celeste Stokely's Web pages and especially in her Tutorial on Solaris 2.x Modems & Terminals. Celeste's pages cover the configuration of modems in very much more detail than is offered here and are highly recommended for further reading. This page is intended to provide a simple, step-by-step procedure which should work for most people.

Now for the instructions. No unix knowledge is assumed, other than the ability to edit files using a text editor.



Configuring Solaris for high-speed dial out

Please note that you must be logged in as root while implementing these instructions.

These instructions describe how to configure Solaris and your modem for dial-out to a remote computer. Implement these instructions first, even if you want to configure your system for dial in access.

1. Configure your serial port for dial out

Start admintool under CDE:

 	# admintool &

Select the Browse menu and then Serial Ports from the drop-down list. Click on the line starting a if your modem is attached to the first serial port or on the line starting b if your modem is connected to the second serial port. Select the Edit menu and then Modify from the drop-down list.

Change the following fields:

 	Template:    Modem - Dial out Only
Baud Rate: 9600

Cick on OK and close admintool.


2. Test communication with the modem

The unix command "tip" is used to communicate with a modem. If you're interested in the gory detail, the manual page for this command can be displayed by typing:

	 # man tip

If your modem is attached to the first serial port:

	 # tip /dev/cua/a

If your modem is attached to the second serial port:

	 # tip /dev/cua/b

and the command should respond:

	 connected

If it responds:

	 All ports busy

it means either that your serial port is configured incorrectly, perhaps for dial in instead of dial out, or that there is a more fundamental problem in communicating with the port. In this case, have a look at Celeste Stokely's Tutorial on Solaris 2.x Modems & Terminals which contains a wealth of useful information about modems.

Type:

	 ATZ

and the modem should respond:

	 OK

If there's no response from the modem, check that you're using a straight-through cable with pin 2 at one end connected to pin 2 at the other end, pin 3 to pin 3 and so on. A "null-modem" or cross-over cable, designed for use with a terminal, will not work.

Type:

	 ATI4

Most modems respond to this command by reporting their current settings. If this doesn't work, try AT&v, ATL5, ATL6, ATL7 or AT*c. If all else fails, consult your modem manual. When using a 3COM USR V90 modem, it responds:

	U.S. Robotics 56K Message Settings...

	B0  E1  F1  L2  M1  Q0  V1  X4  Y0
	SPEED=300   PARITY=N  WORDLEN=8
	DIAL=TONE    OFF LINE

	&A1  &B1  &C1  &D2  &H1  &I0  &K1
	&M4  &N0  &P0  &R2  &S0  &T5  &U0  &Y1
	...

Note that the actual speed at which Solaris is communicating with the modem is only 300 baud, or 30 characters per second, despite the speed having been set using admintool to be 9600. The reason for this is that tip defaults to a speed of 300 baud and we'll fix this in the next step.

Close tip by typing "ENTER key, tilde, full stop" as three key strokes:

	  ~.


3. Set the modem DTE speed

Edit the file /etc/remote and insert a line at the start of this file reading:

	 modem:dv=/dev/cua/a:br#115200

if your modem is attached to the first serial port, or:

	 modem:dv=/dev/cua/b:br#115200

if your modem is attached to the second serial port.

This enables us to communicate with the modem at a speed of 115200 bits per second. It's important to understand that there are two speeds to be considered in modem communication. There's the speed at which the host computer talks to a connected modem and this is known as the Data Terminal Equipment or DTE speed. There's also the speed at which the modem transmits and receives data across the telphone line and this is known as the Data Communication Equipment or DCE speed. A 56K or V90 modem is capable of a DCE speed of up to 56K, although this is unlikely to be achieved in practice. Data sent down a telephone connection is often compressed with the receiving modem uncompressing the data before sending it to the host computer. So a modem to modem speed (DCE) of 56K could result in a modem to computer speed (DTE) well in excess of 56K. For this reason, the DTE speed should be set at least 50% higher than the maximum DCE speed and a DTE speed of 115200 is recommended for use with 56K modems.

However, not all Sun hardware is capable of talking to a serial port at this speed. If you have a Sun Ultra 5 or better, or an Intel P90 or better, your system should be able to sustain a DTE speed of 115200. If you have an older Sun system, you may well not be able to drive a V90 modem at its maximum speed and will need to experiment to find the highest DTE speed that your hardware supports. If 115200 doesn't work, try specifying 38400, 19200 or 9600 in the line in /etc/remote.


4. Test high-speed communication with the modem

Try the tip test again, this time specifying the name of the new entry in /etc/remote as a parameter to tip and you should be rewarded with a high-speed connection to the modem:

	 # tip modem
	connected
	ATI4
	U.S. Robotics 56K Message Settings...

	B0  E1  F1  L2  M1  Q0  V1  X4  Y0
	SPEED=115200  PARITY=N  WORDLEN=8
	DIAL=TONE    OFF LINE

	&A1  &B1  &C1  &D2  &H1  &I0  &K1
	&M4  &N0  &P0  &R2  &S0  &T5  &U0  &Y1
	...

Check that the output from ATI4 reports the DTE speed correctly as 115200 or whatever you've set this to.

While connected to the modem, check that the following modem settings are correct:

 	&B1    Fixed serial port rate
	&C1    Normal Carrier Detect (CD) operation
	&D2    Normal DTR operations
	&H1    Hardware flow control using Clear To Send (CTS)
	&N0    Connection (DCE) speed determined by negotiation
		with the remote modem to the highest usable speed
	&R2    Received data to computer only on RTS

To change one of the '&' modem register settings, type AT followed by the register name and required value. For example, to change the value of register &B to 1, type:

	 AT&B1

When all the changes have been made, save the current settings to the modem's non-volatile RAM by typing:

	 AT&W

Do this even if no register values have been changed because saving the current values will save the current port speed as set by tip.

Finally, exit from tip by typing "ENTER key, tilde, full stop" as three key strokes:

	  ~.


5. Check permissions and ownership of the device files

The permissions and ownership of the serial port device files may well be incorrect. Check them, for the first serial port, by typing "ls -l /dev/cua/a" to see details of that file (which is a symbolic link to the underlying device file) and by typing "ls -lL /dev/cua/a" to see details of the underlying device file. Replace "/dev/cua/a" with "/dev/cua/b" for the second serial port. If permissions and ownership are correct, the output should be like:

	 # ls -l /dev/cua/b
	lrwxrwxrwx   1 root     root          32 Jun 27 22:14 /dev/cua/b -> ../../devices/isa/asy@1,2f8:b,cu
	# ls -lL /dev/cua/b
	crw-------   1 uucp     tty      106,131073 Dec 13 17:16 /dev/cua/b

In this example, the permissions of the underlying device file are rw-------, the owner is uucp and the group is tty. Ignore the remaining fields on the output which vary from one system to another. If your device files don't have these permissions and ownerships, change them by typing:

For the symbolic link /dev/cua/b:

	# chmod 777 /dev/cua/b
	# chown -h root /dev/cua/b
	# chgrp -h root /dev/cua/b

For the underlying device file:

	# chmod -R 600 /dev/cua/b
	# chown uucp /dev/cua/b
	# chgrp tty /dev/cua/b

Configuration of Solaris for high-speed dial out capability is now complete.


6. Dial a remote system

If you have a remote system that accepts incoming modem terminal connections, the procedure for connecting to a remote system is as follows:

First, connect to the modem as before:

	# tip modem
	connected

Then tell the modem to dial the remote system by typing ATDT followed by the telephone number of the modem attached to the remote system. For example, to dial out to telephone number 123-4567, type:

	ATDT1234567

You should hear the local modem dialling, followed by audio tones while it negotiates a connection (DCE) speed with the remote modem. Finally, the CONNECT string from the local modem should appear, followed by the greeting and login prompt from the remote computer:

	CONNECT 45333/ARQ/V90/LAPM/V42BIS
	Welcome to Kempston Networks
	login:

Note that a V90 connection will be achieved only if the remote system is running a digital terminal server, such as those used by ISPs. When there are V90 modems at both ends of the link, the best speed achievable is 33.6K bits per second. In this case, you may see a CONNECT string like:

	CONNECT 31200/ARQ/V34/LAPM/V42BIS
	Welcome to Kempston Networks
	login:

Not all modems output the CONNECT string. If you don't see the login prompt within a couple of seconds of the connection being established, press the ENTER key once. This should trigger a login prompt from the remote computer.



Configuring Solaris for high-speed dial in

Please note that you must be logged in as root while implementing these instructions.

These instructions describe how to configure Solaris and your modem for dial in from a remote computer. Note that you should first implement the instructions for configuring dial out before continuing with the following steps.


1. Set the serial port attributes

A quick look at admintool indicates that all you need to do is set the template to Modem - Bidirectional or Modem - Dial in Only and choose an appropriate DTE speed. Unfortunately, this isn't sufficient and you'll be lucky to achieve a working dial in connection if that's all you do. At best the system dialling in will see garbled characters at first instead of a login prompt and the overall throughput is likely to be 300 bits per second.

The reason for this is that what appear to be terminal speeds listed in admintool are actually references to labels for entries in the /etc/ttydefs file and these entries are far from ideal for a dial in connection. In particular, they omit many of the port attributes needed for reliable communication and are interlinked such that an initial failure to synchronize on the first character received caues the DTE speed to drop rapidly through a series of intermediate values right down to 300 bps.

To define an entry containing the required serial port attributes, edit the file /etc/ttydefs and insert the following line at the end of this file:

	modem:115200 -parenb cs8 -clocal hupcl:115200 -parenb cs8 -clocal hupcl crtscts::modem

If your hardware isn't capable of operating at a DTE speed of 115200 bps (see the notes in step 3 of the dial out instructions above), you may need to change both occurences of 115200 in this line to 38400, 19200 or 9600.

In this line, modem is a label which will be used by the port monitor as a speed entry and 115200 -parenb cs8 -clocal hupcl are standard stty parameters that set the characteristics of the port while waiting for a CONNECT response from the modem: no parity, 8 bit, not a local connection and hang up the modem on close. The next set of stty parameters set the port characteristics after a connection has been established and are identical to the first set with the addition of crtscts that sets hardware flow control. The null field between the two adjacent colons disables autobaud detection and the final modem indicates that there should be no change to the port characteristics when a BREAK signal is received. These last two fields lock the port (DTE) speed to whatever speed is specified in the ttydefs entry and prevent it degrading downwards in the event of any transient failures.


2. Configure the serial port for dial in use

Start admintool:

 	# admintool &

Select the Browse menu and then Serial Ports from the drop-down list. Click on the line starting a if your modem is attached to the first serial port or on the line starting b if your modem is connected to the second serial port. Select the Edit menu and then Delete to delete service on the port and clear any previous entry. A warning dialog box appears asking whether you really want to delete service. Click on Delete to confirm.

Click on the a or b line again, select the Edit menu and then Modify from the drop-down list to set up the required serial port characteristics.

Change the following fields:

 	Template:    	 Modem - Bidirectional
	Detail:          Basic
	Service Enable:  ticked
	Terminal Type:   vt100

and select Other... from the Baud Rate list.

In the box that appears labelled /etc/ttydefs Entry, type the name of the new label inserted into /etc/ttydefs:

 	modem

Cick on OK to dismiss the dialog box and again on OK to apply the changes, then close admintool.

Use the pmadm command to check that the serial port has been set up correctly. You should see output very similar to:

	# pmadm -l
	PMTAG          PMTYPE         SVCTAG         FLGS ID       <PMSPECIFIC>
	zsmon          ttymon         ttya           u    root     /dev/term/a b - /usr/bin/login - 9600 ldterm,ttcompat login:  - - n  #
	zsmon          ttymon         ttyb           u    root     /dev/term/b b - /usr/bin/login - modem ldterm,ttcompat login:  - vt100 n  #Modem - Bidirectional

In this example, the second serial port (ttyb) has been configured. The fields are:

	PMTAG            port monitor tag: should be zsmon
	PMTYPE           port monitor type: should be ttymon
	SVCTAG           service tag: ttya for the first serial port or ttyb for the second
	FLGS             flags: u means enabled
	ID               root
	PMSPECIFIC       port monitor fields

The port monitor fields are:

	/dev/term/b      the incoming serial port device
	b                bidirectional
	-                a placeholder for optional arguments to the previous field
	/usr/bin/login   the program to be run on an incoming connection
	modem            points to an entry in /etc/ttydefs containing speed and stty values
	ldterm,ttcompat  streams modules, to set line characteristics
	login:           login prompt
	vt100            terminal type
	n                not soft carrier: DCD (pin 8) going high opens the port

If you would like your system to display a greeting message before the login prompt, create the file /etc/issue containing the greeting message to be displayed. For example:

	echo "Welcome to Kempston Networks" > /etc/issue

displays the following when an incoming modem call connects:

	Welcome to Kempston Networks
	login:


3. Check permissions and ownership of the device files

There are two sets of device files used with modem connections: the symbolic links in the /dev/cua directory are used for outgoing connections and symbolic links in the /dev/term directory are used for incoming connections.

The permissions and ownership of the outgoing device files should have been set correctly earlier. We now need to do the same for the incoming device files. Check them, for the first serial port, by typing "ls -l /dev/term/a" to see details of that file (which is a symbolic link to the underlying device file) and by typing "ls -lL /dev/term/a" to see details of the underlying device file. Replace "/dev/term/a" with "/dev/term/b" for the second serial port. If permissions and ownership are correct, the output should be like:

	 # ls -l /dev/term/b
	lrwxrwxrwx   1 root     root          29 Jun 27 22:14 /dev/term/b -> ../../devices/isa/asy@1,2f8:b
	# ls -lL /dev/term/b
	crw-------   1 root     sys      106,  1 Dec 17 12:09 /dev/term/b

If your device files don't have these permissions and ownerships, change them by typing:

For the symbolic link /dev/term/b:

	# chmod 777 /dev/term/b
	# chown -h root /dev/term/b
	# chgrp -h root /dev/term/b

For the underlying device file:

	# chmod -R 600 /dev/term/b
	# chown root /dev/term/b
	# chgrp sys /dev/term/b


4. Set the modem to auto-answer incoming calls

Connect to the modem:

	 # tip modem
	connected

and set the modem's S0 register to 1:

	ATS0=1

This tells the modem to answer incoming calls after one ring.

Then save the current settings to non-volatile memory so that they are retained when the modem is switched off:

	AT&W

Finally, close tip by typing "ENTER key, tilde, full stop" as three key strokes:

	  ~.

And that completes the configuration of your system and the modem for high-speed dial in access.

Arrange for another system to dial in to your Solaris machine and, provided you've followed these instructions exactly, it should work first time.


Has this guide been useful?

I hope these instructions prove useful. If you have any comments or suggestions for improvement, or have found any technical errors, please email me at mike@kempston.net

This page is copyright © mike@kempston.net 2000. Reproduction is forbidden without the author's permission. You are welcome to link to these pages if you wish but please point to the pages at www.kempston.net: Solaris Resources at Kempston



Home Free Solaris Connecting to an ISP
Configuring mail Configuring modem dialup Configuring a PPP server
Installing Software Solaris FAQs and Software Site Index

This page is maintained by the Kempston Webmaster
Last updated 24 December 2000