Introduction

You must execute the commands as root, and you probably will have to reboot the machine. So, plan the system's downtime accordingly.

You may distribute this information to anyone who wants it, as long as you never attempt to copyright it in any way. If you find errors in it or have suggestions for changes in future revisions, please let Celeste know via e-mail ([email protected]). Go for it—you can do it!

Setting up modems and terminals under UNIX is often painful. If you had modem and terminal connection down to a science in SunOS 4.x, you're probably having trouble understanding it in Solaris 2.x. Solaris 2.x uses the SYSV-ish approach instead of the SunOS 4.x BSD approach. BSD uses getty and friends to spawn login, whereas SYSV uses port monitors and new friends.

If this is your first attempt at hooking up a modem or terminal to a UNIX machine, I'll give you a sound strategy to use and walk you through it. It's not really hard once you learn a few basics.

The Sun manuals and AnswerBook have had a few incorrect back quotes in vital places. Following their instructions probably won't give you error messages, but they may not work, either. However, AnswerBook does explain all the details of port monitors, if you want to understand them in detail.

Sun's admintool Serial Port Manager works for many simple modem and terminal setups. But when it doesn't work, you need to know how to run the various setup commands by hand.

WARNING

I have very strong feelings about modems and serial ports, their uses, their manufacturers, and their support. My clients ask me to make their modems work and keep working, so I tend to use only modems that are robust, highly configurable, fast, and well supported. They're not cheap, but neither is a System Administrator's time. I use cheap modems for doorstops and bookends.


Which Modem Should You Use?

Hundreds of Hayes-compatible, asynchronous modems are on the market today. Most of them can be made to work on a Sun system for dial-out. Many can work for dial-in. Several work gracefully for bidirectional (dial-in and dial-out) use. Fewer still bring a smile to a sysadmin's heart.

If you're trying to connect a non-Hayes-compatible modem to your Sun system, this article won't work for you.

This article covers the basic setup for many common serial port usages, such as the following.

  • Dial-in-only access for human login accounts.

  • Dial-out-only access for humans and programs using tip.

  • Dial-in and dial-out setups for UUCP (e-mail, Usenet NetNews, file transfer).

  • Bidirectional modem use—dialing in and out on the same port.

  • Basic dumb terminal connection, (“dumb terminal” == vt100, Wyse-50, and other plain, character-based terminals).

This article specifically does not cover the following issues.

In general, you get what you pay for. A $49 modem will cost you a fortune in the time it takes to get it running. A $499 modem can often be configured and running in under 20 minutes and gives you little grief in day-to-day use.

Types of Modem Usage

Match your modem to your intended use for it. Don't buy a cheap 2400 bps modem to transfer all your company's mail and net news. If your Internet service provider offers UUCP connection only over Telebit WorldBlazers, you should strongly consider buying a Telebit WorldBlazer and dedicate it to that use. If they're not a Telebit site and plan on staying that way, there are faster, more widely compatible modems available for a lot less money.

My current favorite is the USRobotics Courier V.Everything. Next month, who knows what will be the darling? I have so many “former favorite” modems in my office that it's starting to look like a modem museum.

If you have to support a lot of dial-in users with a wide collection of random modems, then you need something that can happily work with all the possible user modems. That means you need one that runs at least 28800 bps. The 56K modem manufacturers have finally agreed on a single standard, so these modems will become great for your users, in time. Plan on spending $250–$600 for a solid, production-quality modem.

Modem Programming

In deciding which modem to buy, a key consideration is how you program the modem. Some modems use DIP switches, some are programmed by connecting to the modem and setting software registers, some use both methods. You get more programming flexibility with software registers, and this is important when you'll be connecting to a lot of different modem types.

If a modem has only DIP switches available, it probably will be hard to make it do everything you need for lots of different connections. It's probably also an old, slow modem. I call these “cheap PC modems” and avoid them like Internet spam get-rich-quick schemes.

Modem Speed

One of the most important features to look for is the modem's ability to run at split speeds. You really want to run the computer-to-modem connection at a fixed speed (the “DTE rate” or “serial rate”) all the time, and let the modem negotiate the modem-to-modem speed (“DCE rate” or “line speed”) independently.

Beware, because many inexpensive modems can't run at split speeds. If your modem doesn't do this, you and your users will have to press the Break key until the speeds sync up. This drives users (and you) crazy!

You should try to run the computer-to-modem (DTE) connection at 9600 bps, 19200 bps, or 38400 bps. A Sun system cannot run the CPU serial port at 14400 bps. But, that's OK because all the 14400 modems I've ever seen can run at 19200 bps DTE speed. You can also run at slower speeds, but why bother? Buy a faster modem than you think you need; you'll get more use out of it in the long run.

A few kernel hacks are available to run the Sun CPU serial ports at higher speed. Use them at your own risk. I do not recommend them—they're too unstable for most purposes. The Sun CPU serial ports and their drivers are bad enough without hacking on them yourself.

NOTE

Sun Ultra 2 and newer machines are reported to be able to run the CPU serial ports faster than 38400 bps with Solaris 2.6 and greater. Your line speed may vary.


If you crave more speed than 38400 bps, you need to look into SBus serial port expander cards with DMA, or even network-connected terminal servers, and modems which are even more expensive. If you need a lot of high-speed serial connections, network terminal servers are probably the way you should go.

Flow Control and Parity

When you run at higher speeds (9600 bps and above), you must worry about flow control. Ideally, you want hardware flow control where the Sun system and modem play the right games with the RTS/CTS lines to say “shut up” and “give me more.”

Historically, the Sun CPU ports have not been able to use incoming hardware flow control, only outgoing. Sun has released some patches to enable incoming flow control. For Solaris 2.4, use Patch # 102845, available from http://sunsolve.sun.com to Sun Support contract customers. Sometimes, the patch just doesn't work. Sometimes it does. It's worth a try for 2.4. If it doesn't work and you must have hardware flow control, look into the higher-end SBus-based serial port expander cards. I don't know if this problem is fixed in later versions of Solaris.

If the patch doesn't work for you, you can consider using software (XON/XOFF) flow control. But, never use software flow control with UUCP/PPP or the protocol will go nuts from the unexpected XON and XOFF characters. If you can't use hardware flow control with UUCP/PPP, it's better to use no flow control at all and let UUCP/PPP do its own packet throttling.

If hardware flow control is a must-have (and it's becoming that way for most of us), then buy a DMA-type SBus serial port card with hardware flow control from a reputable vendor. I do not recommend the Sun SPC card for this use. I have some suggestions for vendors in “Vendor List” and on our Unix Serial Port Resources WWW page at the following URL. http://www.stokely.com/unix.serial.port.resources/

I run my own communications server without port-level flow control on my 13 UUCP connections at 38400 bps and all the mail and NetNews gets delivered just fine.

Try to always run your ports and modems at 8 bits, no parity. Parity on serial port transmissions is an outdated concept when you're using modern, error-correcting modem protocols. By default, most Sun CPU ports run at 7 bits, even parity (7E1). I'll explain how to run them at 8 bits, no parity (8N1). If you've got a legitimate use for odd, mark, or space parity, I want to hear from you!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.156.25