<chapter id="pppsvrconfig.leased-1"><title>Setting Up a Leased-Line PPP
Link (Tasks)</title><highlights><itemizedlist><para>This chapter explains how to
configure a PPP link that uses a leased
line between peers. Major sections
include the following:</para><listitem><para><olink targetptr="pppsvrconfig.leased-2" remap="internal">Configuring
Synchronous Devices on the Leased
Line</olink></para>
</listitem><listitem><para><olink targetptr="pppsvrconfig.leased-5" remap="internal">Configuring
a Machine on the Leased Line</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="pppsvrconfig.p2plink-8"><title>Setting Up a Leased Line (Task
Map)</title><para>Leased-line links are relatively
easy to set up, in comparison with
dial-up links. In most instances,
you do not have to configure the CSU/DSU,
dialing services, or authentication.
If you do need to configure the CSU/DSU,
refer to the manufacturer's documentation
for aid with this complex task. </para><para>The task map in the next table
describes all the tasks that are involved
in setting up the basic leased-line
link.</para><note><para>Some types of leased lines
do require the CSU/DSU to &ldquo;dial&rdquo;
the address of the opposite peer.
For example, Frame Relay uses Switched
Virtual Circuits (SVCs) or Switched
56 service.</para>
</note><table frame="all" pgwide="100" id="pppsvrconfig.p2plink-tbl-17"><title>Task
Map for Setting Up the Leased-Line
Link</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="25.61*"/><colspec colname="colspec1" colwidth="37.73*"/><colspec colname="colspec2" colwidth="49.50*"/><thead><row rowsep="1"><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>1. Gather preconfiguration information</para>
</entry><entry><para>Gather data that is needed prior
to setting up the link.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.p2plink-tbl-19" remap="internal">Table
16&ndash;4</olink></para>
</entry>
</row><row><entry><para>2. Set up the leased-line hardware</para>
</entry><entry><para>Assemble the CSU/DSU and synchronous
interface card.</para>
</entry><entry><para><olink targetptr="ppp.leased-20" remap="internal">How
to Configure Synchronous Devices</olink></para>
</entry>
</row><row><entry><para>3. Configure the interface card,
if required</para>
</entry><entry><para>Configure the interface script
to be used when the leased line is
initiated.</para>
</entry><entry><para><olink targetptr="ppp.leased-20" remap="internal">How
to Configure Synchronous Devices</olink></para>
</entry>
</row><row><entry><para>4. Configure information about
the remote peer</para>
</entry><entry><para>Define how communications between
your local machine and the remote
peer should work.</para>
</entry><entry><para><olink targetptr="ppp.leased-21" remap="internal">How
to Configure a Machine on a Leased
Line</olink></para>
</entry>
</row><row><entry><para>5. Start up the leased line</para>
</entry><entry><para>Configure your machine to start
up PPP over the leased line as part
of the booting process.</para>
</entry><entry><para><olink targetptr="ppp.leased-21" remap="internal">How
to Configure a Machine on a Leased
Line</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="pppsvrconfig.leased-2"><title>Configuring Synchronous Devices
on the Leased Line</title><para>The task in this section involves
configuring equipment that is required
by the leased-line topology that is
introduced in <olink targetptr="pppsvrconfig.p2plink-20" remap="internal">Example
of a Configuration for a Leased-Line
Link</olink>. The synchronous devices
that are required to connect to the
leased line include the interface
and modem.</para><sect2 id="pppsvrconfig.leased-3"><title>Prerequisites for Synchronous
Devices Setup</title><itemizedlist><para>Before you perform the next
procedure, you must have the following
items:</para><listitem><para>Working leased line
that is installed at your site by
the provider</para>
</listitem><listitem><para>Synchronous unit (CSU/DSU)</para>
</listitem><listitem><para>Solaris 9 release
or Solaris 10 release installed on
your system</para>
</listitem><listitem><para>Synchronous interface
card of the type that is required
by your system</para>
</listitem>
</itemizedlist>
</sect2><task id="ppp.leased-20"><title>How
to Configure Synchronous Devices</title><procedure><step id="pppsvrconfig.leased-step-7"><para>Physically install the interface
card into the local machine, if necessary. </para><para>Follow the instructions
in the manufacturer's documentation.</para>
</step><step id="pppsvrconfig.leased-step-8"><para>Connect the cables from the
CSU/DSU to the interface.</para><para>If
 necessary, connect cables from the
CSU/DSU to the leased-line jack or
similar connector.</para>
</step><step id="pppsvrconfig.leased-step-9"><para>Configure the CSU/DSU,
as instructed in the documentation
from the manufacturer or network provider.</para><note><para>The provider from whom
you rented the leased line might supply
and configure the CSU/DSU for your
link.</para>
</note>
</step><step id="pppsvrconfig.leased-step-10"><para>Configure the interface
card, if necessary, as instructed
in the interface documentation.</para><para>The configuration of the interface
card involves the creation of a startup
script for the interface. The router
at LocalCorp in the leased-line configuration
that is shown in <olink targetptr="pppsvrconfig.p2plink-fig-7" remap="internal">Figure
16&ndash;2</olink> uses an HSI/P interface
card. </para><para>The following script, <filename>hsi-conf</filename>, starts the HSI/P
interface.</para><screen>#!/bin/ksh
/opt/SUNWconn/bin/hsip_init hihp1 speed=1536000 mode=fdx loopback=no \
nrzi=no txc=txc rxc=rxc txd=txd rxd=rxd signal=no 2>&amp;1 > /dev/null</screen><variablelist><varlistentry><term><literal>hihp1</literal></term><listitem><para>Indicates that HSI/P
is the synchronous port used</para>
</listitem>
</varlistentry><varlistentry><term><literal>speed=1536000</literal></term><listitem><para>Set to indicate the
speed of the CSU/DSU</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><taskrelated role="see-also"><para>To configure the local machine
on the leased line, refer to <olink targetptr="ppp.leased-21" remap="internal">How to Configure
a Machine on a Leased Line</olink>.</para>
</taskrelated>
</task>
</sect1><sect1 id="pppsvrconfig.leased-5"><title>Configuring a Machine on the
Leased Line</title><para>The task in this section explains
how to set up a router to function
as the local peer on your end of a
leased line. The task uses the leased
line that was introduced in <olink targetptr="pppsvrconfig.p2plink-20" remap="internal">Example
of a Configuration for a Leased-Line
Link</olink> as an example.</para><sect2 id="pppsvrconfig.leased-12"><title>Prerequisites for Configuring
the Local Machine on a Leased Line</title><itemizedlist><para>Before you perform the next
procedure, you must have completed
the following:</para><listitem><para>Set up
and configure the synchronous devices
for the link, as described in <olink targetptr="pppsvrconfig.leased-2" remap="internal">Configuring
Synchronous Devices on the Leased
Line</olink></para>
</listitem><listitem><para>Obtained the root
password for the local machine on
the leased line</para>
</listitem><listitem><para>Set up the local machine
to run as a router on the network
or networks to use the services of
the leased-line provider</para>
</listitem>
</itemizedlist>
</sect2><task id="ppp.leased-21"><title>How
to Configure a Machine on a Leased
Line</title><procedure><step id="pppsvrconfig.leased-step-14"><para>Become superuser on the local
machine (router) or assume an equivalent
role.</para><para>Roles contain authorizations
and privileged commands. For more
information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary
Administrator profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="pppsvrconfig.leased-step-15"><para>Add an entry for the remote
peer in the router's <filename>/etc/hosts</filename> file.</para><screen># <userinput>cat /etc/hosts</userinput>
#
# Internet host table
#
127.0.0.1       localhost
192.168.130.10  local2-peer        loghost
192.168.130.11  local1-net
<userinput>10.0.0.25       farISP</userinput></screen><para>The example <filename>/etc/hosts</filename> file
is for the local router at the fictitious
LocalCorp. Note the IP address and
host name for the remote peer <computeroutput>farISP</computeroutput> at the service
provider.</para>
</step><step id="pppsvrconfig.leased-step-16"><para>Create the file <filename>/etc/ppp/peers/<replaceable>peer-name</replaceable></filename> to
hold information about the provider's
peer.</para><para>For this example
leased-line link, you create the file <filename>/etc/ppp/peers/farISP</filename>.</para><screen># <userinput>cat /etc/ppp/peers/farISP</userinput>
init '/etc/ppp/conf_hsi'
local
/dev/hihp1
sync
noauth
192.168.130.10:10.0.0.25
passive
persist
noccp
nopcomp
novj
noaccomp</screen><para>The following table explains
the options and parameters that are
used in <filename>/etc/ppp/peers/farISP</filename>.</para><informaltable frame="topbot" pgwide="100"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="36.20*"/><colspec colname="colspec1" colwidth="63.80*"/><thead><row rowsep="1"><entry><para>Option</para>
</entry><entry><para>Definition</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>init '/etc/ppp/conf_hsi'</literal></para>
</entry><entry><para>Starts the link. <command>init</command> then configures the HSI
interface by using the parameters
in the script <filename>/etc/ppp/conf_hsi</filename>.</para>
</entry>
</row><row><entry><para><literal>local</literal></para>
</entry><entry><para>Tells the <command>pppd</command> daemon
not to change the state of the Data
Terminal Ready (DTR) signal. Also
tells <command>pppd</command>  to
ignore the Data Carrier Detect (DCD)
input signal.</para>
</entry>
</row><row><entry><para><filename>/dev/hihp1</filename></para>
</entry><entry><para>Gives the device name of synchronous
interface.</para>
</entry>
</row><row><entry><para><literal>sync</literal></para>
</entry><entry><para>Establishes synchronous
encoding for the link.</para>
</entry>
</row><row><entry><para><literal>noauth</literal></para>
</entry><entry><para>Establishes that the local
system does not need to demand authentication
from the peer. However, the peer could
still demand authentication.</para>
</entry>
</row><row><entry><para><literal>192.168.130.10:10.0.0.25</literal></para>
</entry><entry><para>Defines the IP addresses of
the local peer and the remote peer,
separated by a colon.</para>
</entry>
</row><row><entry><para><literal>passive</literal></para>
</entry><entry><para>Tells the <command>pppd</command> daemon
on the local machine to go quiet after
issuing maximum number of LCP Configure-Requests
and to wait for the peer to start.</para>
</entry>
</row><row><entry><para><literal>persist</literal></para>
</entry><entry><para>Tells the <command>pppd</command> daemon
to try to restart the link after a
connection ends.</para>
</entry>
</row><row><entry><para><literal>noccp, nopcomp, novj,
noaccomp</literal></para>
</entry><entry><para>Disables the Compression Control
Protocol (CCP), Protocol Field compression,
Van Jacobson compression, and address
and control field compression, respectively.
These forms of compression accelerate
transmissions on a dial-up link but
could slow down a leased line.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</step><step id="pppsvrconfig.leased-step-17"><para>Create an initialization
script that is called <filename>demand</filename>,
which creates the PPP link as part
of the booting process.</para><screen># <userinput>cat /etc/ppp/demand</userinput>
#!/bin/sh
if [ -f /var/run/ppp-demand.pid ] &amp;&amp;
   /usr/bin/kill -s 0 `/bin/cat /var/run/ppp-demand.pid`
then
        :
else
        /usr/bin/pppd call farISP
fi</screen><para>The <filename>demand</filename> script
contains the <command>pppd</command> command
for establishing a leased-line link.
The following table explains the content
of <filename>$PPPDIR/demand</filename>.</para><informaltable frame="topbot" pgwide="100"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="60.88*"/><colspec colname="colspec1" colwidth="39.12*"/><thead><row rowsep="1"><entry><para>Code Sample</para>
</entry><entry><para>Explanation</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>if [ -f /var/run/ppp-demand.pid
] &amp;&amp;    /usr/bin/kill -s 0
`/bin/cat /var/run/ppp-demand.pid`</literal></para>
</entry><entry><para>These lines check to see if <command>pppd</command> is running. If <command>pppd</command> is running, it does not
need to be started.</para>
</entry>
</row><row><entry><para><literal>/usr/bin/pppd call
farISP</literal></para>
</entry><entry><para>This line launches <command>pppd</command>. <command>pppd</command> reads the options from <filename>/etc/ppp/options</filename>. The <literal>call farISP</literal> option on the
command line causes it to read <filename>/etc/ppp/peers/farISP</filename>,
also.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>The Solaris
PPP 4.0 startup script <filename>/etc/rc2.d/S47pppd</filename> invokes the <filename>demand</filename> script
as part of the Solaris booting process.
The following lines in <filename>/etc/rc2.dS47pppd</filename> search for the presence
of a file that is called <filename>$PPPDIR/demand</filename>.</para><screen>    if [ -f $PPPDIR/demand ]; then
                . $PPPDIR/demand
        fi
        </screen><para>If  found, <filename>$PPPDIR/demand</filename>  is executed. During the
course of executing <filename>$PPPDIR/demand</filename>, the link is established.</para><note><para>To reach machines outside
the local network, have users run <command>telnet</command>, <command>ftp</command>, <command>rsh</command>, or similar commands.</para>
</note>
</step>
</procedure><taskrelated role="see-also"><para>If you have followed all the
procedures in this chapter, you have
completed the configuration of the
leased-line link. The following list
provides references to related information.</para><itemizedlist><listitem><para>To find troubleshooting
information, see <olink targetptr="ppp.trouble-25" remap="internal">Fixing
Leased-Line Problems</olink>.</para>
</listitem><listitem><para>To learn more about
the files and options that are used
in this chapter, see <olink targetptr="pppsvrconfig.reference-65" remap="internal">Using
PPP Options in Files and on the Command
Line</olink>.</para>
</listitem>
</itemizedlist>
</taskrelated>
</task>
</sect1>
</chapter>