docs/143041: doc/en__US.ISO8859-1 refers to slip, slirp, slattach and pppd
Robert Jenssen
robertjenssen at ozemail.com.au
Fri Feb 5 03:00:13 UTC 2010
The following reply was made to PR docs/143041; it has been noted by GNATS.
From: Robert Jenssen <robertjenssen at ozemail.com.au>
To: bug-followup at FreeBSD.org, robertjenssen at ozemail.com.au
Cc: bcr at FreeBSD.org
Subject: Re: docs/143041: doc/en__US.ISO8859-1 refers to slip, slirp,
slattach and pppd
Date: Fri, 5 Feb 2010 13:20:32 +1100
This is a multi-part message in MIME format.
--Multipart=_Fri__5_Feb_2010_13_20_32_+1100_yt.VYazy.AzRD9ET
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
If committed
en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml
should move to
en_US.ISO8859-1/books/handbook/ppp/chapter.sgml
with
en_US.ISO8859-1/books/handbook/Makefile
modified accordingly.
Regards,
Rob Jenssen
--Multipart=_Fri__5_Feb_2010_13_20_32_+1100_yt.VYazy.AzRD9ET
Content-Type: text/plain;
name="patch.txt"
Content-Disposition: attachment;
filename="patch.txt"
Content-Transfer-Encoding: 7bit
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# article.sgml.diff
# book.sgml.diff
# chapter.sgml.diff
# preface.sgml.diff
#
echo x - article.sgml.diff
sed 's/^X//' >article.sgml.diff << '2523653e9c26f6a06853ddd875789c39'
X--- ./en_US.ISO8859-1/articles/dialup-firewall/article.sgml 2010-02-05 11:04:46.000000000 +1100
X+++ ../new/./en_US.ISO8859-1/articles/dialup-firewall/article.sgml 2010-02-05 11:05:54.000000000 +1100
X@@ -269,36 +269,7 @@
X <devicename>tun1</devicename>, <devicename>tun2</devicename> and so
X on.</para>
X
X- <para>You should also note that &man.pppd.8; uses the
X- <devicename>ppp0</devicename> interface instead, so if you
X- start the connection with &man.pppd.8; you must substitute
X- <devicename>tun0</devicename> for
X- <devicename>ppp0</devicename>. A quick way to edit the
X- firewall rules to reflect this change is shown below. The
X- original rule set is backed up as
X- <filename>fwrules_tun0</filename>.</para>
X-
X- <screen> &prompt.user; <userinput>cd /etc/firewall</userinput>
X- /etc/firewall&prompt.user; <userinput>su</userinput>
X- <prompt>Password:</prompt>
X- /etc/firewall&prompt.root; <userinput>mv fwrules fwrules_tun0</userinput>
X- /etc/firewall&prompt.root; <userinput>cat fwrules_tun0 | sed s/tun0/ppp0/g > fwrules</userinput>
X- </screen>
X-
X- <para>To know whether you are currently using &man.ppp.8; or
X- &man.pppd.8; you can examine the output of
X- &man.ifconfig.8; once the connection is up. E.g., for a
X- connection made with &man.pppd.8; you would see something
X- like this (showing only the relevant lines):</para>
X-
X- <screen> &prompt.user; <userinput>ifconfig</userinput>
X- <emphasis>(skipped...)</emphasis>
X- ppp0: flags=<replaceable>8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524</replaceable>
X- inet <replaceable>xxx.xxx.xxx.xxx</replaceable> --> <replaceable>xxx.xxx.xxx.xxx</replaceable> netmask <replaceable>0xff000000</replaceable>
X- <emphasis>(skipped...)</emphasis>
X- </screen>
X-
X- <para>On the other hand, for a connection made with
X+ <para>For a connection made with
X &man.ppp.8; (<emphasis>user-ppp</emphasis>) you should see
X something similar to this:</para>
X
2523653e9c26f6a06853ddd875789c39
echo x - book.sgml.diff
sed 's/^X//' >book.sgml.diff << 'c0b1393dc42e3eff0b4aab955f5d387c'
X--- orig/en_US.ISO8859-1/books/faq/book.sgml 2010-02-05 12:24:52.000000000 +1100
X+++ en_US.ISO8859-1/books/faq/book.sgml 2010-02-05 12:49:05.000000000 +1100
X@@ -7678,7 +7678,7 @@
X url="&url.books.handbook;/userppp.html">Handbook entry on user PPP</ulink>.
X </para>
X
X- <para>If you are using kernel-mode PPP or have an Ethernet
X+ <para>If you have an Ethernet
X connection to the Internet, you need to use &man.natd.8;.
X Please look at the <ulink
X url="&url.books.handbook;/network-natd.html">natd</ulink>
X@@ -7687,29 +7687,19 @@
X </qandaentry>
X
X <qandaentry>
X- <question id="slip-ppp-support">
X- <para>Does &os; support SLIP and PPP?</para>
X+ <question id="ppp-support">
X+ <para>Does &os; support PPP?</para>
X </question>
X
X <answer>
X- <para>Yes. See the manual pages for &man.slattach.8;,
X- &man.sliplogin.8;, &man.ppp.8;, and &man.pppd.8;.
X- &man.ppp.8; and &man.pppd.8; provide support for both
X- incoming and outgoing connections, while &man.sliplogin.8;
X- deals exclusively with incoming connections, and
X- &man.slattach.8; deals exclusively with outgoing
X- connections.</para>
X+ <para>Yes. See the manual pages for &man.ppp.8;.
X+ &man.ppp.8; provides support for both
X+ incoming and outgoing connections.</para>
X
X <para>For more information on how to use these, please see the
X <ulink
X- url="&url.books.handbook;/ppp-and-slip.html">Handbook chapter on PPP and SLIP</ulink>.
X+ url="&url.books.handbook;/ppp.html">Handbook chapter on PPP</ulink>.
X </para>
X-
X- <para>If you only have access to the Internet through a
X- <quote>shell account</quote>, you may want to have a look at
X- the <filename role="package">net/slirp</filename> package.
X- It can provide you with (limited) access to services such as
X- ftp and http direct from your local machine.</para>
X </answer>
X </qandaentry>
X
X@@ -8956,8 +8946,7 @@
X <para>This normally happens on server machines with slow disks
X that are spawning a &man.getty.8; on the port, and executing
X &man.ppp.8; from a login script or program after login.
X- There were reports of it happening consistently when using
X- slirp. The reason is that in the time taken between
X+ The reason is that in the time taken between
X &man.getty.8; exiting and &man.ppp.8; starting, the
X client-side &man.ppp.8; starts sending Line Control Protocol
X (LCP) packets. Because ECHO is still switched on for the
X@@ -9719,7 +9708,7 @@
X <title>Serial Communications</title>
X
X <para>This section answers common questions about serial
X- communications with &os;. PPP and SLIP are covered in the <link
X+ communications with &os;. PPP is covered in the <link
X linkend="networking">Networking</link> section.</para>
X
X <qandaset>
c0b1393dc42e3eff0b4aab955f5d387c
echo x - chapter.sgml.diff
sed 's/^X//' >chapter.sgml.diff << 'caa8c35a33a0bbab5ed23ad5917fd940'
X--- orig/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml 2010-02-05 12:24:52.000000000 +1100
X+++ en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml 2010-02-05 12:57:52.000000000 +1100
X@@ -4,7 +4,7 @@
X $FreeBSD: doc/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml,v 1.192 2009/02/01 09:38:25 manolis Exp $
X -->
X
X-<chapter id="ppp-and-slip">
X+<chapter id="ppp">
X <chapterinfo>
X <authorgroup>
X <author>
X@@ -16,21 +16,18 @@
X </authorgroup>
X </chapterinfo>
X
X- <title>PPP and SLIP</title>
X+ <title>PPP</title>
X
X- <sect1 id="ppp-and-slip-synopsis">
X+ <sect1 id="ppp-synopsis">
X <title>Synopsis</title>
X <indexterm id="ppp-ppp">
X <primary>PPP</primary>
X </indexterm>
X- <indexterm id="ppp-slip">
X- <primary>SLIP</primary>
X- </indexterm>
X
X <para>FreeBSD has a number of ways to link one computer to
X another. To establish a network or Internet connection through a
X dial-up modem, or to allow others to do so through you, requires
X- the use of PPP or SLIP. This chapter describes setting up
X+ the use of PPP. This chapter describes setting up
X these modem-based communication services in detail.</para>
X
X <para>After reading this chapter, you will know:</para>
X@@ -40,9 +37,6 @@
X <para>How to set up user PPP.</para>
X </listitem>
X <listitem>
X- <para>How to set up kernel PPP.</para>
X- </listitem>
X- <listitem>
X <para>How to set up <acronym>PPPoE</acronym> (PPP over
X Ethernet).</para>
X </listitem>
X@@ -50,20 +44,12 @@
X <para>How to set up <acronym>PPPoA</acronym> (PPP over
X ATM).</para>
X </listitem>
X- <listitem>
X- <para>How to configure and set up a SLIP client and
X- server.</para>
X- </listitem>
X </itemizedlist>
X
X <indexterm id="ppp-ppp-user">
X <primary>PPP</primary>
X <secondary>user PPP</secondary>
X </indexterm>
X- <indexterm id="ppp-ppp-kernel">
X- <primary>PPP</primary>
X- <secondary>kernel PPP</secondary>
X- </indexterm>
X <indexterm id="ppp-ppp-ethernet">
X <primary>PPP</primary>
X <secondary>over Ethernet</secondary>
X@@ -77,24 +63,18 @@
X </listitem>
X <listitem>
X <para>Understand the basics and purpose of a dialup connection
X- and PPP and/or SLIP.</para>
X+ and PPP.</para>
X </listitem>
X </itemizedlist>
X
X- <para>You may be wondering what the main difference is between user
X- PPP and kernel PPP. The answer is simple: user PPP processes the
X- inbound and outbound data in userland rather than in the kernel.
X- This is expensive in terms of copying the data between the kernel
X- and userland, but allows a far more feature-rich PPP implementation.
X- User PPP uses the <devicename>tun</devicename> device to communicate
X- with the outside world whereas kernel PPP uses the
X- <devicename>ppp</devicename> device.</para>
X+ <para>User PPP uses the <devicename>tun</devicename> device to communicate
X+ with the outside world.</para>
X
X <note>
X <para>Throughout in this chapter, user PPP will simply be
X referred to as <application>ppp</application> unless a distinction
X- needs to be made between it and any other PPP software such as
X- <application>pppd</application>. Unless otherwise stated, all of
X+ needs to be made between it and any other PPP software.
X+ Unless otherwise stated, all of
X the commands explained in this chapter should be executed as
X <username>root</username>.</para>
X </note>
X@@ -255,8 +235,7 @@
X <secondary>configuration</secondary>
X </indexterm>
X
X- <para>Both <command>ppp</command> and <command>pppd</command>
X- (the kernel level implementation of PPP) use the configuration
X+ <para><command>ppp</command> uses the configuration
X files located in the <filename class="directory">/etc/ppp</filename> directory.
X Examples for user ppp can be found in
X <filename class="directory">/usr/share/examples/ppp/</filename>.</para>
X@@ -1305,493 +1284,6 @@
X </sect2>
X </sect1>
X
X- <sect1 id="ppp">
X- <sect1info>
X- <authorgroup>
X- <author>
X- <firstname>Gennady B.</firstname>
X- <surname>Sorokopud</surname>
X- <contrib>Parts originally contributed by </contrib>
X- </author>
X- <author>
X- <firstname>Robert</firstname>
X- <surname>Huff</surname>
X- </author>
X- </authorgroup>
X- </sect1info>
X-
X- <title>Using Kernel PPP</title>
X-
X- <sect2>
X- <title>Setting Up Kernel PPP</title>
X-
X- <indexterm>
X- <primary>PPP</primary>
X- <secondary>kernel PPP</secondary>
X- </indexterm>
X-
X- <para>Before you start setting up PPP on your machine, make sure
X- that <command>pppd</command> is located in
X- <filename class="directory">/usr/sbin</filename> and the directory
X- <filename class="directory">/etc/ppp</filename> exists.</para>
X-
X- <para><command>pppd</command> can work in two modes:</para>
X-
X- <orderedlist>
X- <listitem>
X- <para>As a <quote>client</quote> — you want to connect your
X- machine to the outside world via a PPP serial connection or
X- modem line.</para>
X- </listitem>
X-
X- <indexterm>
X- <primary>PPP</primary>
X- <secondary>server</secondary>
X- </indexterm>
X-
X- <listitem>
X- <para>As a <quote>server</quote> — your machine is located on
X- the network, and is used to connect other computers using
X- PPP.</para>
X- </listitem>
X- </orderedlist>
X-
X- <para>In both cases you will need to set up an options file
X- (<filename>/etc/ppp/options</filename> or
X- <filename>~/.ppprc</filename> if you have more than one user on
X- your machine that uses PPP).</para>
X-
X- <para>You will also need some modem/serial software (preferably
X- <filename role="package">comms/kermit</filename>), so you can dial and
X- establish a connection with the remote host.</para>
X- </sect2>
X-
X- <sect2>
X- <sect2info>
X- <authorgroup>
X- <author>
X- <firstname>Trev</firstname>
X- <surname>Roydhouse</surname>
X- <contrib>Based on information provided by </contrib>
X- <!-- Trev.Roydhouse at f401.n711.z3.fidonet.org -->
X- </author>
X- </authorgroup>
X- </sect2info>
X-
X- <title>Using <command>pppd</command> as a Client</title>
X-
X- <indexterm>
X- <primary>PPP</primary>
X- <secondary>client</secondary>
X- </indexterm>
X-
X- <indexterm>
X- <primary>Cisco</primary>
X- </indexterm>
X-
X- <para>The following <filename>/etc/ppp/options</filename> might be
X- used to connect to a Cisco terminal server PPP line.</para>
X-
X- <programlisting>crtscts # enable hardware flow control
X-modem # modem control line
X-noipdefault # remote PPP server must supply your IP address
X- # if the remote host does not send your IP during IPCP
X- # negotiation, remove this option
X-passive # wait for LCP packets
X-domain ppp.foo.com # put your domain name here
X-
X-:<replaceable>remote_ip</replaceable> # put the IP of remote PPP host here
X- # it will be used to route packets via PPP link
X- # if you didn't specified the noipdefault option
X- # change this line to <replaceable>local_ip</replaceable>:<replaceable>remote_ip</replaceable>
X-
X-defaultroute # put this if you want that PPP server will be your
X- # default router</programlisting>
X-
X- <para>To connect:</para>
X-
X- <indexterm><primary>Kermit</primary></indexterm>
X- <indexterm><primary>modem</primary></indexterm>
X- <procedure>
X- <step>
X- <para>Dial to the remote host using
X- <application>Kermit</application> (or some other modem
X- program), and enter your user name and password (or whatever
X- is needed to enable PPP on the remote host).</para>
X- </step>
X-
X- <step>
X- <para>Exit <application>Kermit</application> (without
X- hanging up the line).</para>
X- </step>
X-
X- <step>
X- <para>Enter the following:</para>
X-
X- <screen>&prompt.root; <userinput>/usr/sbin/pppd <replaceable>/dev/tty01</replaceable> <replaceable>19200</replaceable></userinput></screen>
X-
X- <para>Be sure to use the appropriate speed and device name.</para>
X- </step>
X- </procedure>
X-
X- <para>Now your computer is connected with PPP. If the connection
X- fails, you can add the <option>debug</option> option to the
X- <filename>/etc/ppp/options</filename> file, and check console messages
X- to track the problem.</para>
X-
X- <para>Following <filename>/etc/ppp/pppup</filename> script will make
X- all 3 stages automatic:</para>
X-
X- <programlisting>#!/bin/sh
X-pgrep -l pppd
X-pid=`pgrep pppd`
X-if [ "X${pid}" != "X" ] ; then
X- echo 'killing pppd, PID=' ${pid}
X- kill ${pid}
X-fi
X-pgrep -l kermit
X-pid=`pgrep kermit`
X-if [ "X${pid}" != "X" ] ; then
X- echo 'killing kermit, PID=' ${pid}
X- kill -9 ${pid}
X-fi
X-
X-ifconfig ppp0 down
X-ifconfig ppp0 delete
X-
X-kermit -y /etc/ppp/kermit.dial
X-pppd /dev/tty01 19200</programlisting>
X-
X- <indexterm>
X- <primary>Kermit</primary>
X- </indexterm>
X-
X- <para><filename>/etc/ppp/kermit.dial</filename> is a
X- <application>Kermit</application> script that dials and makes all
X- necessary authorization on the remote host (an example of such a
X- script is attached to the end of this document).</para>
X-
X- <para>Use the following <filename>/etc/ppp/pppdown</filename> script
X- to disconnect the PPP line:</para>
X-
X- <programlisting>#!/bin/sh
X-pid=`pgrep pppd`
X-if [ X${pid} != "X" ] ; then
X- echo 'killing pppd, PID=' ${pid}
X- kill -TERM ${pid}
X-fi
X-
X-pgrep -l kermit
X-pid=`pgrep kermit`
X-if [ "X${pid}" != "X" ] ; then
X- echo 'killing kermit, PID=' ${pid}
X- kill -9 ${pid}
X-fi
X-
X-/sbin/ifconfig ppp0 down
X-/sbin/ifconfig ppp0 delete
X-kermit -y /etc/ppp/kermit.hup
X-/etc/ppp/ppptest</programlisting>
X-
X- <para>Check to see if <command>pppd</command> is still running by
X- executing <filename>/usr/etc/ppp/ppptest</filename>, which should look
X- like this:</para>
X-
X- <programlisting>#!/bin/sh
X-pid=`pgrep pppd`
X-if [ X${pid} != "X" ] ; then
X- echo 'pppd running: PID=' ${pid-NONE}
X-else
X- echo 'No pppd running.'
X-fi
X-set -x
X-netstat -n -I ppp0
X-ifconfig ppp0</programlisting>
X-
X- <para>To hang up the modem, execute
X- <filename>/etc/ppp/kermit.hup</filename>, which should
X- contain:</para>
X-
X- <programlisting>set line /dev/tty01 ; put your modem device here
X-set speed 19200
X-set file type binary
X-set file names literal
X-set win 8
X-set rec pack 1024
X-set send pack 1024
X-set block 3
X-set term bytesize 8
X-set command bytesize 8
X-set flow none
X-
X-pau 1
X-out +++
X-inp 5 OK
X-out ATH0\13
X-echo \13
X-exit</programlisting>
X-
X- <para>Here is an alternate method using <command>chat</command>
X- instead of <command>kermit</command>:</para>
X-
X- <para>The following two files are sufficient to accomplish a
X- <command>pppd</command> connection.</para>
X-
X- <para><filename>/etc/ppp/options</filename>:</para>
X-
X- <programlisting>/dev/cuad1 115200
X-
X-crtscts # enable hardware flow control
X-modem # modem control line
X-connect "/usr/bin/chat -f /etc/ppp/login.chat.script"
X-noipdefault # remote PPP serve must supply your IP address
X- # if the remote host doesn't send your IP during
X- # IPCP negotiation, remove this option
X-passive # wait for LCP packets
X-domain <replaceable>your.domain</replaceable> # put your domain name here
X-
X-: # put the IP of remote PPP host here
X- # it will be used to route packets via PPP link
X- # if you didn't specified the noipdefault option
X- # change this line to <replaceable>local_ip</replaceable>:<replaceable>remote_ip</replaceable>
X-
X-defaultroute # put this if you want that PPP server will be
X- # your default router</programlisting>
X-
X- <para><filename>/etc/ppp/login.chat.script</filename>:</para>
X-
X- <note>
X- <para>The following should go on a single line.</para>
X- </note>
X-
X- <programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<replaceable>phone.number</replaceable>
X- CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <replaceable>login-id</replaceable>
X- TIMEOUT 5 sword: <replaceable>password</replaceable></programlisting>
X-
X- <para>Once these are installed and modified correctly, all you need
X- to do is run <command>pppd</command>, like so:</para>
X-
X- <screen>&prompt.root; <userinput>pppd</userinput></screen>
X- </sect2>
X-
X- <sect2>
X- <title>Using <command>pppd</command> as a Server</title>
X-
X- <para><filename>/etc/ppp/options</filename> should contain something
X- similar to the following:</para>
X-
X- <programlisting>crtscts # Hardware flow control
X-netmask 255.255.255.0 # netmask (not required)
X-192.114.208.20:192.114.208.165 # IP's of local and remote hosts
X- # local ip must be different from one
X- # you assigned to the Ethernet (or other)
X- # interface on your machine.
X- # remote IP is IP address that will be
X- # assigned to the remote machine
X-domain ppp.foo.com # your domain
X-passive # wait for LCP
X-modem # modem line</programlisting>
X-
X- <para>The following <filename>/etc/ppp/pppserv</filename> script
X- will tell <application>pppd</application> to behave as a
X- server:</para>
X-
X- <programlisting>#!/bin/sh
X-pgrep -l pppd
X-pid=`pgrep pppd`
X-if [ "X${pid}" != "X" ] ; then
X- echo 'killing pppd, PID=' ${pid}
X- kill ${pid}
X-fi
X-pgrep -l kermit
X-pid=`pgrep kermit`
X-if [ "X${pid}" != "X" ] ; then
X- echo 'killing kermit, PID=' ${pid}
X- kill -9 ${pid}
X-fi
X-
X-# reset ppp interface
X-ifconfig ppp0 down
X-ifconfig ppp0 delete
X-
X-# enable autoanswer mode
X-kermit -y /etc/ppp/kermit.ans
X-
X-# run ppp
X-pppd /dev/tty01 19200</programlisting>
X-
X- <para>Use this <filename>/etc/ppp/pppservdown</filename> script to
X- stop the server:</para>
X-
X- <programlisting>#!/bin/sh
X-pgrep -l pppd
X-pid=`pgrep pppd`
X-if [ "X${pid}" != "X" ] ; then
X- echo 'killing pppd, PID=' ${pid}
X- kill ${pid}
X-fi
X-pgrep -l kermit
X-pid=`pgrep kermit`
X-if [ "X${pid}" != "X" ] ; then
X- echo 'killing kermit, PID=' ${pid}
X- kill -9 ${pid}
X-fi
X-ifconfig ppp0 down
X-ifconfig ppp0 delete
X-
X-kermit -y /etc/ppp/kermit.noans</programlisting>
X-
X- <para>The following <application>Kermit</application> script
X- (<filename>/etc/ppp/kermit.ans</filename>) will enable/disable
X- autoanswer mode on your modem. It should look like this:</para>
X-
X- <programlisting>set line /dev/tty01
X-set speed 19200
X-set file type binary
X-set file names literal
X-set win 8
X-set rec pack 1024
X-set send pack 1024
X-set block 3
X-set term bytesize 8
X-set command bytesize 8
X-set flow none
X-
X-pau 1
X-out +++
X-inp 5 OK
X-out ATH0\13
X-inp 5 OK
X-echo \13
X-out ATS0=1\13 ; change this to out ATS0=0\13 if you want to disable
X- ; autoanswer mode
X-inp 5 OK
X-echo \13
X-exit</programlisting>
X-
X- <para>A script named <filename>/etc/ppp/kermit.dial</filename> is
X- used for dialing and authenticating on the remote host. You will
X- need to customize it for your needs. Put your login and password
X- in this script; you will also need to change the input statement
X- depending on responses from your modem and remote host.</para>
X-
X- <programlisting>;
X-; put the com line attached to the modem here:
X-;
X-set line /dev/tty01
X-;
X-; put the modem speed here:
X-;
X-set speed 19200
X-set file type binary ; full 8 bit file xfer
X-set file names literal
X-set win 8
X-set rec pack 1024
X-set send pack 1024
X-set block 3
X-set term bytesize 8
X-set command bytesize 8
X-set flow none
X-set modem hayes
X-set dial hangup off
X-set carrier auto ; Then SET CARRIER if necessary,
X-set dial display on ; Then SET DIAL if necessary,
X-set input echo on
X-set input timeout proceed
X-set input case ignore
X-def \%x 0 ; login prompt counter
X-goto slhup
X-
X-:slcmd ; put the modem in command mode
X-echo Put the modem in command mode.
X-clear ; Clear unread characters from input buffer
X-pause 1
X-output +++ ; hayes escape sequence
X-input 1 OK\13\10 ; wait for OK
X-if success goto slhup
X-output \13
X-pause 1
X-output at\13
X-input 1 OK\13\10
X-if fail goto slcmd ; if modem doesn't answer OK, try again
X-
X-:slhup ; hang up the phone
X-clear ; Clear unread characters from input buffer
X-pause 1
X-echo Hanging up the phone.
X-output ath0\13 ; hayes command for on hook
X-input 2 OK\13\10
X-if fail goto slcmd ; if no OK answer, put modem in command mode
X-
X-:sldial ; dial the number
X-pause 1
X-echo Dialing.
X-output atdt9,550311\13\10 ; put phone number here
X-assign \%x 0 ; zero the time counter
X-
X-:look
X-clear ; Clear unread characters from input buffer
X-increment \%x ; Count the seconds
X-input 1 {CONNECT }
X-if success goto sllogin
X-reinput 1 {NO CARRIER\13\10}
X-if success goto sldial
X-reinput 1 {NO DIALTONE\13\10}
X-if success goto slnodial
X-reinput 1 {\255}
X-if success goto slhup
X-reinput 1 {\127}
X-if success goto slhup
X-if < \%x 60 goto look
X-else goto slhup
X-
X-:sllogin ; login
X-assign \%x 0 ; zero the time counter
X-pause 1
X-echo Looking for login prompt.
X-
X-:slloop
X-increment \%x ; Count the seconds
X-clear ; Clear unread characters from input buffer
X-output \13
X-;
X-; put your expected login prompt here:
X-;
X-input 1 {Username: }
X-if success goto sluid
X-reinput 1 {\255}
X-if success goto slhup
X-reinput 1 {\127}
X-if success goto slhup
X-if < \%x 10 goto slloop ; try 10 times to get a login prompt
X-else goto slhup ; hang up and start again if 10 failures
X-
X-:sluid
X-;
X-; put your userid here:
X-;
X-output ppp-login\13
X-input 1 {Password: }
X-;
X-; put your password here:
X-;
X-output ppp-password\13
X-input 1 {Entering SLIP mode.}
X-echo
X-quit
X-
X-:slnodial
X-echo \7No dialtone. Check the telephone line!\7
X-exit 1
X-
X-; local variables:
X-; mode: csh
X-; comment-start: "; "
X-; comment-start-skip: "; "
X-; end:</programlisting>
X- </sect2>
X- </sect1>
X-
X <sect1 id="ppp-troubleshoot">
X <sect1info>
X <authorgroup>
X@@ -2480,723 +1972,6 @@
X </sect2>
X </sect1>
X
X- <sect1 id="slip">
X- <sect1info>
X- <authorgroup>
X- <author>
X- <firstname>Satoshi</firstname>
X- <surname>Asami</surname>
X- <contrib>Originally contributed by </contrib>
X- </author>
X- </authorgroup>
X- <authorgroup>
X- <author>
X- <firstname>Guy</firstname>
X- <surname>Helmer</surname>
X- <contrib>With input from </contrib>
X- </author>
X- <author>
X- <firstname>Piero</firstname>
X- <surname>Serini</surname>
X- </author>
X- </authorgroup>
X- </sect1info>
X-
X- <title>Using SLIP</title>
X- <indexterm><primary>SLIP</primary></indexterm>
X-
X- <sect2 id="slipc">
X- <title>Setting Up a SLIP Client</title>
X-
X- <indexterm>
X- <primary>SLIP</primary>
X- <secondary>client</secondary>
X- </indexterm>
X-
X- <para>The following is one way to set up a FreeBSD machine for SLIP
X- on a static host network. For dynamic hostname assignments (your
X- address changes each time you dial up), you probably need to
X- have a more complex setup.</para>
X-
X- <para>First, determine which serial port your modem is connected to.
X- Many people set up a symbolic link, such as
X- <filename class="devicefile">/dev/modem</filename>, to point to the real device name,
X- <filename class="devicefile">/dev/cuad<replaceable>N</replaceable></filename>.
X- This allows you to abstract the actual device
X- name should you ever need to move the modem to a different port. It
X- can become quite cumbersome when you need to fix a bunch of files in
X- <filename class="directory">/etc</filename> and <filename>.kermrc</filename> files all
X- over the system!</para>
X-
X- <note>
X- <para><filename class="devicefile">/dev/cuad0</filename>
X- is
X- <devicename>COM1</devicename>, <filename class="devicefile">/dev/cuad1</filename>
X- is
X- <devicename>COM2</devicename>, etc.</para>
X- </note>
X-
X- <para>Make sure you have the following in your kernel configuration
X- file:</para>
X-
X- <programlisting>device sl</programlisting>
X-
X- <para>It is included in the <filename>GENERIC</filename> kernel, so
X- this should not be a problem unless you have deleted it.</para>
X-
X- <sect3>
X- <title>Things You Have to Do Only Once</title>
X-
X- <procedure>
X- <step>
X- <para>Add your home machine, the gateway and nameservers to
X- your <filename>/etc/hosts</filename> file. Ours looks like
X- this:</para>
X-
X- <programlisting>127.0.0.1 localhost loghost
X-136.152.64.181 water.CS.Example.EDU water.CS water
X-136.152.64.1 inr-3.CS.Example.EDU inr-3 slip-gateway
X-128.32.136.9 ns1.Example.EDU ns1
X-128.32.136.12 ns2.Example.EDU ns2</programlisting>
X- </step>
X-
X- <step>
X- <para>Make sure you have <literal>files</literal> before
X- <literal>dns</literal> in the <literal>hosts:</literal>
X- section of your <filename>/etc/nsswitch.conf</filename>
X- file. Without these parameters funny things may
X- happen.</para>
X- </step>
X-
X- <step>
X- <para>Edit the <filename>/etc/rc.conf</filename> file.</para>
X-
X- <orderedlist>
X- <listitem>
X- <para>Set your hostname by editing the line that
X- says:</para>
X-
X- <programlisting>hostname="myname.my.domain"</programlisting>
X-
X- <para>Your machine's full Internet hostname should be
X- placed here.</para>
X- </listitem>
X-
X- <indexterm><primary>default route</primary></indexterm>
X- <listitem>
X- <para>Designate the default router by changing the
X- line:</para>
X-
X- <programlisting>defaultrouter="NO"</programlisting>
X-
X- <para>to:</para>
X-
X- <programlisting>defaultrouter="slip-gateway"</programlisting>
X- </listitem>
X- </orderedlist>
X- </step>
X-
X- <step>
X- <para>Make a file <filename>/etc/resolv.conf</filename> which
X- contains:</para>
X-
X- <programlisting>domain CS.Example.EDU
X-nameserver 128.32.136.9
X-nameserver 128.32.136.12</programlisting>
X-
X- <indexterm><primary>nameserver</primary></indexterm>
X- <indexterm><primary>domain name</primary></indexterm>
X- <para>As you can see, these set up the nameserver hosts. Of
X- course, the actual domain names and addresses depend on your
X- environment.</para>
X- </step>
X-
X- <step>
X- <para>Set the password for <username>root</username> and
X- <username>toor</username> (and any other
X- accounts that do not have a password).</para>
X- </step>
X-
X- <step>
X- <para>Reboot your machine and make sure it comes up with the
X- correct hostname.</para>
X- </step>
X- </procedure>
X- </sect3>
X-
X- <sect3>
X- <title>Making a SLIP Connection</title>
X-
X- <indexterm>
X- <primary>SLIP</primary>
X- <secondary>connecting with</secondary>
X- </indexterm>
X-
X- <procedure>
X- <step>
X- <para>Dial up, type <command>slip</command> at the prompt,
X- enter your machine name and password. What is required to
X- be entered depends on your environment. If you use
X- <application>Kermit</application>, you can try a script like
X- this:</para>
X-
X- <programlisting># kermit setup
X-set modem hayes
X-set line /dev/modem
X-set speed 115200
X-set parity none
X-set flow rts/cts
X-set terminal bytesize 8
X-set file type binary
X-# The next macro will dial up and login
X-define slip dial 643-9600, input 10 =>, if failure stop, -
X-output slip\x0d, input 10 Username:, if failure stop, -
X-output silvia\x0d, input 10 Password:, if failure stop, -
X-output ***\x0d, echo \x0aCONNECTED\x0a</programlisting>
X-
X- <para>Of course, you have to change the username and password
X- to fit yours. After doing so, you can just type
X- <command>slip</command> from the
X- <application>Kermit</application> prompt to connect.</para>
X-
X- <note>
X- <para>Leaving your password in plain text anywhere in the
X- filesystem is generally a <emphasis>bad</emphasis> idea.
X- Do it at your own risk.</para>
X- </note>
X- </step>
X-
X- <step>
X- <para>Leave the <application>Kermit</application> there (you can
X- suspend it by
X- <keycombo>
X- <keycap>Ctrl</keycap>
X- <keycap>z</keycap>
X- </keycombo>) and as <username>root</username>, type:</para>
X-
X- <screen>&prompt.root; <userinput>slattach -h -c -s 115200 /dev/modem</userinput></screen>
X-
X- <para>If you are able to <command>ping</command> hosts on the
X- other side of the router, you are connected! If it does not
X- work, you might want to try <option>-a</option> instead of
X- <option>-c</option> as an argument to
X- <command>slattach</command>.</para>
X- </step>
X- </procedure>
X- </sect3>
X-
X- <sect3>
X- <title>How to Shutdown the Connection</title>
X-
X- <para>Do the following:</para>
X-
X- <screen>&prompt.root; <userinput>kill -INT `cat /var/run/slattach.modem.pid`</userinput></screen>
X-
X- <para>to kill <command>slattach</command>. Keep in mind you must be
X- <username>root</username> to do the above. Then go back to
X- <command>kermit</command> (by running <command>fg</command> if you
X- suspended it) and exit from it (<keycap>q</keycap>).</para>
X-
X- <para>The &man.slattach.8; manual page says you have
X- to use <command>ifconfig sl0 down</command>
X- to mark the interface down, but this does not
X- seem to make any difference.
X- (<command>ifconfig sl0</command> reports the same thing.)</para>
X-
X- <para>Some times, your modem might refuse to drop the carrier.
X- In that case, simply start <command>kermit</command> and quit
X- it again. It usually goes out on the second try.</para>
X- </sect3>
X-
X- <sect3>
X- <title>Troubleshooting</title>
X-
X- <para>If it does not work, feel free to ask on &a.net.name; mailing
X- list. The things that people tripped over so far:</para>
X-
X- <itemizedlist>
X- <listitem>
X- <para>Not using <option>-c</option> or <option>-a</option> in
X- <command>slattach</command> (This should not be fatal,
X- but some users have reported that this solves their
X- problems.)</para>
X- </listitem>
X-
X- <listitem>
X- <para>Using <option>s10</option> instead of
X- <option>sl0</option> (might be hard to see the difference on
X- some fonts).</para>
X- </listitem>
X-
X- <listitem>
X- <para>Try <command>ifconfig sl0</command> to see your
X- interface status. For example, you might get:</para>
X-
X- <screen>&prompt.root; <userinput>ifconfig sl0</userinput>
X-sl0: flags=10<POINTOPOINT>
X- inet 136.152.64.181 --> 136.152.64.1 netmask ffffff00</screen>
X- </listitem>
X-
X- <listitem>
X- <para>If you get <errorname>no route to host</errorname>
X- messages from &man.ping.8;, there may be a problem with your
X- routing table. You can use the <command>netstat -r</command>
X- command to display the current routes :</para>
X-
X- <screen>&prompt.root; <userinput>netstat -r</userinput>
X-Routing tables
X-Destination Gateway Flags Refs Use IfaceMTU Rtt Netmasks:
X-
X-(root node)
X-(root node)
X-
X-Route Tree for Protocol Family inet:
X-(root node) =>
X-default inr-3.Example.EDU UG 8 224515 sl0 - -
X-localhost.Exampl localhost.Example. UH 5 42127 lo0 - 0.438
X-inr-3.Example.ED water.CS.Example.E UH 1 0 sl0 - -
X-water.CS.Example localhost.Example. UGH 34 47641234 lo0 - 0.438
X-(root node)</screen>
X-
X- <para>The preceding examples are from a relatively busy system.
X- The numbers on your system will vary depending on
X- network activity.</para>
X-
X- </listitem>
X- </itemizedlist>
X- </sect3>
X- </sect2>
X-
X- <sect2 id="slips">
X- <title>Setting Up a SLIP Server</title>
X-
X- <indexterm>
X- <primary>SLIP</primary>
X- <secondary>server</secondary>
X- </indexterm>
X-
X- <para>This document provides suggestions for setting up SLIP Server
X- services on a FreeBSD system, which typically means configuring
X- your system to automatically start up connections upon login for
X- remote SLIP clients.</para>
X-
X- <!-- Disclaimer is not necessarily relevant
X- <para> The author has written this document based
X- on his experience; however, as your system and needs may be
X- different, this document may not answer all of your questions, and
X- the author cannot be responsible if you damage your system or lose
X- data due to attempting to follow the suggestions here.</para>
X- -->
X-
X- <sect3 id="slips-prereqs">
X- <title>Prerequisites</title>
X- <indexterm><primary>TCP/IP networking</primary></indexterm>
X- <para>This section is very technical in nature, so background
X- knowledge is required. It is assumed that you are familiar with
X- the TCP/IP network protocol, and in particular, network and node
X- addressing, network address masks, subnetting, routing, and
X- routing protocols, such as RIP. Configuring SLIP services on a
X- dial-up server requires a knowledge of these concepts, and if
X- you are not familiar with them, please read a copy of either
X- Craig Hunt's <emphasis>TCP/IP Network Administration</emphasis>
X- published by O'Reilly & Associates, Inc. (ISBN Number
X- 0-937175-82-X), or Douglas Comer's books on the TCP/IP
X- protocol.</para>
X-
X- <indexterm><primary>modem</primary></indexterm>
X- <para>It is further assumed that you have already set up your
X- modem(s) and configured the appropriate system files to allow
X- logins through your modems. If you have not prepared your
X- system for this yet, please see <xref
X- linkend="dialup"> for details on dialup services
X- configuration.
X- You may also want to check the manual pages for &man.sio.4; for
X- information on the serial port device driver and &man.ttys.5;,
X- &man.gettytab.5;, &man.getty.8;, & &man.init.8; for
X- information relevant to configuring the system to accept logins
X- on modems, and perhaps &man.stty.1; for information on setting
X- serial port parameters (such as <literal>clocal</literal> for
X- directly-connected serial interfaces).</para>
X- </sect3>
X-
X- <sect3>
X- <title>Quick Overview</title>
X-
X- <para>In its typical configuration, using FreeBSD as a SLIP server
X- works as follows: a SLIP user dials up your FreeBSD SLIP Server
X- system and logs in with a special SLIP login ID that uses
X- <filename>/usr/sbin/sliplogin</filename> as the special user's
X- shell. The <command>sliplogin</command> program browses the
X- file <filename>/etc/sliphome/slip.hosts</filename> to find a
X- matching line for the special user, and if it finds a match,
X- connects the serial line to an available SLIP interface and then
X- runs the shell script
X- <filename>/etc/sliphome/slip.login</filename> to configure the
X- SLIP interface.</para>
X-
X- <sect4>
X- <title>An Example of a SLIP Server Login</title>
X-
X- <para>For example, if a SLIP user ID were
X- <username>Shelmerg</username>, <username>Shelmerg</username>'s
X- entry in <filename>/etc/master.passwd</filename> would look
X- something like this:</para>
X-
X- <programlisting>Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin</programlisting>
X-
X- <para>When <username>Shelmerg</username> logs in,
X- <command>sliplogin</command> will search
X- <filename>/etc/sliphome/slip.hosts</filename> for a line that
X- had a matching user ID; for example, there may be a line in
X- <filename>/etc/sliphome/slip.hosts</filename> that
X- reads:</para>
X-
X- <programlisting>Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
X-
X- <para><command>sliplogin</command> will find that matching line,
X- hook the serial line into the next available SLIP interface,
X- and then execute <filename>/etc/sliphome/slip.login</filename>
X- like this:</para>
X-
X- <programlisting>/etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp</programlisting>
X-
X- <para>If all goes well,
X- <filename>/etc/sliphome/slip.login</filename> will issue an
X- <command>ifconfig</command> for the SLIP interface to which
X- <command>sliplogin</command> attached itself (SLIP interface
X- 0, in the above example, which was the first parameter in the
X- list given to <filename>slip.login</filename>) to set the
X- local IP address (<hostid>dc-slip</hostid>), remote IP address
X- (<hostid>sl-helmer</hostid>), network mask for the SLIP
X- interface (<hostid role="netmask">0xfffffc00</hostid>), and
X- any additional flags (<literal>autocomp</literal>). If
X- something goes wrong, <command>sliplogin</command> usually
X- logs good informational messages via the
X- <application>syslogd</application> daemon facility, which usually
X- logs to <filename>/var/log/messages</filename> (see the manual
X- pages for &man.syslogd.8; and &man.syslog.conf.5; and perhaps
X- check <filename>/etc/syslog.conf</filename> to see to what
X- <application>syslogd</application> is logging and where it is
X- logging to).</para>
X- </sect4>
X- </sect3>
X-
X- <sect3>
X- <title>Kernel Configuration</title>
X-
X- <indexterm>
X- <primary>kernel</primary>
X- <secondary>configuration</secondary>
X- </indexterm>
X-
X- <indexterm>
X- <primary>SLIP</primary>
X- </indexterm>
X-
X- <para>&os;'s default kernel (<filename>GENERIC</filename>)
X- comes with SLIP (&man.sl.4;) support; in case of a custom
X- kernel, you have to add the following line to your kernel
X- configuration file:</para>
X-
X- <programlisting>device sl</programlisting>
X-
X- <para>By default, your &os; machine will not forward packets.
X- If you want your FreeBSD SLIP Server to act as a router, you
X- will have to edit the <filename>/etc/rc.conf</filename> file and
X- change the setting of the <literal>gateway_enable</literal> variable
X- to <option>YES</option>. This will make sure that setting the
X- routing option will be persistent after a reboot.</para>
X-
X- <para>To apply the settings immediately you can execute the
X- following command as <username>root</username>:</para>
X-
X- <screen>&prompt.root; /etc/rc.d/routing start</screen>
X-
X- <para>Please refer to <xref linkend="kernelconfig"> on
X- Configuring the FreeBSD Kernel for help in
X- reconfiguring your kernel.</para>
X- </sect3>
X-
X- <sect3>
X- <title>Sliplogin Configuration</title>
X-
X- <para>As mentioned earlier, there are three files in the
X- <filename class="directory">/etc/sliphome</filename> directory that are part of
X- the configuration for <filename>/usr/sbin/sliplogin</filename>
X- (see &man.sliplogin.8; for the actual manual page for
X- <command>sliplogin</command>): <filename>slip.hosts</filename>,
X- which defines the SLIP users and their associated IP
X- addresses; <filename>slip.login</filename>, which usually just
X- configures the SLIP interface; and (optionally)
X- <filename>slip.logout</filename>, which undoes
X- <filename>slip.login</filename>'s effects when the serial
X- connection is terminated.</para>
X-
X- <sect4>
X- <title><filename>slip.hosts</filename> Configuration</title>
X-
X- <para><filename>/etc/sliphome/slip.hosts</filename> contains
X- lines which have at least four items separated by
X- whitespace:</para>
X-
X- <itemizedlist>
X- <listitem>
X- <para>SLIP user's login ID</para>
X- </listitem>
X-
X- <listitem>
X- <para>Local address (local to the SLIP server) of the SLIP
X- link</para>
X- </listitem>
X-
X- <listitem>
X- <para>Remote address of the SLIP link</para>
X- </listitem>
X-
X- <listitem>
X- <para>Network mask</para>
X- </listitem>
X- </itemizedlist>
X-
X- <para>The local and remote addresses may be host names
X- (resolved to IP addresses by
X- <filename>/etc/hosts</filename> or by the domain name
X- service, depending on your specifications in the file
X- <filename>/etc/nsswitch.conf</filename>), and the network mask
X- may be a name that can be resolved by a lookup into
X- <filename>/etc/networks</filename>. On a sample system,
X- <filename>/etc/sliphome/slip.hosts</filename> looks like
X- this:</para>
X-
X- <programlisting>#
X-# login local-addr remote-addr mask opt1 opt2
X-# (normal,compress,noicmp)
X-#
X-Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp</programlisting>
X-
X- <para>At the end of the line is one or more of the
X- options:</para>
X-
X- <itemizedlist>
X- <listitem>
X- <para><option>normal</option> — no header
X- compression</para>
X- </listitem>
X-
X- <listitem>
X- <para><option>compress</option> — compress
X- headers</para>
X- </listitem>
X-
X- <listitem>
X- <para><option>autocomp</option> — compress headers if
X- the remote end allows it</para>
X- </listitem>
X-
X- <listitem>
X- <para><option>noicmp</option> — disable ICMP packets
X- (so any <quote>ping</quote> packets will be dropped instead
X- of using up your bandwidth)</para>
X- </listitem>
X- </itemizedlist>
X-
X- <indexterm><primary>SLIP</primary></indexterm>
X- <indexterm><primary>TCP/IP networking</primary></indexterm>
X- <para>Your choice of local and remote addresses for your SLIP
X- links depends on whether you are going to dedicate a TCP/IP
X- subnet or if you are going to use <quote>proxy ARP</quote> on
X- your SLIP server (it is not <quote>true</quote> proxy ARP, but
X- that is the terminology used in this section to describe it).
X- If you are not sure which method to select or how to assign IP
X- addresses, please refer to the TCP/IP books referenced in
X- the SLIP Prerequisites (<xref linkend="slips-prereqs">)
X- and/or consult your IP network manager.</para>
X-
X- <para>If you are going to use a separate subnet for your SLIP
X- clients, you will need to allocate the subnet number out of
X- your assigned IP network number and assign each of your SLIP
X- client's IP numbers out of that subnet. Then, you will
X- probably need to configure a static route to the SLIP
X- subnet via your SLIP server on your nearest IP router.</para>
X-
X- <indexterm><primary>Ethernet</primary></indexterm>
X- <para>Otherwise, if you will use the <quote>proxy ARP</quote>
X- method, you will need to assign your SLIP client's IP
X- addresses out of your SLIP server's Ethernet subnet, and you
X- will also need to adjust your
X- <filename>/etc/sliphome/slip.login</filename> and
X- <filename>/etc/sliphome/slip.logout</filename> scripts to use
X- &man.arp.8; to manage the <quote>proxy ARP</quote> entries in the SLIP
X- server's ARP table.</para>
X- </sect4>
X-
X- <sect4>
X- <title><filename>slip.login</filename> Configuration</title>
X-
X- <para>The typical <filename>/etc/sliphome/slip.login</filename>
X- file looks like this:</para>
X-
X- <programlisting>#!/bin/sh -
X-#
X-# @(#)slip.login 5.1 (Berkeley) 7/1/90
X-
X-#
X-# generic login file for a slip line. sliplogin invokes this with
X-# the parameters:
X-# 1 2 3 4 5 6 7-n
X-# slipunit ttyspeed loginname local-addr remote-addr mask opt-args
X-#
X-/sbin/ifconfig sl$1 inet $4 $5 netmask $6</programlisting>
X-
X- <para>This <filename>slip.login</filename> file merely runs
X- <command>ifconfig</command> for the appropriate SLIP interface
X- with the local and remote addresses and network mask of the
X- SLIP interface.</para>
X-
X- <para>If you have decided to use the <quote>proxy ARP</quote>
X- method (instead of using a separate subnet for your SLIP
X- clients), your <filename>/etc/sliphome/slip.login</filename>
X- file will need to look something like this:</para>
X-
X- <programlisting>#!/bin/sh -
X-#
X-# @(#)slip.login 5.1 (Berkeley) 7/1/90
X-
X-#
X-# generic login file for a slip line. sliplogin invokes this with
X-# the parameters:
X-# 1 2 3 4 5 6 7-n
X-# slipunit ttyspeed loginname local-addr remote-addr mask opt-args
X-#
X-/sbin/ifconfig sl$1 inet $4 $5 netmask $6
X-# Answer ARP requests for the SLIP client with our Ethernet addr
X-/usr/sbin/arp -s $5 00:11:22:33:44:55 pub</programlisting>
X-
X- <para>The additional line in this
X- <filename>slip.login</filename>, <command>arp -s
X- $5 00:11:22:33:44:55 pub</command>, creates an ARP entry
X- in the SLIP server's ARP table. This ARP entry causes the
X- SLIP server to respond with the SLIP server's Ethernet MAC
X- address whenever another IP node on the Ethernet asks to
X- speak to the SLIP client's IP address.</para>
X-
X- <indexterm>
X- <primary>Ethernet</primary>
X- <secondary>MAC address</secondary>
X- </indexterm>
X-
X- <para>When using the example above, be sure to replace the
X- Ethernet MAC address (<hostid
X- role="mac">00:11:22:33:44:55</hostid>) with the MAC address of
X- your system's Ethernet card, or your <quote>proxy ARP</quote>
X- will definitely not work! You can discover your SLIP server's
X- Ethernet MAC address by looking at the results of running
X- <command>netstat -i</command>; the second line of the output
X- should look something like:</para>
X-
X- <screen>ed0 1500 <Link>0.2.c1.28.5f.4a 191923 0 129457 0 116</screen>
X-
X- <para>This indicates that this particular system's Ethernet MAC
X- address is <hostid role="mac">00:02:c1:28:5f:4a</hostid>
X- — the periods in the Ethernet MAC address given by
X- <command>netstat -i</command> must be changed to colons and
X- leading zeros should be added to each single-digit hexadecimal
X- number to convert the address into the form that &man.arp.8;
X- desires; see the manual page on &man.arp.8; for complete
X- information on usage.</para>
X-
X- <note>
X- <para>When you create
X- <filename>/etc/sliphome/slip.login</filename> and
X- <filename>/etc/sliphome/slip.logout</filename>, the
X- <quote>execute</quote> bit (i.e., <command>chmod 755
X- /etc/sliphome/slip.login /etc/sliphome/slip.logout</command>)
X- must be set, or <command>sliplogin</command> will be unable
X- to execute it.</para>
X- </note>
X- </sect4>
X-
X- <sect4>
X- <title><filename>slip.logout</filename> Configuration</title>
X-
X- <para><filename>/etc/sliphome/slip.logout</filename> is not
X- strictly needed (unless you are implementing <quote>proxy
X- ARP</quote>), but if you decide to create it, this is an
X- example of a basic
X- <filename>slip.logout</filename> script:</para>
X-
X- <programlisting>#!/bin/sh -
X-#
X-# slip.logout
X-
X-#
X-# logout file for a slip line. sliplogin invokes this with
X-# the parameters:
X-# 1 2 3 4 5 6 7-n
X-# slipunit ttyspeed loginname local-addr remote-addr mask opt-args
X-#
X-/sbin/ifconfig sl$1 down</programlisting>
X-
X- <para>If you are using <quote>proxy ARP</quote>, you will want to
X- have <filename>/etc/sliphome/slip.logout</filename> remove the
X- ARP entry for the SLIP client:</para>
X-
X- <programlisting>#!/bin/sh -
X-#
X-# @(#)slip.logout
X-
X-#
X-# logout file for a slip line. sliplogin invokes this with
X-# the parameters:
X-# 1 2 3 4 5 6 7-n
X-# slipunit ttyspeed loginname local-addr remote-addr mask opt-args
X-#
X-/sbin/ifconfig sl$1 down
X-# Quit answering ARP requests for the SLIP client
X-/usr/sbin/arp -d $5</programlisting>
X-
X- <para>The <command>arp -d $5</command> removes the ARP entry
X- that the <quote>proxy ARP</quote>
X- <filename>slip.login</filename> added when the SLIP client
X- logged in.</para>
X-
X- <para>It bears repeating: make sure
X- <filename>/etc/sliphome/slip.logout</filename> has the execute
X- bit set after you create it (i.e., <command>chmod 755
X- /etc/sliphome/slip.logout</command>).</para>
X- </sect4>
X- </sect3>
X-
X- <sect3>
X- <title>Routing Considerations</title>
X- <indexterm>
X- <primary>SLIP</primary>
X- <secondary>routing</secondary>
X- </indexterm>
X- <para>If you are not using the <quote>proxy ARP</quote> method for
X- routing packets between your SLIP clients and the rest of your
X- network (and perhaps the Internet), you will probably
X- have to add static routes to your closest default router(s) to
X- route your SLIP clients subnet via your SLIP server.</para>
X-
X- <sect4>
X- <title>Static Routes</title>
X- <indexterm><primary>static routes</primary></indexterm>
X-
X- <para>Adding static routes to your nearest default routers
X- can be troublesome (or impossible if you do not have
X- authority to do so...). If you have a multiple-router
X- network in your organization, some routers, such as those
X- made by Cisco and Proteon, may not only need to be
X- configured with the static route to the SLIP subnet, but
X- also need to be told which static routes to tell other
X- routers about, so some expertise and
X- troubleshooting/tweaking may be necessary to get
X- static-route-based routing to work.</para>
X- </sect4>
X- </sect3>
X- </sect2>
X- </sect1>
X </chapter>
X
X <!--
caa8c35a33a0bbab5ed23ad5917fd940
echo x - preface.sgml.diff
sed 's/^X//' >preface.sgml.diff << '76edf66b30206b0dc62ba161aafbf652'
X--- orig/en_US.ISO8859-1/books/handbook/preface/preface.sgml 2010-02-05 12:24:52.000000000 +1100
X+++ en_US.ISO8859-1/books/handbook/preface/preface.sgml 2010-02-05 13:03:20.000000000 +1100
X@@ -57,6 +57,11 @@
X been added with information about installing &os; on
X virtualization software.</para>
X </listitem>
X+
X+ <listitem>
X+ <para><xref linkend="ppp">, PPP, has been modified to reflect the
X+ removal of slip, slirp, slattach and kernel ppp from &os;.</para>
X+ </listitem>
X </itemizedlist>
X
X <bridgehead id="preface-changes-from2" renderas=sect1>Changes from the
X@@ -106,7 +111,7 @@
X
X <listitem>
X <para>A troubleshooting section has been added to <xref
X- linkend="ppp-and-slip">, PPP and SLIP.</para>
X+ linkend="ppp">, PPP.</para>
X </listitem>
X
X <listitem>
X@@ -209,7 +214,7 @@
X reorganized and updated for FreeBSD 4.X/5.X.</para>
X </listitem>
X <listitem>
X- <para><xref linkend="ppp-and-slip"> (<quote>PPP and SLIP</quote>) has been substantially
X+ <para><xref linkend="ppp"> (<quote>PPP</quote>) has been substantially
X updated.</para>
X </listitem>
X <listitem>
X@@ -482,9 +487,9 @@
X </listitem>
X </varlistentry>
X <varlistentry>
X- <term><emphasis><xref linkend="ppp-and-slip">, PPP and SLIP</emphasis></term>
X+ <term><emphasis><xref linkend="ppp">, PPP</emphasis></term>
X <listitem>
X- <para>Describes how to use PPP, SLIP, or PPP over Ethernet to
X+ <para>Describes how to use PPP or PPP over Ethernet to
X connect to remote systems with FreeBSD.</para>
X </listitem>
X </varlistentry>
76edf66b30206b0dc62ba161aafbf652
exit
--Multipart=_Fri__5_Feb_2010_13_20_32_+1100_yt.VYazy.AzRD9ET--
More information about the freebsd-doc
mailing list