<chapter id="pppsvrconfig.reference-1"><title>Solaris PPP 4.0 (Reference)</title><highlights><itemizedlist><para>This chapter provides detailed
conceptual information about Solaris
PPP 4.0. Topics include the following:</para><listitem><para><olink targetptr="pppsvrconfig.reference-65" remap="internal">Using
PPP Options in Files and on the Command
Line</olink></para>
</listitem><listitem><para><olink targetptr="enmzz" remap="internal">Configuring User-Specific Options</olink></para>
</listitem><listitem><para><olink targetptr="pppsvrconfig.reference-45" remap="internal">Specifying
Information for Communicating With
the Dial-in Server</olink></para>
</listitem><listitem><para><olink targetptr="ppp.reference-65" remap="internal">Configuring
Modem Speed for a Dial-up Link</olink></para>
</listitem><listitem><para><olink targetptr="pppsvrconfig.reference-66" remap="internal">Defining
the Conversation on the Dial-up Link</olink></para>
</listitem><listitem><para><olink targetptr="pppsvrconfig.reference-17" remap="internal">Authenticating
Callers on a Link</olink></para>
</listitem><listitem><para><olink targetptr="ppp.reference-39" remap="internal">Creating
an IP Addressing Scheme for Callers</olink></para>
</listitem><listitem><para><olink targetptr="ppp.reference-45" remap="internal">Creating
PPPoE Tunnels for DSL Support</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="pppsvrconfig.reference-65"><title>Using PPP Options in Files
and on the Command Line</title><para>Solaris PPP 4.0 contains a large
set of options, which you use to define
your PPP configuration. You use these
options in the PPP configuration files,
or on the command line, or by using
a combination of files and command-line
options. This section contains detailed
information about the use of PPP options
in configuration files and as arguments
to PPP commands.</para><sect2 id="pppsvrconfig.intro-21"><title>Where to Define PPP Options</title><itemizedlist><para>Solaris PPP 4.0 configuration
is very flexible.You can define PPP
options in the following places:</para><listitem><para>PPP configuration
files</para>
</listitem><listitem><para>PPP commands that
are issued on the command line</para>
</listitem><listitem><para>A combination of both
places</para>
</listitem>
</itemizedlist><para>The next table lists the
PPP configuration files and commands.</para><table frame="topbot" pgwide="100" id="ppp.reference-tbl-71"><title>Summary
of PPP Configuration Files and Commands</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colwidth="30*"/><colspec colwidth="40*"/><colspec colwidth="30*"/><thead><row rowsep="1"><entry><para>File or Command </para>
</entry><entry><para>Definition</para>
</entry><entry><para>For Information</para>
</entry>
</row>
</thead><tbody><row><entry><para><filename>/etc/ppp/options</filename></para>
</entry><entry><para>A file that contains characteristics
that apply by default to all PPP links
on the system, for example, whether
the machine requires peers to authenticate
themselves. If this file is absent,
nonroot users are prohibited from
using PPP.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.reference-46" remap="internal">/etc/ppp/options
Configuration File</olink></para>
</entry>
</row><row><entry><para><filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable></para>
</entry><entry><para>A file that describes
the characteristics of all communications
over the serial port <replaceable>ttyname</replaceable>.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.reference-4" remap="internal">/etc/ppp/options.ttyname
Configuration File</olink></para>
</entry>
</row><row><entry><para><filename>/etc/ppp/peers</filename></para>
</entry><entry><para>Directory that usually contains
information about peers with which
a dial-out machine connects. Files
in this directory are used with the <command>call</command> option of the <command>pppd</command> command.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.reference-45" remap="internal">Specifying
Information for Communicating With
the Dial-in Server</olink></para>
</entry>
</row><row><entry><para><filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable></para>
</entry><entry><para>A file that contains characteristics
of the remote peer <replaceable>peer-name</replaceable>. Typical characteristics
include the remote peer's  phone number
and chat script for negotiating the
link with the peer.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.reference-56" remap="internal">/etc/ppp/peers/peer-name
File</olink></para>
</entry>
</row><row><entry><para><filename>/etc/ppp/pap-secrets</filename></para>
</entry><entry><para>A file that contains the necessary
security credentials for Password
Authentication Protocol (PAP) authentication.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.reference-25" remap="internal">/etc/ppp/pap-secrets
File</olink></para>
</entry>
</row><row><entry><para><filename>/etc/ppp/chap-secrets</filename></para>
</entry><entry><para>A file that contains the necessary
security credentials for Challenge-Handshake
Authentication Protocol (CHAP) authentication.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.reference-250" remap="internal">/etc/ppp/chap-secrets
File</olink></para>
</entry>
</row><row><entry><para> <filename>~/.ppprc</filename></para>
</entry><entry><para>File in the home directory of
a PPP user, most often used with dial-in
servers. This file contains specific
information about each user's configuration.</para>
</entry><entry><para><olink targetptr="ennaa" remap="internal">Configuring
$HOME/.ppprc on a Dial-in Server</olink></para>
</entry>
</row><row><entry><para><command>pppd</command> <replaceable>options</replaceable></para>
</entry><entry><para>Command and options for initiating
a PPP link and describing its characteristics.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.reference-2" remap="internal">How
PPP Options Are Processed</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>Refer to the <olink targetdoc="refman1m" targetptr="pppd-1m" remap="external"><citerefentry><refentrytitle>pppd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for details on the PPP files.
 <command>pppd</command> (1M) also
includes comprehensive descriptions
of all options that are available
to the <command>pppd</command> command.
 Sample templates for all the PPP
configuration files are available
in <filename>/etc/ppp</filename>.</para>
</sect2><sect2 id="pppsvrconfig.reference-2"><title>How PPP Options Are Processed</title><orderedlist><listitem><para>The <command>pppd</command> daemon
parses the following:</para><itemizedlist><para>All Solaris PPP 4.0 operations
are handled by the <command>pppd</command> daemon,
which starts when a user runs the <command>pppd</command> command. When a user
calls a remote peer, the following
occurs:</para><listitem><para><filename>/etc/ppp/options</filename></para>
</listitem><listitem><para><filename>$HOME/.ppprc</filename></para>
</listitem><listitem><para>Any files that are
opened by the <literal>file</literal> or <literal>call</literal> option in <filename>/etc/ppp/options</filename> and <filename>$HOME/.ppprc</filename></para>
</listitem>
</itemizedlist>
</listitem><listitem><para><command>pppd</command> scans
the command line to determine the
device in use. The daemon does not
yet interpret any options that are
encountered.</para>
</listitem><listitem><para><command>pppd</command> tries
to discover the serial device to use
by using these criteria:</para><itemizedlist><listitem><para>If a serial device
is specified on the command line,
or a previously processed configuration
file, <command>pppd</command> uses
the name of that device.</para>
</listitem><listitem><para>If no serial device
is named, then <command>pppd</command> searches
for the <literal>notty</literal>, <literal>pty</literal>, or <literal>socket</literal> option
on the command line. If one of these
options is specified, <command>pppd</command> assumes
that no device name exists.</para>
</listitem><listitem><para>Otherwise, if <command>pppd</command> discovers that standard
input is attached to a tty, then the
name of the tty is used.</para>
</listitem><listitem><para>If <command>pppd</command> still
cannot find a serial device, <command>pppd</command> terminates the connection
and issues an error.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><command>pppd</command> then
checks for the existence of the <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> file. If the
file is found, <command>pppd</command> parses
the file.</para>
</listitem><listitem><para><command>pppd</command> processes
any options on the command line.</para>
</listitem><listitem><para><command>pppd</command> negotiates
the Link Control Protocol (LCP) to
set up the link.</para>
</listitem><listitem><para>(Optional) If authentication
is required, <command>pppd</command> reads <filename>/etc/ppp/pap-secrets</filename> or <filename>/etc/ppp/chap-secrets</filename> to
authenticate the opposite peer.</para>
</listitem>
</orderedlist><para>The file <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> is read when
the <command>pppd</command> daemon
encounters the option <literal>call</literal> <replaceable>peer-name</replaceable> on the command
line or in the other configuration
files.</para>
</sect2><sect2 id="pppsvrconfig.reference-30"><title>How PPP Configuration File
Privileges Work</title><para>Solaris PPP 4.0 configuration
includes the concept of <emphasis>privileges</emphasis>. Privileges determine
the precedence of configuration options,
particularly when the same option
is invoked in more than one place.
An option that is invoked from a privileged
source takes precedence over the same
option that is invoked from a nonprivileged
source.</para><sect3 id="pppsvrconfig.reference-3"><title>User Privileges</title><para>The only privileged user is
superuser (<literal>root</literal>),
with the UID of zero. All other users
are not privileged. </para>
</sect3><sect3 id="pppsvrconfig.reference-40"><title>File Privileges</title><itemizedlist><para>The following configuration
files are privileged regardless of
their ownership:</para><listitem><para><filename>/etc/ppp/options</filename></para>
</listitem><listitem><para><filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable></para>
</listitem><listitem><para><filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable></para>
</listitem>
</itemizedlist><para>The file <filename>$HOME/.ppprc</filename> is
owned by the user. Options that are
 read from <filename>$HOME/.ppprc</filename> and
from the command line are privileged
only if the user who is invoking <command>pppd</command> is <literal>root</literal>.</para><para>Arguments that follow the <literal>file</literal> option are privileged.</para>
</sect3><sect3 id="pppsvrconfig.reference-5"><title>Effects of Option Privileges</title><para>Some options require the
invoking user or source to be privileged
in order to work. Options that are
invoked on the command line are assigned
the privileges of the user who is
running the <command>pppd</command> command.
These options are not privileged unless
the user who is invoking <command>pppd</command> is <literal>root</literal>.</para><informaltable frame="topbot" pgwide="100"><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="colspec1" colwidth="34.40*"/><colspec colname="colspec2" colwidth="44.60*"/><colspec colname="colspec0" colwidth="71.02*"/><thead><row rowsep="1"><entry><para>Option</para>
</entry><entry><para>Status</para>
</entry><entry><para>Explanation</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>domain</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>linkname</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>noauth</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>nopam</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>pam</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>plugin</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>privgroup</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>allow-ip</literal> <replaceable>addresses</replaceable></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>name</literal> <replaceable>hostname</replaceable></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>plink</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>noplink</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>plumbed</literal></para>
</entry><entry><para>Privileged</para>
</entry><entry><para>Requires privileges for use.</para>
</entry>
</row><row><entry><para><literal>proxyarp</literal></para>
</entry><entry><para>Becomes privileged if <literal>noproxyarp</literal> has been specified</para>
</entry><entry><para>Cannot be overridden by an unprivileged
use.</para>
</entry>
</row><row><entry><para><literal>defaultroute</literal></para>
</entry><entry><para>Privileged if <literal>nodefaultroute</literal> is set in a privileged
file or by a privileged user</para>
</entry><entry><para>Cannot be overridden by an unprivileged
user.</para>
</entry>
</row><row><entry><para><literal>disconnect</literal></para>
</entry><entry><para>Privileged if set in a privileged
file or by a privileged user</para>
</entry><entry><para>Cannot be overridden by an unprivileged
user.</para>
</entry>
</row><row><entry><para><literal>bsdcomp</literal></para>
</entry><entry><para>Privileged if set in a privileged
file or by a privileged user</para>
</entry><entry><para>The nonprivileged user cannot
specify a code size that is larger
than the privileged user has specified.</para>
</entry>
</row><row><entry><para><literal>deflate</literal></para>
</entry><entry><para>Privileged if set in a privileged
file or by a privileged user</para>
</entry><entry><para>The nonprivileged user cannot
specify a code size that is larger
than the privileged user has specified.</para>
</entry>
</row><row><entry><para><literal>connect</literal></para>
</entry><entry><para>Privileged if set in a privileged
file or by a privileged user</para>
</entry><entry><para>Cannot be overridden by an nonprivileged
user.</para>
</entry>
</row><row><entry><para><literal>init</literal></para>
</entry><entry><para>Privileged if set in a privileged
file or by a privileged user</para>
</entry><entry><para>Cannot be overridden by an nonprivileged
user.</para>
</entry>
</row><row><entry><para><literal>pty</literal></para>
</entry><entry><para>Privileged if set in a privileged
file or by a privileged user</para>
</entry><entry><para>Cannot be overridden by an nonprivileged
user.</para>
</entry>
</row><row><entry><para><literal>welcome</literal></para>
</entry><entry><para>Privileged if set in a privileged
file or by a privileged user</para>
</entry><entry><para>Cannot be overridden by an nonprivileged
user.</para>
</entry>
</row><row><entry><para><replaceable>ttyname</replaceable></para>
</entry><entry><para>Privileged if set in a privileged
file</para><para>Not privileged if set in a nonprivileged
file</para>
</entry><entry><para>Opened with root permissions
regardless of who invokes <command>pppd</command>.</para><para>Opened with the privileges of
the user who invokes <command>pppd</command>.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect3>
</sect2><sect2 id="pppsvrconfig.reference-46"><title><filename>/etc/ppp/options</filename> Configuration
File</title><para>You use the <filename>/etc/ppp/options</filename> file to define global
options for all PPP communications
on the local machine. <filename>/etc/ppp/options</filename> is a privileged file. <filename>/etc/ppp/options</filename> should
be owned by root, although <command>pppd</command> does
not enforce this rule. Options that
you define in <filename>/etc/ppp/options</filename> have
precedence over definitions of the
same options in all other files and
the command line. </para><itemizedlist><para>Typical options that you might
use in <filename>/etc/ppp/options</filename> include
the following:</para><listitem><para><userinput>lock</userinput> &ndash;
Enables UUCP-style file locking</para>
</listitem><listitem><para><userinput>noauth</userinput> &ndash;
Indicates that the machine does not
authenticate callers</para>
</listitem>
</itemizedlist><note><para>The Solaris PPP 4.0 software
does not include a default <filename>/etc/ppp/options</filename> file. <command>pppd</command> does
not require the <filename>/etc/ppp/options</filename> file to work.  If a machine
does not have an <filename>/etc/ppp/options</filename> file, only <literal>root</literal> can
run <command>pppd</command> on that
machine. </para>
</note><para>You must create <filename>/etc/ppp/options</filename> by using a text editor,
as shown in <olink targetptr="ppp.dialin-53" remap="internal">How to Define
Communications Over the Serial Line</olink>.
If a machine does not require global
options, you can create an empty <filename>/etc/ppp/options</filename> file.
Then, both <literal>root</literal> and
regular users can run <command>pppd</command> on
the local machine.</para><sect3 id="ppp.reference-17"><title><filename>/etc/ppp/options.tmpl</filename> Template</title><para>The <filename>/etc/ppp/options.tmpl</filename> contains helpful comments
about the <filename>/etc/ppp/options</filename> file
plus three common options for the
global <filename>/etc/ppp/options</filename> file.</para><screen>lock
nodefaultroute
noproxyarp</screen><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="50*"/><colspec colwidth="50*"/><thead><row rowsep="1"><entry><para>Option</para>
</entry><entry><para>Definition</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>lock</literal></para>
</entry><entry><para>Enables UUCP-style file locking</para>
</entry>
</row><row><entry><para><literal>nodefaultroute</literal></para>
</entry><entry><para>Specifies that no default route
is defined</para>
</entry>
</row><row><entry><para><literal>noproxyarp</literal></para>
</entry><entry><para>Disallows <literal>proxyarp</literal></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>To use <filename>/etc/ppp/options.tmpl</filename> as the global options
file, rename <filename>/etc/ppp/options.tmpl</filename> to <filename>/etc/ppp/options</filename>. Then, modify the file
contents as needed by your site.</para>
</sect3><sect3 id="pppsvrconfig.reference-7"><title>Where to Find Examples of the <filename>/etc/ppp/options</filename> Files</title><itemizedlist><para>To find examples of the <filename>/etc/ppp/options</filename> file, refer to the following:</para><listitem><para>For a dial-out machine,
see <olink targetptr="ppp.dialin-53" remap="internal">How
to Define Communications Over the
Serial Line</olink>.</para>
</listitem><listitem><para>For a dial-in server,
see <olink targetptr="ppp.dialin-18" remap="internal">How
to Define Communications Over the
Serial Line (Dial-in Server)</olink>.</para>
</listitem><listitem><para>For PAP support on
a dial-in server, see <olink targetptr="ppp.auth-63" remap="internal">How to Add
PAP Support to the PPP Configuration
Files (Dial-in Server)</olink>.</para>
</listitem><listitem><para>For PAP support on
a dial-out machine, see <olink targetptr="ppp.auth-65" remap="internal">How to Add
PAP Support to the PPP Configuration
Files (Dial-out Machine)</olink>.</para>
</listitem><listitem><para>For CHAP support on
a dial-in server, see <olink targetptr="ppp.auth-68" remap="internal">How to Add
CHAP Support to the PPP Configuration
Files (Dial-in Server)</olink>.</para>
</listitem>
</itemizedlist>
</sect3>
</sect2><sect2 id="pppsvrconfig.reference-4"><title><filename>/etc/ppp/options</filename>.<replaceable>ttyname</replaceable> Configuration
File</title><para>You can configure the
characteristics of communications
on the serial line in the <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> 
file.  <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable>  is a privileged
file that is read by <command>pppd</command> after
parsing any existing <filename>/etc/ppp/options</filename> and existing <filename>$HOME/.ppprc</filename> files. Otherwise, <command>pppd</command> reads <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> 
after parsing <filename>/etc/ppp/options</filename>.</para><para><replaceable>ttyname</replaceable> is
used for both dial-up and leased-line
links. <replaceable>ttyname</replaceable> represents
a particular serial port on a machine,
such as <literal>cua/a</literal> or <literal>cua/b</literal>, where a modem or
ISDN TA might be attached. </para><para>When naming the <filename>/etc/ppp/options</filename>.<replaceable>ttyname</replaceable> file,
replace the slash (/) in the device
name with a dot (.). For example,
the <filename>options</filename> file
for device <literal>cua/b</literal> should
be named <filename>/etc/ppp/options.cua.b.</filename> </para><note><para>Solaris PPP 4.0 does not
require an <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable>  file to work
correctly. Your server might have
only  one serial line for PPP. Furthermore,
the server requires few options. In
this instance, you can specify any
required options in another configuration
file or on the command line.</para>
</note><sect3 id="pppsvrconfig.reference-50"><title>Using <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> on a Dial-in
Server</title><itemizedlist><para>For a dial-up link, you
might choose to create individual <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> files for every
serial port on a dial-in server with
a modem attached. Typical options
include the following:</para><listitem><para>IP address required
by the dial-in server</para><para>Set
this option if you require incoming
callers on serial port <replaceable>ttyname</replaceable> to use a particular
IP address. Your address space might
have a limited number of IP addresses
that are available for PPP in comparison
to the number of potential callers.
In this situation, consider assigning
an IP address to each serial interface
that is used for PPP on the dial-in
server. This assignment implements
dynamic addressing for PPP.</para>
</listitem><listitem><para><command>asyncmap</command> <replaceable>map-value</replaceable></para><para>The <command>asyncmap</command> option
maps control characters that cannot
be received over the serial line by
the particular modem or ISDN TA. When
the <literal>xonxoff</literal> option
is used, <command>pppd</command> automatically
sets an asyncmap of 0xa0000.</para><para><replaceable>map-value</replaceable> states,
in hexadecimal format, the control
characters that are problematic.</para>
</listitem><listitem><para><command>init "chat
-U</command> <command>-f /etc/ppp/mychat"</command></para><para>The <literal>init</literal> option
tells the modem to initialize communications
over the serial line by using the
information in the <command>chat</command> <option>U</option> command. The modem uses
the chat string in the file <filename>/etc/ppp/mychat</filename>.</para>
</listitem><listitem><para>Security parameters
that are listed in the <command>pppd</command>(1m)
man page</para>
</listitem>
</itemizedlist>
</sect3><sect3 id="pppsvrconfig.reference-6"><title>Using <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> on a Dial-out
Machine</title><para>For a dial-out system,
you can create an <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> file
for the serial port that is connected
to the modem, or choose not to use <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable>. </para><note><para>Solaris PPP 4.0 does not
require an <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable>  file to work
correctly. A  dial-out machine might
have only  one serial line for PPP.
Furthermore, the dial-out machine
 might require few options. You can
specify any required options in another
configuration file or on the command
line.</para>
</note>
</sect3><sect3 id="ppp.reference-18"><title><filename>options.ttya.tmpl</filename> Template
File</title><para>The <filename>/etc/ppp/options.ttya.tmpl</filename> file contains helpful
comments about the <filename>/etc/ppp/options.</filename><replaceable>tty-name</replaceable> file.
The template contains three common
options for the <filename>/etc/ppp/options.</filename><replaceable>tty-name</replaceable> file.</para><screen>38400 
asyncmap 0xa0000 
:192.168.1.1 </screen><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="40.75*"/><colspec colwidth="59.25*"/><thead><row rowsep="1"><entry><para>Option</para>
</entry><entry><para>Definition</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>38400</literal></para>
</entry><entry><para>Use this baud rate for port
ttya.</para>
</entry>
</row><row><entry><para><literal>asyncmap 0xa0000</literal></para>
</entry><entry><para>Assign the asyncmap value of
0xa0000 so that the local machine
can communicate with broken peers.</para>
</entry>
</row><row><entry><para><literal>:192.168.1.1</literal></para>
</entry><entry><para>Assign the IP address 192.168.1.1
to all peers that are calling in over
the link.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>To use <filename>/etc/ppp/options.ttya.tmpl</filename> at your site, rename <filename>/etc/ppp/options.tmpl</filename> to <filename>/etc/ppp/options.</filename><replaceable>ttya-name</replaceable>. Replace <replaceable>ttya-name</replaceable> with the name
of the serial port with the modem.
Then modify the file contents as needed
by your site.</para>
</sect3><sect3 id="pppsvrconfig.reference-9"><title>Where to Find Examples of the <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> Files</title><itemizedlist><para>To find examples of the <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> files,
refer to the following:</para><listitem><para>For a dial-out machine,
see <olink targetptr="ppp.dialin-53" remap="internal">How
to Define Communications Over the
Serial Line</olink>.</para>
</listitem><listitem><para>For a dial-in server,
see <olink targetptr="ppp.dialin-18" remap="internal">How
to Define Communications Over the
Serial Line (Dial-in Server)</olink>.</para>
</listitem>
</itemizedlist>
</sect3>
</sect2>
</sect1><sect1 id="enmzz"><title>Configuring
User-Specific Options</title><para>This section contains detailed
information about setting up users
on the dial-in server.</para><sect2 id="ennaa"><title>Configuring <command>$HOME/</command><filename>.ppprc</filename> on
a Dial-in Server</title><para>The <command>$HOME/</command><filename>.ppprc</filename> file is intended
for users who are configuring preferred
PPP options. As administrator, you
can also configure <command>$HOME/</command><filename>.ppprc</filename> for users.</para><para>The options in <command>$HOME/</command><filename>.ppprc</filename> are privileged only
when the user who is invoking the
file is privileged.</para><para>When a caller uses the <command>pppd</command> command to initiate a call,
the <filename>.ppprc</filename> file
is the second file that is checked
by the <filename>pppd</filename> daemon.</para><para>See <olink targetptr="pppsvrconfig.dialin-15" remap="internal">Setting
Up Users of the Dial-in Server</olink> for
instructions about setting up <command>$HOME/</command><filename>.ppprc</filename> on
the dial-in server.</para>
</sect2><sect2 id="ennac"><title>Configuring <filename>$HOME/.ppprc</filename> on a Dial-out
Machine</title><itemizedlist><para>The <command>$HOME/</command><filename>.ppprc</filename> file is not needed
on the dial-out machine for Solaris
PPP 4.0 to work correctly. Additionally,
you do not need to have a <command>$HOME/</command><filename>.ppprc</filename> on
a dial-out machine, except for special
circumstances. Create one or more <filename>.ppprc</filename> files if you do
the following:</para><listitem><para>Allow multiple users
with differing communications needs
to call remote peers from the same
machine. In such an instance, create
individual <filename>.ppprc</filename> files
in the home directories of each user
who must dial out.</para>
</listitem><listitem><para>Need to specify options
that control problems specific to
your link, such as disabling Van Jacobson
compression. See James Carlson's  <emphasis>PPP Design, Implementation, and Debugging</emphasis> and the <olink targetdoc="refman1m" targetptr="pppd-1m" remap="external"><citerefentry><refentrytitle>pppd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for assistance in troubleshooting
link problems.</para>
</listitem>
</itemizedlist><para>Because the <filename>.ppprc</filename> file
is most often used when configuring
a dial-in server, refer to <olink targetptr="ppp.dialin-10" remap="internal">How to Configure
Users of the Dial-in Server</olink> for
configuration instructions for <filename>.ppprc</filename>.</para>
</sect2>
</sect1><sect1 id="pppsvrconfig.reference-45"><title>Specifying Information for
Communicating With the Dial-in Server</title><para>To communicate with a dial-in
server, you need to gather information
about the server. Then edit a few
files. Most significantly, you must
configure the communications requirements
of all dial-in servers that the dial-out
machine needs to call. You can specify
options about a dial-in server, such
as an ISP phone number, in the <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> file. However,
the optimum place to configure peer
information is in <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> files.</para><sect2 id="pppsvrconfig.reference-56"><title><filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> File</title><note><para>The <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file
is not needed on the dial-out machine
for Solaris PPP 4.0 to work correctly.</para>
</note><para>Use the <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file to provide
information for communicating with
a particular peer. <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> allows
ordinary users to invoke preselected
privileged options that users are
not allowed to set.</para><para>For example, a nonprivileged
user cannot override the <literal>noauth</literal> option
if  <literal>noauth</literal> is specified
in the <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file. Suppose
the user wants to set up a link to <literal>peerB</literal>, which does not provide
authentication credentials. As superuser,
you can create a <filename>/etc/ppp/peers/peerB</filename> file that includes the <literal>noauth</literal> option. <literal>noauth</literal> indicates
that the local machine does not authenticate
calls from <literal>peerB</literal>.</para><para>The <command>pppd</command> daemon
reads <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> when <command>pppd</command> encounters the following
option: </para><screen>call  <replaceable>peer-name</replaceable></screen><para>You can create a <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file
for each target peer with which the
dial-out machine needs to communicate.
This practice is particularly convenient
for permitting ordinary users to invoke
special dial-out links without needing
root privileges.</para><itemizedlist><para>Typical options that you
specify in <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> include the
following:</para><listitem><para><command>user</command> <replaceable>user-name</replaceable></para><para>Supply <replaceable>user-name</replaceable> to the dial-in
server, as the login name of the dial-out
machine, when authenticating with
PAP or CHAP.</para>
</listitem><listitem><para><command>remotename</command> <replaceable>peer-name</replaceable></para><para>Use <replaceable>peer-name</replaceable> as the name
of the dial-in machine. <literal>remotename</literal> is used in conjunction
with PAP or CHAP authentication when
scanning the <filename>/etc/ppp/pap-secrets</filename> or <filename>/etc/ppp/chap-secrets</filename> files.</para>
</listitem><listitem><para><command>connect "chat</command> <emphasis>chat_script</emphasis><command>..."</command> </para><para>Open communication to
the dial-in server by using the instructions
in the chat script.</para>
</listitem><listitem><para><command>noauth</command></para><para>Do not authenticate the peer <replaceable>peer-name</replaceable> when initiating
communications.</para>
</listitem><listitem><para><command>noipdefault</command></para><para>Set the initial IP address that
is used in negotiating with the peer
to 0.0.0.0. Use <literal>noipdefault</literal> when
setting up a link to most ISPs to
help facilitate IPCP negotiation between
the peers.</para>
</listitem><listitem><para><command>defaultroute</command></para><para>Install a default IPv4 route
when IP is established on the link.</para>
</listitem>
</itemizedlist><para>See the <olink targetdoc="refman1m" targetptr="pppd-1m" remap="external"><citerefentry><refentrytitle>pppd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more options that might apply
to a specific target peer.</para>
</sect2><sect2 id="ppp.reference-19"><title><filename>/etc/ppp/peers/myisp.tmpl</filename> Template
File</title><para>The <filename>/etc/ppp/peers/myisp.tmpl</filename> file contains helpful
comments about the <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file.
The template concludes with common
options that you might use for an <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file:</para><screen>connect "/usr/bin/chat -f /etc/ppp/myisp-chat" 
user myname             
remotename myisp        
noauth                 
noipdefault             
defaultroute            
updetach                
noccp                   </screen><informaltable frame="topbot" pgwide="100"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="54.60*"/><colspec colwidth="45.40*"/><thead><row rowsep="1"><entry><para>Option</para>
</entry><entry><para>Definition</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>connect "/usr/bin/chat
-f /etc/ppp/myisp-chat"</literal></para>
</entry><entry><para>Call the peer by using the chat
script <filename>/etc/ppp/myisp-chat</filename>.</para>
</entry>
</row><row><entry><para><literal>user myname</literal></para>
</entry><entry><para>Use this account name for the
local machine. <literal>myname</literal> is
the name for this machine in the peer's <filename>/etc/ppp/pap-secrets</filename> file.</para>
</entry>
</row><row><entry><para><literal>remotename myisp</literal></para>
</entry><entry><para>Recognize <literal>myisp</literal> as
the name of the peer in the local
machine's <filename>/etc/ppp/pap-secrets</filename> file.</para>
</entry>
</row><row><entry><para><literal>noauth</literal></para>
</entry><entry><para>Do not require calling peers
to provide authentication credentials.</para>
</entry>
</row><row><entry><para><literal>noipdefault</literal> </para>
</entry><entry><para>Do not use a default IP address
for the local machine.</para>
</entry>
</row><row><entry><para><literal>defaultroute</literal></para>
</entry><entry><para>Use the default route that is
assigned to the local machine.</para>
</entry>
</row><row><entry><para><literal>updetach</literal></para>
</entry><entry><para>Log errors in the PPP log files,
rather than on the standard output.</para>
</entry>
</row><row><entry><para><literal>noccp</literal></para>
</entry><entry><para>Do not use CCP compression.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>To use <filename>/etc/ppp/peers/myisp.tmpl</filename> at your site, rename <filename>/etc/ppp/peers/myisp.tmpl</filename> to <filename>/etc/ppp/peers/.</filename><replaceable>peer-name</replaceable>. Replace <replaceable>peer-name</replaceable> with the name of the
peer to be called. Then modify the
file contents as needed by your site.</para>
</sect2><sect2 id="pppsvrconfig.reference-58"><title>Where to Find Examples of the <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> Files</title><itemizedlist><para>To find examples of the <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> files,
refer to the following:</para><listitem><para>For a dial-out machine,
see <olink targetptr="ppp.dialin-55" remap="internal">How
to Define the Connection With an Individual
Peer</olink>.</para>
</listitem><listitem><para>For a local machine
on a leased line, see <olink targetptr="ppp.leased-21" remap="internal">How to Configure
a Machine on a Leased Line</olink>.</para>
</listitem><listitem><para>For support of PAP
authentication on a dial-out machine,
see <olink targetptr="ppp.auth-65" remap="internal">How
to Add PAP Support to the PPP Configuration
Files (Dial-out Machine)</olink>.</para>
</listitem><listitem><para>For support of CHAP
authentication on a dial-out machine,
see <olink targetptr="ppp.auth-70" remap="internal">How
to Add CHAP Support to the PPP Configuration
Files (Dial-out Machine)</olink>.</para>
</listitem><listitem><para>For support of PPPoE
on a client system, see <olink targetptr="ppp.pppoe-2" remap="internal">Setting Up
the PPPoE Client</olink>.</para>
</listitem>
</itemizedlist>
</sect2>
</sect1><sect1 id="ppp.reference-65"><title>Configuring
Modem Speed for a Dial-up Link</title><itemizedlist><para>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:</para><listitem><para>Older SPARC systems &ndash;
Check the hardware documentation that
accompanies the system. Many <trademark>SPARCstation</trademark> machines require modem
speed not to exceed 38400 bps.</para>
</listitem><listitem><para><trademark class="registered">UltraSPARC</trademark> machines &ndash;
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.</para>
</listitem>
</itemizedlist><para>For a <emphasis>dial-out machine</emphasis>,
set the modem speed in the PPP configuration
files, such as <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable>, or by specifying
the speed as an option for <command>pppd</command>.</para><para>For a <emphasis>dial-in server</emphasis>,
you need to set the speed by using
the <command>ttymon</command> facility
or the Solaris Management Console,
as described in <olink targetptr="pppsvrconfig.dialin-53" remap="internal">Configuring
Devices on the Dial-in Server</olink>.</para>
</sect1><sect1 id="pppsvrconfig.reference-66"><title>Defining the Conversation on
the Dial-up Link</title><para>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.</para><sect2 id="pppsvrconfig.reference-11"><title>Contents of the Chat Script</title><para>Each remote peer that
the dial-out machine needs to connect
to probably requires its own chat
script.</para><note><para>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.</para>
</note><para>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. </para><para>An <emphasis>expect</emphasis> string
contains characters that the dial-out
host machine expects to receive from
the remote peer to initiate conversation.
A <emphasis>send</emphasis> string
contains characters that the dial-out
machine sends to the remote peer after
receiving the expect string.</para><itemizedlist><para>Information in the chat script
usually includes the following:</para><listitem><para>Modem commands, often
referred to as <emphasis>AT commands</emphasis>,
which enable the modem to transmit
data over the telephone</para>
</listitem><listitem><para>Phone number of the
target peer</para><para>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.</para>
</listitem><listitem><para>Time-out value, if
required</para>
</listitem><listitem><para>Login sequence that
is expected from the remote peer</para>
</listitem><listitem><para>Login sequence that
is sent by the dial-out machine</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="pppsvrconfig.reference-12"><title>Chat Script Examples</title><para>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. </para><sect3 id="pppsvrconfig.reference-67"><title>Basic Modem Chat Script</title><para>The following is a basic chat
script that you can use as a template
for creating your own chat scripts.</para><screen>ABORT   BUSY
ABORT   'NO CARRIER'
REPORT  CONNECT
TIMEOUT 10
"" AT&amp;F1M0&amp;M5S2=255
SAY     "Calling myserver\n"
TIMEOUT 60
OK      "ATDT1-123-555-1212"
ogin: pppuser
ssword: \q\U
% pppd</screen><para>The next table describes the
contents of the chat script.</para><informaltable frame="topbot" pgwide="100"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec2" colwidth="38.66*"/><colspec colname="colspec3" colwidth="61.34*"/><thead><row rowsep="1"><entry><para>Script Contents</para>
</entry><entry><para>Explanation</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>ABORT   BUSY</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>ABORT   'NO CARRIER'</literal></para>
</entry><entry><para>Abort transmission if the modem
reports <literal>ABORT   'NO CARRIER'</literal> when
dialing. The cause for this message
is usually a dialing or modem negotiation
failure.</para>
</entry>
</row><row><entry><para><literal>REPORT CONNECT</literal></para>
</entry><entry><para>Gather the <literal>CONNECT</literal> string
from the modem. Print the string.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 10</literal></para>
</entry><entry><para>Set initial timeout to 10 seconds.
The modem's response should be immediate.</para>
</entry>
</row><row><entry><para><literal>"" AT&amp;F1M0&amp;M5S2=255</literal></para>
</entry><entry><para><literal>M0</literal> &ndash;
Turn off the speaker during connect.</para><para><literal>&amp;M5</literal> &ndash;
Make the modem require error control. </para><para><literal>S2=255</literal> &ndash;
Disable the TIES &ldquo;+++&rdquo;
break sequence.</para>
</entry>
</row><row><entry><para><literal>SAY     "Calling myserver\n"</literal></para>
</entry><entry><para>Display the message <literal>Calling
myserver</literal> on the local machine.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 60</literal></para>
</entry><entry><para>Reset the timeout to 60 seconds
to allow more time for link negotiation.</para>
</entry>
</row><row><entry><para><literal>OK      "ATDT1-123-555-1212"</literal></para>
</entry><entry><para>Call the remote peer by using
the phone number 123-555-1212.</para>
</entry>
</row><row><entry><para><literal>ogin: pppuser</literal></para>
</entry><entry><para>Log in to the peer by using
UNIX-style login. Supply the user
name <literal>pppuser</literal>.</para>
</entry>
</row><row><entry><para><literal>ssword: \q\U</literal></para>
</entry><entry><para><literal>\q</literal> &ndash;
Do not log if debugging with the <option>v</option> option.</para><para><literal>\U</literal> &ndash;
Insert in this location the contents
of the string that follows <option>U</option>,
which is specified on the command
line.   Usually, the string contains
the password.</para>
</entry>
</row><row><entry><para><literal>% pppd</literal></para>
</entry><entry><para>Wait for the % shell prompt,
and run the <command>pppd</command> command.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect3><sect3 id="ppp.reference-20"><title><filename>/etc/ppp/myisp-chat.tmpl</filename> Chat
Script Template</title><para>Solaris PPP 4.0 includes the <filename>/etc/ppp/myisp-chat.tmpl</filename>,
which you can modify for use at your
site. <filename>/etc/ppp/myisp-chat.tmpl</filename> is
similar to the basic modem chat script
except that the template does not
include a login sequence.</para><screen>ABORT   BUSY
ABORT   'NO CARRIER'
REPORT  CONNECT
TIMEOUT 10
""      "AT&amp;F1"
OK      "AT&amp;C1&amp;D2"
SAY     "Calling myisp\n"
TIMEOUT 60
OK      "ATDT1-123-555-1212"
CONNECT \c</screen><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="38.91*"/><colspec colwidth="61.09*"/><thead><row rowsep="1"><entry><para>Script Contents</para>
</entry><entry><para>Explanation</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>ABORT   BUSY</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>ABORT   'NO CARRIER</literal></para>
</entry><entry><para>Abort transmission if the modem
reports <literal>ABORT   'NO CARRIER'</literal> when
dialing. The cause for this message
is usually a dialing or modem negotiation
failure.</para>
</entry>
</row><row><entry><para><literal>REPORT  CONNECT</literal></para>
</entry><entry><para>Gather the <literal>CONNECT</literal> string
from the modem. Print the string.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 10</literal></para>
</entry><entry><para>Set initial timeout to 10 seconds.
The modem's response should be immediate.</para>
</entry>
</row><row><entry><para><literal>""      "AT&amp;F1"</literal></para>
</entry><entry><para>Reset the modem to factory defaults.</para>
</entry>
</row><row><entry><para><literal>OK      "AT&amp;C1&amp;D2"</literal></para>
</entry><entry><para>Reset the modem so that, for
&amp;C1, DCD from the modem follows
carrier. If the remote side hangs
up the phone for some reason, then
the DCD drops.  </para><para>For &amp;D2, DTR high-to-low
transition causes the modem to go &ldquo;on-hook&rdquo;
or  hang up.</para>
</entry>
</row><row><entry><para><literal>SAY     "Calling myisp\n"</literal></para>
</entry><entry><para>Display the message &ldquo;Calling
myisp&rdquo; on the local machine.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 60</literal></para>
</entry><entry><para>Reset the timeout to 60 seconds
to allow more time for link negotiation.</para>
</entry>
</row><row><entry><para><literal>OK      "ATDT1-123-555-1212"</literal></para>
</entry><entry><para>Call the remote peer by using
the phone number 123-555-1212.</para>
</entry>
</row><row><entry><para><literal>CONNECT \c</literal></para>
</entry><entry><para>Wait for the <literal>CONNECT</literal> message
from the opposite peer's modem.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect3><sect3 id="pppsvrconfig.reference-13"><title>Modem Chat Script for Calling
an ISP</title><para>Use the next chat script as
a template for calling an ISP from
a dial-out machine with a U.S. Robotics
Courier modem.</para><screen>ABORT   BUSY
ABORT   'NO CARRIER'
REPORT  CONNECT
TIMEOUT 10
"" AT&amp;F1M0&amp;M5S2=255
SAY     "Calling myisp\n"
TIMEOUT 60
OK      "ATDT1-123-555-1212"
CONNECT \c
\r \d\c
SAY "Connected; running PPP\n"</screen><para>The following table describes
the contents of the chat script.</para><informaltable frame="topbot" pgwide="100"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec2" colwidth="38.66*"/><colspec colname="colspec3" colwidth="61.34*"/><thead><row rowsep="1"><entry><para>Script Contents</para>
</entry><entry><para>Explanation</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>ABORT BUSY</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>ABORT   'NO CARRIER'</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>REPORT CONNECT</literal></para>
</entry><entry><para>Gather the <literal>CONNECT</literal> string
from the modem.  Print the string.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 10</literal></para>
</entry><entry><para>Set initial timeout to 10 seconds.
The modem's response should be immediate.</para>
</entry>
</row><row><entry><para><literal>"" AT&amp;F1M0M0M0M0&amp;M5S2=255</literal></para>
</entry><entry><para><literal>M0</literal> &ndash;
Turn off the speaker during connect.</para><para><literal>&amp;M5</literal> &ndash;
Make the modem require error control. </para><para><literal>S2=255</literal> &ndash;
Disable the TIES &ldquo;+++&rdquo;
break sequence.</para>
</entry>
</row><row><entry><para><literal>SAY     "Calling myisp\n"</literal></para>
</entry><entry><para>Display the message <literal>Calling
myisp</literal> on the local machine.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 60</literal></para>
</entry><entry><para>Reset the timeout to 60 seconds
to allow more time for link negotiation.</para>
</entry>
</row><row><entry><para><literal>OK      "ATDT1-123-555-1212"</literal></para>
</entry><entry><para>Call the remote peer by using
the phone number 123-555-1212.</para>
</entry>
</row><row><entry><para><literal>CONNECT \c</literal></para>
</entry><entry><para>Wait for the <literal>CONNECT</literal> message
from the opposite peer's modem.</para>
</entry>
</row><row><entry><para><literal>\r \d\c</literal></para>
</entry><entry><para>Wait until the end of the <literal>CONNECT</literal> message.</para>
</entry>
</row><row><entry><para>SAY &ldquo;Connected; running
PPP\n&rdquo;</para>
</entry><entry><para>Display the informative message <literal>Connected; running PPP</literal> on
the local machine.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect3><sect3 id="pppsvrconfig.reference-14"><title>Basic Chat Script Enhanced
for a UNIX-Style Login</title><para>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 <olink targetptr="pppsvrconfig.dialin-50" remap="internal">How
to Create the Instructions for Calling
a Peer</olink>.</para><screen>        SAY "Calling the peer\n"
        TIMEOUT 10
        ABORT BUSY
        ABORT 'NO CARRIER'
        ABORT ERROR
        REPORT CONNECT
        "" AT&amp;F1&amp;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</screen><para>The following table explains
the parameters of the chat script.</para><informaltable frame="topbot" pgwide="100"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec4" colwidth="48.92*"/><colspec colname="colspec5" colwidth="51.08*"/><thead><row rowsep="1"><entry><para>Script Contents</para>
</entry><entry><para>Explanation</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>TIMEOUT 10</literal></para>
</entry><entry><para>Set initial timeout to 10 seconds.
The modem's response should be immediate.</para>
</entry>
</row><row><entry><para><literal>ABORT BUSY</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>ABORT 'NO CARRIER'</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>ABORT ERROR</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>REPORT CONNECT</literal></para>
</entry><entry><para>Gather the <literal>CONNECT</literal> string
from the modem. Print the string.</para>
</entry>
</row><row><entry><para><literal>"" AT&amp;F1&amp;M5S2=255</literal></para>
</entry><entry><para><literal>&amp;M5</literal> &ndash;
Make the modem require error control. </para><para><literal>S2=255</literal> &ndash;
Disable the TIES &ldquo;+++&rdquo;
break sequence.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 60</literal></para>
</entry><entry><para>Reset the timeout to 60 seconds
to allow more time for link negotiation.</para>
</entry>
</row><row><entry><para><literal>OK ATDT1-123-555-1234</literal></para>
</entry><entry><para>Call the remote peer by using
the phone number 123-555-1212.</para>
</entry>
</row><row><entry><para><literal>CONNECT \c</literal></para>
</entry><entry><para>Wait for the <literal>CONNECT</literal> message
from the opposite peer's modem.</para>
</entry>
</row><row><entry><para><literal>SAY "Connected; logging
in.\n"</literal></para>
</entry><entry><para>Display the informative message <literal>Connected; logging in</literal> to
give the user status.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 5</literal></para>
</entry><entry><para>Change the timeout to enable
quick display of the login prompt.</para>
</entry>
</row><row><entry><para><literal>ogin:--ogin: pppuser</literal></para>
</entry><entry><para>Wait for the login prompt. If
the prompt is not received, send a
RETURN and wait. Then, send the user
name <literal>pppuser</literal> 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.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 20</literal></para>
</entry><entry><para>Change the timeout to 20 seconds
to allow for slow password verification.</para>
</entry>
</row><row><entry><para><literal>ssword: \qmysecrethere</literal></para>
</entry><entry><para>Wait for the password prompt
from the peer. When the prompt is
received, send the password <literal>\qmysecrethere</literal>. The <literal>\q</literal> prevents
the password from being written to
the system log files.</para>
</entry>
</row><row><entry><para><literal>"% " \c</literal></para>
</entry><entry><para>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.</para>
</entry>
</row><row><entry><para><literal>SAY "Logged in.  Starting
PPP on peer system.\n"</literal></para>
</entry><entry><para>Display the informative message <literal>Logged in.  Starting PPP on peer system</literal> to
give the user status.</para>
</entry>
</row><row><entry><para><literal>ABORT 'not found'</literal></para>
</entry><entry><para>Abort the transmission if the
shell encounters errors.</para>
</entry>
</row><row><entry><para><literal>"" "exec pppd"</literal></para>
</entry><entry><para>Start <command>pppd</command> on
the peer.</para>
</entry>
</row><row><entry><para><literal>~ \c</literal></para>
</entry><entry><para>Wait for PPP to start on the
peer.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>Starting PPP right after the <literal>CONNECT \c</literal> is often called
a <emphasis>PAP login</emphasis> by
ISPs, though the PAP login is actually
not part of PAP authentication.</para><para>The phrase <literal>ogin:--ogin:
pppuser</literal> instructs the modem
to send the user name <literal>pppuser</literal> in
response to the login prompt  from
the dial-in server. <literal>pppuser</literal> is
a special PPP user account name that
was created for remote <literal>user1</literal> on
the dial-in server. For instructions
about creating PPP user accounts on
a dial-in server, refer to <olink targetptr="ppp.dialin-10" remap="internal">How to Configure
Users of the Dial-in Server</olink>.</para>
</sect3><sect3 id="pppsvrconfig.reference-15"><title>Chat Script for External ISDN
TA</title><para>The following chat script is
for calling from a dial-out machine
with a ZyXEL omni.net. ISDN TA.</para><screen>        SAY "Calling the peer\n"
        TIMEOUT 10
        ABORT BUSY
        ABORT 'NO CARRIER'
        ABORT ERROR
        REPORT CONNECT
        "" AT&amp;FB40S83.7=1&amp;K44&amp;J3X7S61.3=1S0=0S2=255
        OK ATDI18882638234
        CONNECT \c
        \r \d\c
        SAY "Connected; running PPP\n"</screen><para>The following table explains
the parameters of the chat script.</para><informaltable frame="topbot" pgwide="100"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec2" colwidth="53.04*"/><colspec colname="colspec3" colwidth="46.96*"/><thead><row rowsep="1"><entry><para>Script Contents</para>
</entry><entry><para>Explanation</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>SAY "Calling the peer"</literal></para>
</entry><entry><para>Display this message on the
screen of the dial-out machine.</para>
</entry>
</row><row><entry><para><literal>TIMEOUT 10</literal></para>
</entry><entry><para>Set the initial timeout to 10
seconds.</para>
</entry>
</row><row><entry><para><literal>ABORT BUSY</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>ABORT 'NO CARRIER'</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>ABORT ERROR</literal></para>
</entry><entry><para>Abort transmission if the modem
receives this message from the opposite
peer.</para>
</entry>
</row><row><entry><para><literal>REPORT CONNECT</literal> </para>
</entry><entry><para>Gather the <literal>CONNECT</literal> string
from the modem. Print the string.</para>
</entry>
</row><row><entry><para><literal>"" AT&amp;FB40S83.7=1&amp;K44&amp;J3X7S61.3=1S0=0S2=255</literal></para>
</entry><entry><para>The letters in this line have
the following meaning:</para><itemizedlist><listitem><para><literal>&amp;F</literal> &ndash;
Use factory default</para>
</listitem><listitem><para><literal>B40</literal> &ndash;
Do asynchronous PPP conversion</para>
</listitem><listitem><para><literal>S83.7=1</literal> &ndash;
Use data over speech bearer</para>
</listitem><listitem><para><literal>&amp;K44</literal> &ndash;
Enable CCP compression</para>
</listitem><listitem><para><literal>&amp;J3</literal> &ndash;
Enable MP</para>
</listitem><listitem><para><literal>X7</literal> &ndash;
Report DCE side rates</para>
</listitem><listitem><para><literal>S61.3=1</literal> &ndash;
Use packet fragmentation</para>
</listitem><listitem><para><literal>S0=0</literal> &ndash;
No auto answer</para>
</listitem><listitem><para><literal>S2=255</literal> &ndash;
Disable TIES escape</para>
</listitem>
</itemizedlist>
</entry>
</row><row><entry><para><literal>OK ATDI18882638234</literal></para>
</entry><entry><para>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 &ldquo;+<replaceable>nnnn</replaceable>.&rdquo;. <replaceable>nnnn</replaceable> represents the
second phone number.</para>
</entry>
</row><row><entry><para><literal>CONNECT \c</literal></para>
</entry><entry><para>Wait for the <literal>CONNECT</literal> message from the opposite
peer's modem.</para>
</entry>
</row><row><entry><para><literal>\r \d\c</literal></para>
</entry><entry><para>Wait until the end of the <literal>CONNECT</literal> message.</para>
</entry>
</row><row><entry><para><literal>SAY "Connected; running
PPP\n"</literal></para>
</entry><entry><para>Display this message on the
screen of the dial-out machine.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>Refer to the <olink targetdoc="refman1m" targetptr="chat-1m" remap="external"><citerefentry><refentrytitle>chat</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for descriptions of options and
other detailed information about the
chat script. For an explanation of
expect-send strings, refer to <olink targetptr="uucpov-25" remap="internal">Chat-Script
Field in /etc/uucp/Systems File</olink>. </para>
</sect3><sect3 id="pppsvrconfig.reference-54"><title>For More Chat Script Examples</title><para>A number of web sites offer
sample chat scripts and assistance
in creating the chat scripts. For
example, see <ulink url="http://ppp.samba.org/ppp/index.html" type="text">http://ppp.samba.org/ppp/index.html</ulink>.</para>
</sect3>
</sect2><sect2 id="pppsvrconfig.reference-68"><title>Invoking the Chat Script</title><para>You call chat scripts
by using the <command>connect</command> option.
You can use <command>connect "chat
..."</command> in any PPP configuration
file or on the command line. </para><para>Chat scripts are not executable,
but the program that is invoked by <command>connect</command> must be executable.
You might use the chat utility as
the program to be invoked by <command>connect</command>. In this instance, if you
store the chat script in an external
file through the <option>f</option> option,
then your chat script file is not
executable.</para><para>The <literal>chat</literal> program that is described
in <command>chat</command>(1m) executes
the actual chat script. The <command>pppd</command> daemon invokes the <command>chat</command> program whenever <command>pppd</command> encounters the <command>connect
"chat ..."</command> option.</para><note><para>You can use any external
program, such as <command>Perl</command> or <command>Tcl</command>, to create advanced
chat scripts. Solaris PPP 4.0 provides
the <command>chat</command> utility
as a convenience.</para>
</note>
</sect2><task id="ppp.reference-2"><title>How
to Invoke a Chat Script (Task)</title><procedure><step id="pppsvrconfig.reference-step-41"><para>Create the chat script as an
ASCII file. </para>
</step><step id="pppsvrconfig.reference-step-40"><para>Invoke the chat script in any
PPP configuration file by using the
following syntax:</para><screen>connect 'chat  -f <replaceable>/etc/ppp/chatfile</replaceable>'</screen><para>The <command>-f</command> flag
indicates that a file name is to follow. <replaceable>/etc/ppp/chatfile</replaceable> represents
the name of the chat file.</para>
</step><step id="pppsvrconfig.reference-step-15"><para>Give read permission for the
external chat file to the user who
 runs the <command>pppd</command> command.</para><caution><para>The chat program always
runs with the user's privileges, even
if the <command>connect 'chat ...'</command> option
is invoked from a privileged source.
Thus, a separate chat file that is
read with the <literal>-f</literal> 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.</para>
</caution>
</step>
</procedure><example><title>Inline Chat Script</title><para>You can place the entire chat
script conversation on a single line,
similar to the following:</para><screen>connect 'chat "" "AT&amp;F1" OK ATDT5551212 CONNECT "\c"'</screen><para>The complete chat script  follows
the <literal>chat</literal> keyword.
The script terminates with <literal>"\c"'</literal>. You use this form in any
PPP configuration file or on the command
line as an argument to <command>pppd</command>.</para>
</example><taskrelated-custom><title>Chat Script
in an External File</title><para>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.</para><para>The procedure <olink targetptr="pppsvrconfig.dialin-50" remap="internal">How
to Create the Instructions for Calling
a Peer</olink> shows the use of a
chat script that is contained in an
external file.</para>
</taskrelated-custom>
</task><sect2 id="ppp.reference-43"><title>Creating
a Chat File That Is Executable</title><para>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 <command>stty</command> for
parity settings, besides the commands
that are contained in a traditional
chat script.</para><para>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.</para><screen>#!/bin/sh
chat "" "AT&amp;F1" OK "ATDT555-1212" CONNECT "\c"
stty evenp
chat ogin: pppuser ssword: "\q\U" % "exec pppd"
stty -evenp</screen>
</sect2><task id="ppp.reference-3"><title>How
to Create an Executable Chat Program</title><procedure><step id="ppp.reference-step-34"><para>Use
your text editor to create an executable
chat program, such as the previous
example.</para>
</step><step id="ppp.reference-step-35"><para>Make
the chat program executable.</para><screen># chmod +x /etc/ppp/<replaceable>chatprogram</replaceable></screen>
</step><step id="ppp.reference-step-36"><para>Invoke
the chat program.</para><screen>connect /etc/ppp/<replaceable>chatprogram</replaceable></screen><para>Chat programs do not have to
be located within the <filename>/etc/ppp</filename> file
system. You can store chat programs
in any location.</para>
</step>
</procedure>
</task>
</sect1><sect1 id="pppsvrconfig.reference-17"><title>Authenticating Callers on a
Link</title><para>This section explains how the
PPP authentication protocols work
and explains the databases that are
associated with the authentication
protocols.</para><sect2 id="pppsvrconfig.intro-8"><title>Password
Authentication Protocol (PAP)</title><para>PAP authentication is
somewhat similar in operation to the
UNIX <command>login</command> program,
though PAP does not grant shell access
to the user. PAP uses the PPP configuration
files and PAP database in the form
of the <filename>/etc/ppp/pap-secrets</filename> file
for setting up authentication. PAP
also uses <filename>/etc/ppp/pap-secrets</filename> for
defining PAP security credentials.
These credentials include a peer name,
a &ldquo;user name&rdquo; in PAP parlance,
and a password. PAP credentials also
contain related information for each
caller who is permitted to link to
the local machine. The PAP user names
and passwords can be identical to
or different from the UNIX user names
and passwords in the password database.</para><sect3 id="pppsvrconfig.reference-25"><title><filename>/etc/ppp/pap-secrets</filename> File</title><para>The PAP database is implemented
in the <filename>/etc/ppp/pap-secrets</filename> file.
Machines on both sides of the PPP
link must have properly configured
PAP credentials in their <filename>/etc/ppp/pap-secrets</filename> files for successful authentication.
The caller (authenticatee) supplies
credentials in the <literal>user</literal> and <literal>password</literal> columns of the <filename>/etc/ppp/pap-secrets</filename> file
or in the obsolete <literal>+ua</literal> file.
The server (authenticator) validates
these credentials against information
in <filename>/etc/ppp/pap-secrets</filename>,
through the UNIX <filename>passwd</filename> database,
or in the PAM facility.</para><para>The <filename>/etc/ppp/pap-secrets</filename> file has the following
syntax.</para><screen>myclient ISP-server mypassword *</screen><para>The parameters have the following
meaning.</para><variablelist><varlistentry><term><literal>myclient</literal></term><listitem><para>PAP user name of the
caller. Often, this name is identical
to the caller's UNIX user name, particularly
if the dial-in server uses the <literal>login</literal> option of PAP.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ISP-server</literal></term><listitem><para>Name of the remote
machine, often a dial-in server.</para>
</listitem>
</varlistentry><varlistentry><term><literal>mypassword</literal></term><listitem><para>Caller's PAP password.</para>
</listitem>
</varlistentry><varlistentry><term><literal>*</literal></term><listitem><para>IP address that is
associated with the caller. Use an
asterisk (*) to indicate any IP address.</para>
</listitem>
</varlistentry>
</variablelist>
</sect3><sect3 id="egkab"><title>Creating
PAP Passwords</title><itemizedlist><para>PAP passwords are sent
over the link  <emphasis>in the clear</emphasis>,
that is,  in readable ASCII format.
For the caller (authenticatee), the
PAP password must be stored in the
clear in any of the following locations:</para><listitem><para>In <filename>/etc/ppp/pap-secrets</filename></para>
</listitem><listitem><para>In another external
file</para>
</listitem><listitem><para>In a named pipe through
the <filename>pap-secrets</filename> @
feature</para>
</listitem><listitem><para>As an option to <command>pppd</command>, either on the command
line or in a PPP configuration file</para>
</listitem><listitem><para>Through the <filename>+ua</filename> file</para>
</listitem>
</itemizedlist><itemizedlist><para>On the server (authenticator),
the PAP password can be hidden by
doing one of the following:</para><listitem><para>Specifying <command>papcrypt</command> and using passwords that
are hashed by <command>crypt</command>(3C)
in the <filename>pap-secrets</filename> file.</para>
</listitem><listitem><para>Specifying the <literal>login</literal> option to <command>pppd</command> and
omitting the password from the <filename>pap-secrets</filename> file by placing
double quotes (<literal>""</literal>)
in the password column. In this instance,
authentication is performed through
the UNIX passwd database or the <command>pam</command>(3pam) mechanism.</para>
</listitem>
</itemizedlist>
</sect3><sect3 id="pppsvrconfig.reference-18"><title>What Happens During PAP Authentication</title><para>PAP authentication occurs
in the following sequence.</para><figure id="pppsvrconfig.reference-fig-19"><title>PAP Authentication Process</title><mediaobject><imageobject><imagedata entityref="PAP-auth-pro.eps"/>
</imageobject><textobject><simpara>The following
context describes the sequence that
is shown in the flow diagram.</simpara>
</textobject>
</mediaobject>
</figure><orderedlist><listitem><para>The caller (authenticatee)
calls the remote peer (authenticator)
and provides its PAP user name and
password as part of link negotiation.</para>
</listitem><listitem><para>The peer verifies
the identity of the caller in its <filename>/etc/ppp/pap-secrets</filename> file.
If the peer uses the <command>login</command> option
of PAP, the peer verifies the caller's
user name and password in its password
database.</para>
</listitem><listitem><para>If authentication
is successful, the peer continues
link negotiation with the caller.
If authentication fails, the link
is dropped.</para>
</listitem><listitem><para>(Optional) If the
caller authenticates responses from
remote peers, the remote peer must
send its own PAP credentials to the
caller. Thus, the remote peer becomes
the authenticatee and the caller the
authenticator. </para>
</listitem><listitem><para>(Optional) The original
caller reads its own <filename>/etc/ppp/pap-secrets</filename> to verify the identity
of the remote peer.</para><note><para>If the original caller
does require authentication credentials
from the remote peer, Step 1 and Step
4 happen in parallel.</para>
</note><para>If the peer is authenticated,
negotiation continues. Otherwise,
the link is dropped.</para>
</listitem><listitem><para>Negotiation between
caller and peer continues until the
link is successfully established.</para>
</listitem>
</orderedlist>
</sect3><sect3 id="pppsvrconfig.reference-20"><title>Using the <command>login</command> Option
With <filename>/etc/ppp/pap-secrets</filename></title><para>You can add the <command>login</command> option
for authenticating PAP credentials
to any PPP configuration file. When <command>login</command> is specified, for
example, in <filename>/etc/ppp/options</filename>, <command>pppd</command> verifies that the caller's
PAP credentials exist in the Solaris
password database. The following shows
the format of a <filename>/etc/ppp/pap-secrets</filename> file with the <command>login</command> option.</para><screen>joe    *  ""  *
sally  *  ""  *
sue    *  ""  *</screen><para>The parameters have the following
meanings.</para><variablelist><varlistentry><term>Caller</term><listitem><para><literal>joe</literal>, <literal>sally</literal>, and <literal>sue</literal> are
the names of the authorized callers.</para>
</listitem>
</varlistentry><varlistentry><term>Server</term><listitem><para>Asterisk (*), which
indicates that any server name is
valid. The <literal>name</literal> option
is not required in the PPP configuration
files.</para>
</listitem>
</varlistentry><varlistentry><term>Password</term><listitem><para>Double quotes, which
indicate that any password is valid.</para><para>If a password is in this column,
then the password from the peer must
match both the PAP password and the
UNIX <command>passwd</command> database.</para>
</listitem>
</varlistentry><varlistentry><term>IP Addresses</term><listitem><para>Asterisk (*), which
indicates that any IP address is allowed.</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2><sect2 id="pppsvrconfig.reference-21"><title>Challenge-Handshake Authentication
Protocol (CHAP)</title><para>CHAP authentication uses
the notion of the <emphasis>challenge</emphasis> and <emphasis>response</emphasis>, which means that
the peer (authenticator) challenges
the caller (authenticatee) to prove
its identity. The challenge includes
a random number and a unique ID that
is generated by the authenticator.
The caller must use the ID, random
number, and its CHAP security credentials
to generate the proper response (handshake)
to send to the peer.</para><para>CHAP security credentials include
a CHAP user name and a CHAP &ldquo;secret.&rdquo;
The CHAP secret is
an arbitrary string that is known
to both the caller and the peer before
they negotiate a PPP link. You configure
CHAP security credentials in the CHAP
database, <filename>/etc/ppp/chap-secrets</filename>. </para><sect3 id="pppsvrconfig.reference-250"><title><filename>/etc/ppp/chap-secrets</filename> File</title><para>The CHAP database is implemented
in the <filename>/etc/ppp/chap-secrets</filename> file.
Machines on both sides of the PPP
link must have each others' CHAP credentials
in their <filename>/etc/ppp/chap-secrets</filename> files
for successful authentication. </para><note><para>Unlike PAP, the shared
secret must be in the clear on both
peers. You cannot use crypt, PAM,
or the PPP login option with CHAP.</para>
</note><para>The <filename>/etc/ppp/chap-secrets</filename> file has the following
syntax.</para><screen>myclient myserver secret5748 *</screen><para>The parameters have the following
meanings:</para><variablelist><varlistentry><term><literal>myclient</literal></term><listitem><para>CHAP user name of
the caller. This name can be the same
as or different from the caller's
UNIX user name.</para>
</listitem>
</varlistentry><varlistentry><term><literal>myserver</literal></term><listitem><para>Name of the remote
machine, often a dial-in server.</para>
</listitem>
</varlistentry><varlistentry><term><literal>secret5748</literal></term><listitem><para>Caller's CHAP secret.</para><note><para>Unlike PAP passwords,
CHAP secrets are never sent over the
link. Rather, CHAP secrets are used
when the local machines compute the
response.</para>
</note>
</listitem>
</varlistentry><varlistentry><term><literal>*</literal></term><listitem><para>IP address that is
associated with the caller. Use an
asterisk (*) to indicate any IP address.</para>
</listitem>
</varlistentry>
</variablelist>
</sect3><sect3 id="pppsvrconfig.reference-22"><title>What Happens During CHAP Authentication</title><para>CHAP authentication occurs in
the following sequence.</para><figure id="pppsvrconfig.reference-fig-23"><title>CHAP Authentication Sequence</title><mediaobject><imageobject><imagedata entityref="chap.diagram"/>
</imageobject><textobject><simpara>The following
context describes the sequence that
is shown in the flow diagram.</simpara>
</textobject>
</mediaobject>
</figure><orderedlist><listitem><para>Two peers that are
about to initiate communications agree
on a secret to be used for authentication
during negotiation of a PPP link. </para>
</listitem><listitem><para>The administrators of
both machines add the secret, CHAP
user names, and other CHAP credentials
to the <filename>/etc/ppp/chap-secrets</filename> database
of their respective machines.</para>
</listitem><listitem><para>The caller (authenticatee)
calls the remote peer (authenticator).</para>
</listitem><listitem><para>The authenticator
generates a random number and an ID,
and sends this data to the authenticatee
as a challenge. </para>
</listitem><listitem><para>The authenticatee
looks up the peer's name and secret
in its <filename>/etc/ppp/chap-secrets</filename> database.</para>
</listitem><listitem><para>The authenticatee
calculates a response by applying
the MD5 computational algorithm to
the secret and the peer's random number
challenge. Then the authenticatee
sends the results as its response
to the authenticator.</para>
</listitem><listitem><para>The authenticator
looks up the authenticatee's name
and secret in its <filename>/etc/ppp/chap-secrets</filename> database.</para>
</listitem><listitem><para>The authenticator
calculates its own figure by applying
MD5 to the number that was generated
as the challenge and the secret for
the authenticatee in <filename>/etc/ppp/chap-secrets</filename>.</para>
</listitem><listitem><para>The authenticator
compares its results with the response
from the caller. If the two numbers
are the same, the peer has successfully
authenticated the caller, and link
negotiation continues. Otherwise the
link is dropped.</para>
</listitem>
</orderedlist>
</sect3>
</sect2>
</sect1><sect1 id="ppp.reference-39"><title>Creating
an IP Addressing Scheme for Callers</title><para>Consider creating one or more
IP addresses for all incoming calls
instead of assigning a unique IP address
to each remote user. Dedicated IP
addresses are particularly important
if the number of potential callers
exceeds the number of serial ports
and modems on the dial-in server.
You can implement a number of different
scenarios, depending on your site's
needs. Moreover, the scenarios are
not mutually exclusive.</para><sect2 id="ppp.reference-44"><title>Assigning
Dynamic IP Addresses to Callers</title><para>Dynamic addressing involves
the assignment to each caller of the
IP address that is defined in <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable>.
Dynamic addressing occurs on a per-serial
port basis. When a call arrives over
a  serial line, the caller receives
the IP address in the <filename>/etc/ppp/options.</filename><replaceable>ttyname</replaceable> file
for the call's serial interface.</para><itemizedlist><para>For example, suppose a dial-in
server has four serial interfaces
that provide dial-up service to incoming
calls:</para><listitem><para>For serial port <literal>term/a</literal>, create the file <filename>/etc/ppp/options.term.a</filename> with
the following entry:</para><screen>:10.1.1.1</screen>
</listitem><listitem><para>For serial port <literal>term/b</literal>, create the file <filename>/etc/ppp/options.term.b</filename> with
the following entry:</para><screen>:10.1.1.2</screen>
</listitem><listitem><para>For serial port <literal>term/c</literal>, create the file <filename>/etc/ppp/options.term.c</filename> with
the following entry:</para><screen>:10.1.1.3</screen>
</listitem><listitem><para>For serial port <literal>term/d</literal>, create the file <filename>/etc/ppp/options.term.d</filename> with
the following entry:</para><screen>:10.1.1.4</screen>
</listitem>
</itemizedlist><para>With the previous addressing
scheme, an incoming call on serial
interface <literal>/dev/term/c</literal> is
given the IP address 10.1.1.3 for
the duration of the call. After the
first caller hangs up, a later call
that comes in over serial interface <literal>/dev/term/c</literal> is also given
the IP address 10.1.1.3.</para><itemizedlist><para>The advantages of dynamic addressing
include the following:</para><listitem><para>You can track PPP
network usage down to the serial port.</para>
</listitem><listitem><para>You can assign a minimum
number of IP addresses for PPP use.</para>
</listitem><listitem><para>You can administer
IP filtering in a more simplified
fashion.</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="ppp.reference-41"><title>Assigning
Static IP Addresses to Callers</title><para>If your site implements
PPP authentication, you can assign
specific, <emphasis>static</emphasis> IP
addresses to individual callers. In
this scenario, every time a dial-out
machine calls the dial-in server,
the caller receives the same IP address. </para><para>You implement static addresses
in either the pap-secrets or chap-secrets
database. Here is a example of an <filename>/etc/ppp/pap-secrets</filename> file
that defines static IP addresses.</para><screen>joe    myserver  joepasswd   10.10.111.240
sally  myserver  sallypasswd 10.10.111.241
sue    myserver  suepasswd   10.10.111.242</screen><variablelist><varlistentry><term>Caller</term><listitem><para><literal>joe</literal>, <literal>sally</literal>, and <literal>sue</literal> are
the names of the authorized callers.</para>
</listitem>
</varlistentry><varlistentry><term>Server</term><listitem><para><literal>myserver</literal> indicates
the name of the server.</para>
</listitem>
</varlistentry><varlistentry><term>Password</term><listitem><para><literal>joepasswd</literal>, <literal>sallypasswd</literal>, and <literal>suepasswd</literal> indicate the passwords
for each caller.</para>
</listitem>
</varlistentry><varlistentry><term>IP Addresses</term><listitem><para><literal>10.10.111.240</literal> and <literal>10.10.111.241</literal> and <literal>10.10.111.242</literal> are the IP addresses assigned
to each caller.</para>
</listitem>
</varlistentry>
</variablelist><para>Here is a example of an <filename>/etc/ppp/chap-secrets</filename> file that defines static
IP addresses.</para><screen>account1 myserver secret5748  10.10.111.244
account2 myserver secret91011 10.10.111.245</screen><variablelist><varlistentry><term>Caller</term><listitem><para><literal>account1</literal> and <literal>account2</literal> indicate the names
of the callers.</para>
</listitem>
</varlistentry><varlistentry><term>Server</term><listitem><para><literal>myserver</literal> indicates
the name of the server for each caller.</para>
</listitem>
</varlistentry><varlistentry><term>Password</term><listitem><para><literal>secret5748</literal> and <literal>secret91011</literal> indicates the
CHAP secret for each caller.</para>
</listitem>
</varlistentry><varlistentry><term>IP Addresses</term><listitem><para><literal>10.10.111.244</literal> and <literal>10.10.111.245</literal> are the IP
addresses for each caller.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2><sect2 id="ppp.reference-42"><title>Assigning
IP Addresses by sppp Unit Number</title><para>If you are using either PAP
or CHAP authentication, you can assign
IP addresses to callers by the <literal>sppp</literal> unit number. The following
shows an example of this usage.</para><screen>myclient ISP-server mypassword 10.10.111.240/28+</screen><itemizedlist><para>The plus sign (+) indicates
that the unit number is added to the
IP address. Note the following: </para><listitem><para>Addresses <literal>10.10.111.240</literal> through <literal>10.10.111.255</literal> are assigned to remote
users.</para>
</listitem><listitem><para><literal>sppp0</literal> gets
IP address <literal>10.10.111.240</literal>.</para>
</listitem><listitem><para><literal>sppp1</literal> gets
IP address <literal>10.10.111.241</literal> and
so on.</para>
</listitem>
</itemizedlist>
</sect2>
</sect1><sect1 id="ppp.reference-45"><title>Creating
PPPoE Tunnels for DSL Support</title><para>By using PPPoE, you can provide
PPP over high-speed digital services
to multiple clients that are using
one or more DSL modems. PPPoE implements
these services by creating an Ethernet
tunnel through three participants:
the enterprise, the telephone company,
and the service provider.</para><itemizedlist><listitem><para>For an overview and
description of how PPPoE works, see <olink targetptr="ppp.intro-20" remap="internal">PPPoE Overview</olink>.</para>
</listitem><listitem><para>For tasks for setting
up PPPoE tunnels, see <olink targetptr="ppp.pppoe-1" remap="internal">Chapter&nbsp;20,
Setting Up a PPPoE Tunnel (Tasks)</olink>.</para>
</listitem>
</itemizedlist><para>This section contains
detailed information about PPPoE commands
and files, which is summarized in
the next table.</para><table frame="topbot" pgwide="100" id="ppp.intro-tbl-26"><title>PPPoE
Commands and Configuration Files</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="40*"/><colspec colname="colspec1" colwidth="63.40*"/><colspec colname="colspec2" colwidth="60*"/><thead><row rowsep="1"><entry><para>File or Command </para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para><filename>/etc/ppp/pppoe</filename></para>
</entry><entry><para>A file that contains characteristics
that are applied by default to all
tunnels that were set up by PPPoE
on the system</para>
</entry><entry><para><olink targetptr="ppp.reference-52" remap="internal">/etc/ppp/pppoe File</olink></para>
</entry>
</row><row><entry><para><filename>/etc/ppp/pppoe.</filename><replaceable>device</replaceable></para>
</entry><entry><para>A file that contains characteristics
of a particular interface that is
used by PPPoE for a tunnel</para>
</entry><entry><para><olink targetptr="ppp.reference-56" remap="internal">/etc/ppp/pppoe.device File</olink></para>
</entry>
</row><row><entry><para><filename>/etc/ppp/pppoe.if</filename></para>
</entry><entry><para>File that lists the Ethernet
interface over which runs the tunnel
that is set up by PPPoE</para>
</entry><entry><para><olink targetptr="ppp.reference-51" remap="internal">/etc/ppp/pppoe.if File</olink></para>
</entry>
</row><row><entry><para><filename>/usr/sbin/sppptun</filename></para>
</entry><entry><para>Command for configuring the
Ethernet interfaces that are involved
in a PPPoE tunnel</para>
</entry><entry><para><olink targetptr="ppp.reference-49" remap="internal">/usr/sbin/sppptun Command</olink></para>
</entry>
</row><row><entry><para><filename>/usr/lib/inet/pppoed</filename> </para>
</entry><entry><para>Command and options for using
PPPoE to set up a tunnel</para>
</entry><entry><para><olink targetptr="ppp.reference-48" remap="internal">/usr/lib/inet/pppoed Daemon</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table><sect2 id="ppp.reference-50"><title>Files
for Configuring Interfaces for PPPoE</title><para>The interfaces that are used
at either end of the PPPoE tunnel
must be configured before the tunnel
can support PPP communications. Use <filename>/usr/sbin/sppptun</filename> and <filename>/etc/ppp/pppoe.if</filename> files
for this purpose. You must use these
tools to configure Ethernet interfaces
on all Solaris PPPoE clients and PPPoE
access servers.</para><sect3 id="ppp.reference-51"><title><filename>/etc/ppp/pppoe.if</filename> File</title><para>The <filename>/etc/ppp/pppoe.if</filename> file lists the names of
all Ethernet interfaces on a host
to be used for the PPPoE tunnels.
This file is processed during system
boot when the interfaces that are
listed are plumbed for use in PPPoE
tunnels.</para><para>You need to create explicitly <filename>/etc/ppp/pppoe.if</filename>. Type
the name of one interface to be configured
for PPPoE on each line.</para><para>The following example
shows an <filename>/etc/ppp/pppoe.if</filename> file
for a server that offers three interfaces
for PPPoE tunnels.</para><screen># <userinput>cat /etc/ppp/pppoe.if</userinput>
hme1
hme2
hme3</screen><para>PPPoE clients usually have only
one interface that is listed in <filename>/etc/ppp/pppoe.if</filename>.</para>
</sect3><sect3 id="ppp.reference-49"><title><command>/usr/sbin/sppptun</command> Command</title><para>You can use the <command>/usr/sbin/sppptun</command> command to manually plumb
and unplumb the Ethernet interfaces
to be used for PPPoE tunnels. By contrast, <filename>/etc/ppp/pppoe.if</filename> is only
read when the system boots. These
interfaces should correspond to the
interfaces that are listed in <filename>/etc/ppp/pppoe.if</filename>.</para><para><command>sppptun</command> plumbs
the Ethernet interfaces that are used
in PPPoE tunnels in a manner that
is similar to the <command>ifconfig</command> command.
Unlike <command>ifconfig</command>,
you must plumb interfaces twice to
support PPPoE because two Ethernet
protocol numbers are involved.</para><para>The basic syntax for <command>sppptun</command> is as follows:</para><screen><userinput># /usr/sbin/sppptun plumb pppoed</userinput> <replaceable>device-name</replaceable>
     <replaceable>device-name</replaceable>:pppoed
<userinput># /usr/sbin/sppptun plumb pppoe</userinput> <filename>device-name</filename>
     <replaceable>device-name</replaceable>:pppoe</screen><para>In this syntax, <replaceable>device-name</replaceable> is the name of the
device to be plumbed for PPPoE.</para><para>The first time that you issue
the <command>sppptun</command> command,
the discovery protocol <command>pppoed</command> is
plumbed on the interface. The second
time that you run <command>sppptun</command>,
the session protocol <command>pppoe</command> is
plumbed. <command>sppptun</command> prints
the name of the interface that was
just plumbed. You use this name to
unplumb the interface, when necessary.</para><para>For more information, refer
to the <olink targetdoc="refman1m" targetptr="sppptun-1m" remap="external"><citerefentry><refentrytitle>sppptun</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</sect3><sect3 id="egjzz"><title>Examples
of <command>sppptun</command> Commands
for Administering Interfaces</title><para>The following example shows
how to manually plumb an interface
for PPPoE by using <filename>/usr/sbin/sppptun</filename>.</para><screen># <userinput>/usr/sbin/sppptun plumb pppoed hme0</userinput>
hme0:pppoed
# <userinput>/dev/sppptun plumb pppoe hme0</userinput>
 hme0:pppoe</screen><para>This example shows how to list
the interfaces on an access server
that was plumbed for PPPoE.</para><screen># <userinput>/usr/sbin/sppptun query</userinput>
hme0:pppoe
hme0:pppoed
hme1:pppoe
hme1:pppoed
hme2:pppoe
hme2:pppoed</screen><para>This example shows how to unplumb
an interface.</para><screen># <userinput>sppptun unplumb hme0:pppoed</userinput>
# <userinput>sppptun unplumb hme0:pppoe</userinput></screen>
</sect3>
</sect2><sect2 id="ppp.reference-47"><title>PPPoE
Access Server Commands and Files</title><para>A service provider that
offers DSL services or support to
customers can use an access server
that is running Solaris PPPoE. The
PPPoE access server and client do
function in the traditional client-server
relationship. This relationship is
similar to the relationship of the
dial-out machine and dial-in server
on a dial-up link.  One PPPoE system
initiates communications and one PPPoE
system answers. By contrast, the PPP
protocol has no notion of the client-server
relationship.  PPP considers both
systems equal peers.</para><itemizedlist><para>The commands and files that
set up a PPPoE access server include
the following: </para><listitem><para><olink targetptr="ppp.reference-49" remap="internal">/usr/sbin/sppptun
Command</olink></para>
</listitem><listitem><para><olink targetptr="ppp.reference-48" remap="internal">/usr/lib/inet/pppoed
Daemon</olink></para>
</listitem><listitem><para><olink targetptr="ppp.reference-52" remap="internal">/etc/ppp/pppoe
File</olink></para>
</listitem><listitem><para><olink targetptr="ppp.reference-56" remap="internal">/etc/ppp/pppoe.device
File</olink></para>
</listitem><listitem><para><olink targetptr="ppp.reference-63" remap="internal">pppoe.so
Shared Object</olink></para>
</listitem>
</itemizedlist><sect3 id="ppp.reference-48"><title><command>/usr/lib/inet/pppoed</command> Daemon</title><para>The <command>pppoed</command> daemon
accepts broadcasts for services from
prospective PPPoE clients. Additionally, <literal>pppoed</literal> negotiates the server
side of the PPPoE tunnel and runs <command>pppd</command>, the PPP daemon, over
that tunnel. </para><para>You configure <command>pppoed</command> services
in the <filename>/etc/ppp/pppoe</filename> and <filename>/etc/ppp/pppoe.</filename><replaceable>device</replaceable> files. If <filename>/etc/ppp/pppoe</filename> exists when the system
boots, <command>pppoed</command> runs
automatically. You can also explicitly
run the <command>pppoed</command> daemon
on the command line by typing <command>/usr/lib/inet/pppoed</command>. </para>
</sect3><sect3 id="ppp.reference-52"><title><filename>/etc/ppp/pppoe</filename> File</title><para>The <filename>/etc/ppp/pppoe</filename> file
describes the services that are offered
by an access server plus options that
define how PPP runs over the PPPoE
tunnel. You can define services for
individual interfaces, or globally,
that is, for all interfaces on the
access server. The access server sends
the information in the <filename>/etc/ppp/pppoe</filename> file in response to a
broadcast from a potential PPPoE client. </para><para>The following is the basic
syntax of <filename>/etc/ppp/pppoe</filename>:</para><screen><replaceable>global-options</replaceable>
<replaceable>service</replaceable> <replaceable>service-name</replaceable>
    <replaceable>service-specific-options</replaceable>
    <replaceable>device</replaceable> <replaceable>interface-name</replaceable>
  </screen><para>The parameters have the following
meanings.</para><variablelist><varlistentry><term><replaceable>global-options</replaceable></term><listitem><para>Sets the default options
for the <filename>/etc/ppp/pppoe</filename> file.
These options can be any options that
are available through <command>pppoed</command> or <command>pppd</command>. For complete lists
of options, see the man pages <olink targetdoc="refman1m" targetptr="pppoed-1m" remap="external"><citerefentry><refentrytitle>pppoed</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> and <olink targetdoc="refman1m" targetptr="pppd-1m" remap="external"><citerefentry><refentrytitle>pppd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>.</para><para>For example, you must list the
Ethernet interfaces that are available
for the PPPoE tunnel as part of <replaceable>global options</replaceable>. If you
do not define devices in <filename>/etc/ppp/pppoe</filename>, the services are not
offered on any interface.</para><para>To define <literal>devices</literal> as
a global option, use the following
form:</para><screen><replaceable>device</replaceable> <replaceable>interface &lt;,interface></replaceable></screen><para><replaceable>interface</replaceable> specifies
the interface where the service listens
for potential PPPoE clients. If more
than one interface is associated with
the service, separate each name with
a comma.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>service</replaceable> <replaceable>service-name</replaceable></term><listitem><para>Starts the definition
of the service <replaceable>service-name</replaceable>. <replaceable>service-name</replaceable> is a string
that can be any phrase that is appropriate
to the services that are provided.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>service-specific-options</replaceable></term><listitem><para>Lists the PPPoE and
PPP options specific to this service.</para>
</listitem>
</varlistentry><varlistentry><term><literal>device</literal> <replaceable>interface-name</replaceable></term><listitem><para>Specifies the interface
where the previously listed service
is available.</para>
</listitem>
</varlistentry>
</variablelist><para>For additional options to <filename>/etc/ppp/pppoe</filename>, refer to
the <olink targetdoc="refman1m" targetptr="pppoed-1m" remap="external"><citerefentry><refentrytitle>pppoed</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> and <olink targetdoc="refman1m" targetptr="pppd-1m" remap="external"><citerefentry><refentrytitle>pppd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
pages.</para><para>A typical <filename>/etc/ppp/pppoe</filename> file might resemble the
following.</para><example id="ppp.reference-ex-10"><title>Basic <filename>/etc/ppp/pppoe</filename> File</title><screen>device hme1,hme2,hme3
service internet
   pppd "name internet-server"
service intranet
   pppd "192.168.1.1:"
service debug
   device hme1
   pppd "debug name internet-server"</screen>
</example><para>In this file, the following
values apply.</para><variablelist><varlistentry><term><literal>hme1,hme2,hme3</literal></term><listitem><para>Three interfaces on
the access server to be used for PPPoE
tunnels.</para>
</listitem>
</varlistentry><varlistentry><term><literal>service
internet</literal></term><listitem><para>Advertises a service
that is called <literal>internet</literal> to
prospective clients. The provider
that offers the service also determines
how <literal>internet</literal> is
defined. For example, a provider might
interpret <literal>internet</literal> to
mean various IP services, as well
as access to the Internet.</para>
</listitem>
</varlistentry><varlistentry><term><command>pppd</command></term><listitem><para>Sets the command-line
options that are used when the caller
invokes <command>pppd</command>. The
option <literal>"name internet-server"</literal> gives
the name of the local machine, the
access server, as <literal>internet-server</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><literal>service
intranet</literal></term><listitem><para>Advertises another
service that is called <literal>intranet</literal> to
prospective clients.</para>
</listitem>
</varlistentry><varlistentry><term><literal>pppd
"192.168.1.1:"</literal></term><listitem><para>Sets the command-line
options that are used when the caller
invokes <command>pppd</command>. When
the caller invokes <command>pppd</command>,
192.168.1.1 is set as the IP address
for the local machine, the access
server.</para>
</listitem>
</varlistentry><varlistentry><term><literal>service
debug</literal></term><listitem><para>Advertises a third
service, debugging, on the interfaces
that are defined for PPPoE.</para>
</listitem>
</varlistentry><varlistentry><term><literal>device
hme1</literal></term><listitem><para>Restricts debugging
to PPPoE tunnels to <literal>hme1</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><literal>pppd
"debug name internet-server"</literal></term><listitem><para>Sets the command-line
options that are used when the caller
invokes <command>pppd</command>, in
this instance, PPP debugging on <command>internet-server</command>, the local
machine.</para>
</listitem>
</varlistentry>
</variablelist>
</sect3><sect3 id="ppp.reference-56"><title><filename>/etc/ppp/pppoe.</filename><replaceable>device</replaceable> File</title><para>The <filename>/etc/ppp/pppoe.</filename><replaceable>device</replaceable> file
describes the services that are offered
on one interface of a PPPoE access
server. <filename>/etc/ppp/pppoe.</filename><replaceable>device</replaceable> also includes
options that define how PPP runs over
the PPPoE tunnel. <filename>/etc/ppp/pppoe.</filename><replaceable>device</replaceable> is
an optional file, which operates exactly
like the global <filename>/etc/ppp/pppoe</filename>.
However, if <filename>/etc/ppp/pppoe.</filename><replaceable>device</replaceable> is defined for
an interface, its parameters have
precedence for that interface over
the global parameters that are defined
in <filename>/etc/ppp/pppoe</filename>.</para><para>The basic syntax of <filename>/etc/ppp/pppoe.</filename><replaceable>device</replaceable> is as follows:</para><screen><userinput>service</userinput> <replaceable>service-name</replaceable>
     <replaceable>service-specific-options</replaceable>
<userinput>service</userinput> <replaceable>another-service-name</replaceable>
      <replaceable>service-specific-options</replaceable>    </screen><para>The only difference between
this syntax and the syntax of <filename>/etc/ppp/pppoe</filename> is that you cannot use
the <literal>device</literal> option
that is shown in <olink targetptr="ppp.reference-52" remap="internal">/etc/ppp/pppoe
File</olink>. </para>
</sect3><sect3 id="ppp.reference-59"><title><filename>pppoe.so</filename> Plugin</title><para><filename>pppoe.so</filename> is
the PPPoE shared object file that
must be invoked by PPPoE access servers
and clients. This file limits MTU
and MRU to 1492, filters packets from
the driver, and negotiates the PPPoE
tunnel, along with <command>pppoed</command>.
On the access server side, <literal>pppoe.so</literal> is automatically invoked
by the <literal>pppd</literal> daemon.</para>
</sect3><sect3 id="ppp.reference-71"><title>Using
PPPoE and PPP Files to Configure an
Access Server</title><para>This section contains samples
of all files that are used to configure
an access server. The access server
is multihomed. The server is attached
to three subnets: <literal>green</literal>, <literal>orange</literal>, and <literal>purple</literal>. <command>pppoed</command> runs as <literal>root</literal> on
the server, which is the default.</para><para>PPPoE clients can access the <literal>orange</literal> and <literal>purple</literal> networks
through interfaces <literal>hme0</literal> and <literal>hme1</literal>. Clients log in to
the server by using the standard UNIX
login. The server authenticates the
clients by using PAP.</para><para>The <literal>green</literal> network
is not advertised to clients. The
only way clients can access <literal>green</literal> is by directly specifying &ldquo;<filename>green-net</filename>&rdquo; and supplying
CHAP authentication credentials. Moreover,
only clients <literal>joe</literal> and <literal>mary</literal> are allowed to access
the <literal>green</literal> network
by using  static IP addresses.</para><example id="ppp.reference-ex-11"><title><filename>/etc/ppp/pppoe</filename> File
for an Access Server</title><screen>service orange-net
     device hme0,hme1
     pppd "require-pap login name orange-server orange-server:"
service purple-net
     device hme0,hme1 
     pppd "require-pap login name purple-server purple-server:"
service green-net
     device hme1 
     pppd "require-chap name green-server green-server:"
     nowildcard</screen>
</example><para>This sample describes the services
that are available from the access
server. The first service section
describes the services of the <literal>orange</literal> network.</para><screen>service orange-net
     device hme0,hme1
     pppd "require-pap login name orange-server orange-server:"</screen><para>Clients access the <literal>orange</literal> network
over interfaces <literal>hme0</literal> and <literal>hme1</literal>. The options that are
given to the <literal>pppd</literal> command
force the server to require PAP credentials
from potential clients. The <literal>pppd</literal> options also set the server's
name to <literal>orange-server</literal>,
as used in the <filename>pap-secrets</filename> file.</para><para>The service section for the <filename>purple</filename> network is identical
to the service section of the <literal>orange</literal> network except for the
network and server names.</para><para>The next section describes the
services of the <literal>green</literal> network:</para><screen>service green-net
     device hme1 
     pppd "require-chap name green-server green-server:"
     nowildcard</screen><para>This section restricts client
access to interface <filename>hme1</filename>.
Options that are given to the <filename>pppd</filename> command force the server
to require CHAP credentials from prospective
clients. The <command>pppd</command> options
also set the server name to <literal>green-server</literal>, to be used in the <literal>chap-secrets</literal> file. The <literal>nowildcard</literal> option
specifies that the existence of the
green network is not advertised to
clients.</para><para>For this access server
scenario just discussed, you might
set up the following <filename>/etc/ppp/options</filename> file.</para><example id="ppp.reference-ex-12"><title><filename>/etc/ppp/options</filename> File
for an Access Server</title><screen> 	auth
 	proxyarp
 	nodefaultroute
 	name no-service	# don't authenticate otherwise</screen>
</example><para>The option <literal>name
no-service</literal> overrides the
server name that is normally searched
for during PAP or CHAP authentication.
The server's default name is  the
one found by the <filename>/usr/bin/hostname</filename> command. The <literal>name</literal> option
in the previous example changes the
server's name to <literal>no-service</literal>.
The name <literal>no-service</literal> is
not likely to be found in a <literal>pap</literal> or <literal>chap-secrets</literal> file. This
action prevents a random user from
running <literal>pppd</literal> and
overriding the <literal>auth</literal> and <literal>name</literal> options that are set
in <filename>/etc/ppp/options</filename>. <filename>pppd</filename> then fails because
no secrets can be found for the client
with a server name of <literal>no-service</literal>.</para><para>The access server scenario uses
the following <filename>/etc/hosts</filename> file.</para><example id="ppp.reference-ex-13"><title><filename>/etc/hosts</filename> File
for an Access Server</title><screen>     172.16.0.1	orange-server
     172.17.0.1	purple-server
     172.18.0.1	green-server
     172.18.0.2	joes-pc
     172.18.0.3	marys-pc</screen>
</example><para>Here is the <filename>/etc/ppp/pap-secrets</filename> file that is used for
PAP authentication for clients that
attempt to access the <literal>orange</literal> and <literal>purple</literal> networks.</para><example id="ppp.reference-ex-14"><title><filename>/etc/ppp/pap-secrets</filename> File
for an Access Server</title><screen>* orange-server "" 172.16.0.2/16+
* purple-server "" 172.17.0.2/16+</screen>
</example><para>Here is the <filename>/etc/ppp/chap-secrets</filename> file that is used for
CHAP authentication. Note that only
clients <literal>joe</literal> and <literal>mary</literal> are listed in the file.</para><example id="ppp.reference-ex-15"><title><filename>/etc/ppp/chap-secrets</filename> File
for an Access Server</title><screen> joe green-server "joe's secret" joes-pc
mary green-server "mary's secret" marys-pc</screen>
</example>
</sect3>
</sect2><sect2 id="ppp.reference-55"><title>PPPoE
Client Commands and Files</title><para>To run PPP over a DSL
modem, a machine must become a PPPoE
client. You have to plumb an interface
to run PPPoE, and then use the <command>pppoec</command> utility to &ldquo;discover&rdquo;
the existence of an access server.
Thereafter, the client can create
the PPPoE tunnel over the DSL modem
and run PPP.</para><para>The PPPoE client relates to
the access server in the traditional
client-server model. The PPPoE tunnel
is not a dial-up link, but the tunnel
is configured and operated in much
the same manner. </para><itemizedlist><para>The commands and files that
set up a PPPoE client include the
following:</para><listitem><para><olink targetptr="ppp.reference-49" remap="internal">/usr/sbin/sppptun
Command</olink></para>
</listitem><listitem><para><olink targetptr="ppp.reference-58" remap="internal">/usr/lib/inet/pppoec
Utility</olink></para>
</listitem><listitem><para><olink targetptr="ppp.reference-63" remap="internal">pppoe.so
Shared Object</olink></para>
</listitem><listitem><para><olink targetptr="pppsvrconfig.reference-56" remap="internal">/etc/ppp/peers/peer-name
File</olink></para>
</listitem><listitem><para><olink targetptr="pppsvrconfig.reference-46" remap="internal">/etc/ppp/options
Configuration File</olink></para>
</listitem>
</itemizedlist><sect3 id="ppp.reference-58"><title><filename>/usr/lib/inet/pppoec</filename> Utility</title><para>The <filename>/usr/lib/inet/pppoec</filename> utility is responsible
for negotiating the client side of
a PPPoE tunnel. <command>pppoec</command> is
similar to the Solaris PPP 4.0 <command>chat</command> utility. You do not invoke <command>pppoec</command> directly. Rather,
you start <filename>/usr/lib/inet/pppoec</filename> as
an argument to the <literal>connect</literal> option
of <command>pppd</command>.</para>
</sect3><sect3 id="ppp.reference-63"><title><filename>pppoe.so</filename> Shared Object</title><para><filename>pppoe.so</filename> is
the PPPoE shared object that must
be loaded by PPPoE to provide PPPoE
capability to access servers and clients.
The <filename>pppoe.so</filename> shared
object limits MTU and MRU to 1492,
filters packets from the driver, and
handles runtime PPPoE messages.</para><para>On the client side, <command>pppd</command> loads <filename>pppoe.so</filename> when the user
specifies the <literal>plugin pppoe.so</literal> option.</para>
</sect3><sect3 id="ppp.reference-46"><title><filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> File for Defining an
Access Server Peer</title><itemizedlist><para>When you define an access
server to be discovered by <command>pppoec</command>, you use options that apply
to both <command>pppoec</command> and
the <command>pppd</command> daemon.
An <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file for an
access server requires the following
parameters:</para><listitem><para><command>sppptun</command> &ndash;
Name for the serial device that is
used by the PPPoE tunnel.</para>
</listitem><listitem><para><literal>plugin pppoe.so</literal> &ndash;
Instructs <command>pppd</command> to
load the <literal>pppoe.so</literal> shared
object.</para>
</listitem><listitem><para><literal>connect "/usr/lib/inet/pppoec</literal> <replaceable>device</replaceable><literal>"</literal> &ndash; Starts a connection. <literal>connect</literal> then invokes the <literal>pppoec</literal> utility over <replaceable>device</replaceable>, the interface
that is plumbed for PPPoE.</para>
</listitem>
</itemizedlist><para>The remaining parameters in
the <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file should
apply to the PPP link on the server.
Use the same options that you would
for <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> on a dial-out
machine. Try to limit the number of
options to the minimum you need for
the PPP link.</para><para>The following example is introduced
in <olink targetptr="ppp.pppoe-56" remap="internal">How
to Define a PPPoE Access Server Peer</olink>.</para><example id="ppp.reference-ex-16"><title><filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> to Define
a Remote Access Server</title><screen># <userinput>cat /etc/ppp/peers/dslserve</userinput>
sppptun
plugin pppoe.so
connect "/usr/lib/inet/pppoec hme0"
noccp
noauth
user Red
password redsecret
noipdefault
defaultroute</screen>
</example><para>This file defines parameters
to be used when setting up a PPPoE
tunnel and PPP link to access server <literal>dslserve</literal>. The options that
are included are as follows.</para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="41.26*"/><colspec colwidth="58.74*"/><thead><row rowsep="1"><entry><para>Option</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para><command>sppptun</command></para>
</entry><entry><para>Defines <literal>sppptun</literal> as
the name of the serial device.</para>
</entry>
</row><row><entry><para><literal>plugin pppoe.so</literal></para>
</entry><entry><para>Instructs <command>pppd</command> to
load the <command>pppoe.so</command> shared
object.</para>
</entry>
</row><row><entry><para><literal>connect "/usr/lib/inet/pppoec
hme0"</literal></para>
</entry><entry><para>Runs <literal>pppoec</literal> and
designates <literal>hme0</literal> as
the interface for the PPPoE tunnel
and PPP link.</para>
</entry>
</row><row><entry><para><literal>noccp</literal></para>
</entry><entry><para>Turns off CCP compression on
the link.</para><note><para>Many ISPs use only proprietary
compression algorithms. Turning off
the publicly available CCP algorithm
saves negotiation time and avoids
very occasional interoperability problems.</para>
</note>
</entry>
</row><row><entry><para><literal>noauth</literal></para>
</entry><entry><para>Stops <command>pppd</command> from
demanding authentication credentials
from the access server. Most ISPs
do not provide authentication credentials
to customers.</para>
</entry>
</row><row><entry><para><literal>user Red</literal></para>
</entry><entry><para>Sets the name <literal>Red</literal> as
the user name for the client, which
is required for PAP authentication
by the access server.</para>
</entry>
</row><row><entry><para><literal>password redsecret</literal></para>
</entry><entry><para>Defines <literal>redsecret</literal> as
the password to be provided to the
access server for PAP authentication.</para>
</entry>
</row><row><entry><para><literal>noipdefault</literal></para>
</entry><entry><para>Assigns 0.0.0.0 as the initial
IP address.</para>
</entry>
</row><row><entry><para><literal>defaultroute</literal></para>
</entry><entry><para>Tells <command>pppd</command> to
install a default IPv4 route after
IPCP negotiation. You should include <literal>defaultroute</literal> in <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> when
the link is the system's link to the
Internet, which is true for a PPPoE
client.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect3>
</sect2>
</sect1>
</chapter>