Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
36.  Solaris PPP 4.0 Reference Specifying Information for Communicating With the Dial-in Server /etc/ppp/peers/myisp.tmpl Template File  Previous   Contents   Next 
   
 

Where to Find Sample /etc/ppp/peers/peer-name Files

Table 36-4 Examples of /etc/ppp/peers/peer-name Files

Example /etc/ppp/peers/peer-name

For Instructions

For a dial-out machine

"How to Define the Connection With an Individual Peer"

For a local machine on a leased line

"How to Configure a Machine on a Leased Line"

To support PAP authentication on a dial-out machine

"How to Add PAP Support to the PPP Configuration Files (Dial-out Machine)"

To support CHAP authentication on a dial-out machine

"How to Add CHAP Support to the PPP Configuration Files (Dial-out Machine)"

To support PPPoE on a client system

"Setting Up the PPPoE Client"

Configuring Modems for a Dial-up Link

This section contains information about configuring modems.

Configuring the Modem Speed

A major issue in modem configuration is designating the speed at which the modem should operate. The following guidelines apply to modems that are used with Sun Microsystems computers:

  • Older SPARC systems - Check the hardware documentation that accompanies the system. Many SPARCstation™ machines require modem speed not to exceed 38400 bps.

  • UltraSPARC™ machines - Set the modem speed to 115200 bps, which is useful with modern modems and fast enough for a dial-up link. If you plan to use a dual-channel ISDN TA with compression, you need to increase the modem speed. The limit on an UltraSPARC is 460800 bps for an asynchronous link.

For a dial-out machine, set the modem speed in the PPP configuration files, such as /etc/ppp/peers/peer-name, or by specifying the speed as an option for pppd.

For a dial-in server, you need to set the speed by using the ttymon facility or admintool, as described in "Configuring Devices on the Dial-in Server".

Defining the Conversation on the Dial-up Link

The dial-out machine and its remote peer communicate across the PPP link by negotiating and exchanging various instructions. When configuring a dial-out machine, you need to determine what instructions are required by the local and remote modems. Then you create a file that is called a chat script that contains these instructions. This section discusses information about configuring modems and creating chat scripts.

Contents of the Chat Script

Each remote peer that the dial-out machine needs to connect to probably requires its own chat script.


Note - Chat scripts are typically used only on dial-up links. Leased-line links do not use chat scripts unless an asynchronous interface is used that requires startup configuration.


The contents of the chat script are determined by the requirements of your modem model or ISDN TA, and the remote peer. These contents appear as a set of expect-send strings that the dial-out machine and its remote peers exchange as part of the communications initiation process.

An expect string contains characters that the dial-out host machine expects to receive from the remote peer to initiate conversation. A send string contains characters that the dial-out machine sends to the remote peer after receiving the expect string.

Information in the chat script usually includes the following:

  • Modem commands (often referred to as AT commands), which enable the modem to transmit data over the telephone

  • Phone number of the target peer

    This phone number might be the number that is required by your ISP, or a dial-in server at a corporate site, or an individual machine.

  • Time-out value, if required

  • Login sequence that is expected from the remote peer

  • Login sequence that is sent by the dial-out machine

Chat Script Examples

This section contains chat scripts that you can use as a reference for creating your own chat scripts. The modem manufacturer's guide and information from your ISP and other target hosts contain chat requirements for the modem and your target peers. In addition, numerous PPP web sites have sample chat scripts.

Basic Modem Chat Script

The following is a basic chat script that you can use as a template for creating your own chat scripts.
ABORT   BUSY
ABORT   'NO CARRIER'
REPORT  CONNECT
TIMEOUT 10
"" AT&F1M0&M5S2=255
SAY     "Calling myserver\n"
TIMEOUT 60
OK      "ATDT1-123-555-1212"
ogin: pppuser
ssword: \q\U
% pppd
The next table describes the contents of the chat script.

Script Contents

Explanation

ABORT 'NO CARRIER'

Abort transmission if the modem reports ABORT 'NO CARRIER' when dialing. The cause for this message is usually a dialing or modem negotiation failure.

REPORT CONNECT

Gather the CONNECT string from the modem and print it out.

TIMEOUT 10

Set initial timeout to 10 seconds. The modem's response should be immediate.

"" AT&F1M0&M5S2=255

M0 - Turn off the speaker during connect.

&M5 - Make the modem require error control.

S2=255 - Disable the TIES "+++" break sequence.

SAY "Calling myserver\n"

Display the message "Calling myserver" on the local machine.

TIMEOUT 60

Reset the timeout to 60 seconds to allow more time for link negotiation.

OK "ATDT1-123-555-1212"

Call the remote peer by using the phone number 123-555-1212.

ogin: pppuser

Log in to the peer by using UNIX-style login. Supply the user name pppuser.

ssword: \q\U

\q - Do not log if debugging with the -v option.

\U - Insert the contents of the string that follows -U, which is specified on the command line (usually the password) here.

% pppd

Wait for the % shell prompt, and run the pppd command.

/etc/ppp/myisp-chat.tmpl Chat Script Template

Solaris PPP 4.0 includes the /etc/ppp/myisp-chat.tmpl, which you can modify for use at your site. /etc/ppp/myisp-chat.tmpl is similar to the basic modem chat script except that it does not include a login sequence.

ABORT   BUSY
ABORT   'NO CARRIER'
REPORT  CONNECT
TIMEOUT 10
""      "AT&F1"
OK      "AT&C1&D2"
SAY     "Calling myisp\n"
TIMEOUT 60
OK      "ATDT1-123-555-1212"
CONNECT \c

Script Contents

Explanation

ABORT BUSY

Abort transmission if the modem receives this message from the opposite peer.

ABORT 'NO CARRIER

Abort transmission if the modem reports ABORT 'NO CARRIER' when dialing. The cause for this message is usually a dialing or modem negotiation failure.

REPORT CONNECT

Gather the CONNECT string from the modem and print it out.

TIMEOUT 10

Set initial timeout to 10 seconds. The modem's response should be immediate.

"" "AT&F1"

Reset the modem to factory defaults.

OK "AT&C1&D2"

Reset the modem so that, for &C1, DCD from the modem follows carrier. If the remote side hangs up the phone for some reason, then the DCD drops.

For &D2, DTR high-to-low transition causes the modem to go on-hook (hang up).

SAY "Calling myisp\n"

Display the message "Calling myisp" on the local machine.

TIMEOUT 60

Reset the timeout to 60 seconds to allow more time for link negotiation.

OK "ATDT1-123-555-1212"

Call the remote peer by using the phone number 123-555-1212.

CONNECT \c

Wait for the CONNECT message from the opposite peer's modem.

 
 
 
  Previous   Contents   Next