Add an entry for the remote peer in the router's /etc/hosts file.
# vi /etc/hosts # # Internet host table # 127.0.0.1 localhost 192.168.130.10 local2-peer loghost 192.168.130.11 local1-net 10.0.0.25 farISP |
The sample /etc/hosts file is for the local router at the fictitious LocalCorp. Note the IP address and host name for the remote peer farISP at the service provider.
Create the file /etc/ppp/peers/peer-name to hold information about the provider's peer.
For the sample leased-line link, you create the file /etc/ppp/peers/farISP.
#vi /etc/ppp/peers/farISP init '/etc/ppp/conf_hsi' local /dev/hih1 sync noauth 192.168.130.10:10.0.0.25 nodefaultroute passive persist noccp nopcomp novj noaccomp |
The following table explains the options and parameters that are used in /etc/ppp/peers/farISP.
Create an initialization script that is called demand, which creates the PPP link as part of the booting process.
# cd /etc/ppp/ # vi demand if [ -f /var/run/ppp-demand.pid ] && /usr/bin/kill -s 0 `/bin/cat /var/run/ppp-demand.pid` then : else /usr/bin/pppd call farISP fi |
The demand script contains the pppd command for establishing a leased-line link. The following table explains the contents of $PPPDIR/demand.
Code Sample |
Explanation |
---|---|
echo "Starting Solaris PPP 4.0\c" |
Displays “Starting Solaris PPP 4.0” during the booting process. |
if ps -e | grep '\<pppd\ > /dev/null 2>&1 ; then echo "\npppd daemon is still running" echo "or in the process of exiting" exit 0 |
Search for an already existing pppd daemon.
If pppd is found, then send out a message and exit the demand script. |
echo "\nEstablishing PPP session...\n" |
Display “Establishing PPP session” during booting. |
/usr/bin/pppd call farISP |
Run the pppd command by using the options that are in /etc/ppp/peers/farISP. |
The Solaris PPP 4.0 startup script /etc/rc2.d/S47pppd invokes the demand script as part of the Solaris booting process. The following lines in /etc/rc2.dS47pppd search for the presence of a file that is called $PPPDIR/demand.
if [ -f $PPPDIR/demand ]; then . $PPPDIR/demand fi |
If $PPPDIR/demand is found, it is executed. During the course of executing $PPPDIR/demand, the link is established.
If you have followed all the procedures in this chapter, you have completed the configuration of the leased-line link.
Task |
For Instructions |
---|---|
Instruct users to start communicating with machines on the Internet or other network that is served by the remote peer |
Have users run telnet, ftp, rsh, or similar commands to reach machines outside the local network. |
Fix problems on the link |
Fixing Leased-Line Problems for troubleshooting information. |
Learn more about the files and options used in this chapter |