JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Network Services
search filter icon
search icon

Document Information

Preface

Part I Network Services Topics

1.  Network Service (Overview)

2.  Managing Web Cache Servers

3.  Time-Related Services

Part II Accessing Network File Systems Topics

4.  Managing Network File Systems (Overview)

5.  Network File System Administration (Tasks)

6.  Accessing Network File Systems (Reference)

Part III SLP Topics

7.  SLP (Overview)

8.  Planning and Enabling SLP (Tasks)

9.  Administering SLP (Tasks)

10.  Incorporating Legacy Services

11.  SLP (Reference)

Part IV Mail Services Topics

12.  Mail Services (Overview)

13.  Mail Services (Tasks)

14.  Mail Services (Reference)

Part V Serial Networking Topics

15.  Solaris PPP 4.0 (Overview)

16.  Planning for the PPP Link (Tasks)

17.  Setting Up a Dial-up PPP Link (Tasks)

18.  Setting Up a Leased-Line PPP Link (Tasks)

19.  Setting Up PPP Authentication (Tasks)

20.  Setting Up a PPPoE Tunnel (Tasks)

21.  Fixing Common PPP Problems (Tasks)

22.  Solaris PPP 4.0 (Reference)

Using PPP Options in Files and on the Command Line

Where to Define PPP Options

How PPP Options Are Processed

How PPP Configuration File Privileges Work

User Privileges

File Privileges

Effects of Option Privileges

/etc/ppp/options Configuration File

/etc/ppp/options.tmpl Template

Where to Find Examples of the /etc/ppp/options Files

/etc/ppp/options.ttyname Configuration File

Using /etc/ppp/options.ttyname on a Dial-in Server

Using /etc/ppp/options.ttyname on a Dial-out Machine

options.ttya.tmpl Template File

Where to Find Examples of the /etc/ppp/options.ttyname Files

Configuring User-Specific Options

Configuring $HOME/.ppprc on a Dial-in Server

Configuring $HOME/.ppprc on a Dial-out Machine

Specifying Information for Communicating With the Dial-in Server

/etc/ppp/peers/peer-name File

/etc/ppp/peers/myisp.tmpl Template File

Where to Find Examples of the /etc/ppp/peers/peer-name Files

Configuring Modem Speed for a Dial-up Link

Defining the Conversation on the Dial-up Link

Contents of the Chat Script

Chat Script Examples

Basic Modem Chat Script

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

Modem Chat Script for Calling an ISP

Basic Chat Script Enhanced for a UNIX-Style Login

Chat Script for External ISDN TA

For More Chat Script Examples

Invoking the Chat Script

How to Invoke a Chat Script (Task)

Creating a Chat File That Is Executable

How to Create an Executable Chat Program

Authenticating Callers on a Link

Password Authentication Protocol (PAP)

/etc/ppp/pap-secrets File

Creating PAP Passwords

What Happens During PAP Authentication

Using the login Option With /etc/ppp/pap-secrets

Challenge-Handshake Authentication Protocol (CHAP)

/etc/ppp/chap-secrets File

What Happens During CHAP Authentication

Creating an IP Addressing Scheme for Callers

Assigning Dynamic IP Addresses to Callers

Assigning Static IP Addresses to Callers

Assigning IP Addresses by sppp Unit Number

Creating PPPoE Tunnels for DSL Support

Files for Configuring Interfaces for PPPoE

/etc/ppp/pppoe.if File

/usr/sbin/sppptun Command

Examples of sppptun Commands for Administering Interfaces

PPPoE Access Server Commands and Files

/usr/lib/inet/pppoed Daemon

/etc/ppp/pppoe File

/etc/ppp/pppoe.device File

pppoe.so Plugin

Using PPPoE and PPP Files to Configure an Access Server

PPPoE Client Commands and Files

/usr/lib/inet/pppoec Utility

pppoe.so Shared Object

/etc/ppp/peers/peer-name File for Defining an Access Server Peer

23.  Migrating From Asynchronous Solaris PPP to Solaris PPP 4.0 (Tasks)

24.  UUCP (Overview)

25.  Administering UUCP (Tasks)

26.  UUCP (Reference)

Part VI Working With Remote Systems Topics

27.  Working With Remote Systems (Overview)

28.  Administering the FTP Server (Tasks)

29.  Accessing Remote Systems (Tasks)

Part VII Monitoring Network Services Topics

30.  Monitoring Network Performance (Tasks)

Glossary

Index

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 the link includes an asynchronous interface 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. The dial-out machine and its remote peers exchange the strings 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:

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 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. Print the string.
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 in this location the contents of the string that follows -U, which is specified on the command line. Usually, the string contains the password.

% 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 the template 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. Print the string.
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” or 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.
Modem Chat Script for Calling an ISP

Use the next chat script as a template for calling an ISP from a dial-out machine with a U.S. Robotics Courier modem.

ABORT   BUSY
ABORT   'NO CARRIER'
REPORT  CONNECT
TIMEOUT 10
"" AT&F1M0&M5S2=255
SAY     "Calling myisp\n"
TIMEOUT 60
OK      "ATDT1-123-555-1212"
CONNECT \c
\r \d\c
SAY "Connected; running PPP\n"

The following table describes the contents of the chat script.

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 receives this message from the opposite peer.
REPORT CONNECT
Gather the CONNECT string from the modem. Print the string.
TIMEOUT 10
Set initial timeout to 10 seconds. The modem's response should be immediate.
"" AT&F1M0M0M0M0&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 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.
\r \d\c
Wait until the end of the CONNECT message.
SAY “Connected; running PPP\n”
Display the informative message Connected; running PPP on the local machine.
Basic Chat Script Enhanced for a UNIX-Style Login

The next chat script is a basic script that is enhanced for calling a remote Solaris peer or other UNIX-type peer. This chat script is used in How to Create the Instructions for Calling a Peer.

        SAY "Calling the peer\n"
        TIMEOUT 10
        ABORT BUSY
        ABORT 'NO CARRIER'
        ABORT ERROR
        REPORT CONNECT
        "" AT&F1&M5S2=255
        TIMEOUT 60
        OK ATDT1-123-555-1234
        CONNECT \c
        SAY "Connected; logging in.\n"
        TIMEOUT 5
        ogin:--ogin: pppuser
        TIMEOUT 20
        ABORT 'ogin incorrect'
        ssword: \qmypassword
        "% " \c
        SAY "Logged in.  Starting PPP on peer system.\n" 
        ABORT 'not found'
        "" "exec pppd"
        ~ \c

The following table explains the parameters of the chat script.

Script Contents
Explanation
TIMEOUT 10
Set initial timeout to 10 seconds. The modem's response should be immediate.
ABORT BUSY
Abort transmission if the modem receives this message from the opposite peer.
ABORT 'NO CARRIER'
Abort transmission if the modem receives this message from the opposite peer.
ABORT ERROR
Abort transmission if the modem receives this message from the opposite peer.
REPORT CONNECT
Gather the CONNECT string from the modem. Print the string.
"" AT&F1&M5S2=255
&M5 – Make the modem require error control.

S2=255 – Disable the TIES “+++” break sequence.

TIMEOUT 60
Reset the timeout to 60 seconds to allow more time for link negotiation.
OK ATDT1-123-555-1234
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.
SAY "Connected; logging in.\n"
Display the informative message Connected; logging in to give the user status.
TIMEOUT 5
Change the timeout to enable quick display of the login prompt.
ogin:--ogin: pppuser
Wait for the login prompt. If the prompt is not received, send a RETURN and wait. Then, send the user name pppuser to the peer. The sequence that follows is referred to by most ISPs as the PAP login. However, the PAP login is not related in any way to PAP authentication.
TIMEOUT 20
Change the timeout to 20 seconds to allow for slow password verification.
ssword: \qmysecrethere
Wait for the password prompt from the peer. When the prompt is received, send the password \qmysecrethere. The \q prevents the password from being written to the system log files.
"% " \c
Wait for a shell prompt from the peer. The chat script uses the C shell. Change this value if the user prefers to log in with a different shell.
SAY "Logged in. Starting PPP on peer system.\n"
Display the informative message Logged in. Starting PPP on peer system to give the user status.
ABORT 'not found'
Abort the transmission if the shell encounters errors.
"" "exec pppd"
Start pppd on the peer.
~ \c
Wait for PPP to start on the peer.

Starting PPP right after the CONNECT \c is often called a PAP login by ISPs, though the PAP login is actually not part of PAP authentication.

The phrase ogin:--ogin: pppuser instructs the modem to send the user name pppuser in response to the login prompt from the dial-in server. pppuser is a special PPP user account name that was created for remote user1 on the dial-in server. For instructions about creating PPP user accounts on a dial-in server, refer to How to Configure Users of the Dial-in Server.

Chat Script for External ISDN TA

The following chat script is for calling from a dial-out machine with a ZyXEL omni.net. ISDN TA.

        SAY "Calling the peer\n"
        TIMEOUT 10
        ABORT BUSY
        ABORT 'NO CARRIER'
        ABORT ERROR
        REPORT CONNECT
        "" AT&FB40S83.7=1&K44&J3X7S61.3=1S0=0S2=255
        OK ATDI18882638234
        CONNECT \c
        \r \d\c
        SAY "Connected; running PPP\n"

The following table explains the parameters of the chat script.

Script Contents
Explanation
SAY "Calling the peer"
Display this message on the screen of the dial-out machine.
TIMEOUT 10
Set the initial timeout to 10 seconds.
ABORT BUSY
Abort transmission if the modem receives this message from the opposite peer.
ABORT 'NO CARRIER'
Abort transmission if the modem receives this message from the opposite peer.
ABORT ERROR
Abort transmission if the modem receives this message from the opposite peer.
REPORT CONNECT
Gather the CONNECT string from the modem. Print the string.
"" AT&FB40S83.7=1&K44&J3X7S61.3=1S0=0S2=255
The letters in this line have the following meaning:
  • &F – Use factory default

  • B40 – Do asynchronous PPP conversion

  • S83.7=1 – Use data over speech bearer

  • &K44 – Enable CCP compression

  • &J3 – Enable MP

  • X7 – Report DCE side rates

  • S61.3=1 – Use packet fragmentation

  • S0=0 – No auto answer

  • S2=255 – Disable TIES escape

OK ATDI18882638234
Make an ISDN call. For multilink, the second call is placed to the same telephone number, which is normally what is required by most ISPs. If the remote peer requires a different second phone number, append “+nnnn.”. nnnn represents the second phone number.
CONNECT \c
Wait for the CONNECT message from the opposite peer's modem.
\r \d\c
Wait until the end of the CONNECT message.
SAY "Connected; running PPP\n"
Display this message on the screen of the dial-out machine.

Refer to the chat(1M) man page for descriptions of options and other detailed information about the chat script. For an explanation of expect-send strings, refer to Chat-Script Field in /etc/uucp/Systems File.

For More Chat Script Examples

A number of web sites offer sample chat scripts and assistance in creating the chat scripts. For example, see http://ppp.samba.org/ppp/index.html.

Invoking the Chat Script

You call chat scripts by using the connect option. You can use connect "chat ..." in any PPP configuration file or on the command line.

Chat scripts are not executable, but the program that is invoked by connect must be executable. You might use the chat utility as the program to be invoked by connect. In this instance, if you store the chat script in an external file through the -f option, then your chat script file is not executable.

The chat program that is described in chat(1m) executes the actual chat script. The pppd daemon invokes the chat program whenever pppd encounters the connect "chat ..." option.


Note - You can use any external program, such as Perl or Tcl, to create advanced chat scripts. Solaris PPP 4.0 provides the chat utility as a convenience.


How to Invoke a Chat Script (Task)

  1. Create the chat script as an ASCII file.
  2. Invoke the chat script in any PPP configuration file by using the following syntax:
    connect 'chat  -f /etc/ppp/chatfile'

    The -f flag indicates that a file name is to follow. /etc/ppp/chatfile represents the name of the chat file.

  3. Give read permission for the external chat file to the user who runs the pppd command.

    Caution

    Caution - The chat program always runs with the user's privileges, even if the connect 'chat ...' option is invoked from a privileged source. Thus, a separate chat file that is read with the -f option must be readable by the invoking user. This privilege can be a security problem if the chat script contains passwords or other sensitive information.


Example 22-1 Inline Chat Script

You can place the entire chat script conversation on a single line, similar to the following:

connect 'chat "" "AT&F1" OK ATDT5551212 CONNECT "\c"'

The complete chat script follows the chat keyword. The script terminates with "\c"'. You use this form in any PPP configuration file or on the command line as an argument to pppd.

Chat Script in an External File

If the chat script that is needed for a particular peer is long or complicated, consider creating the script as a separate file. External chat files are easy to maintain and to document. You can add comments to the chat file by preceding the comments with the hash (#) sign.

The procedure How to Create the Instructions for Calling a Peer shows the use of a chat script that is contained in an external file.

Creating a Chat File That Is Executable

You can create a chat file that is an executable script to be run automatically when the dial-up link is initiated. Thus, you can run additional commands during link initiation, such as stty for parity settings, besides the commands that are contained in a traditional chat script.

This executable chat script logs in to an old-style UNIX system that requires 7 bits with even parity. The system then changes to 8 bits with no parity when running PPP.

#!/bin/sh
chat "" "AT&F1" OK "ATDT555-1212" CONNECT "\c"
stty evenp
chat ogin: pppuser ssword: "\q\U" % "exec pppd"
stty -evenp

How to Create an Executable Chat Program

  1. Use your text editor to create an executable chat program, such as the previous example.
  2. Make the chat program executable.
    # chmod +x /etc/ppp/chatprogram
  3. Invoke the chat program.
    connect /etc/ppp/chatprogram

    Chat programs do not have to be located within the /etc/ppp file system. You can store chat programs in any location.