Mark up domain names, hostnames, IP addresses, netmasks and MAC addresses

using the new <hostid> element (with appropriate roles).
This commit is contained in:
Nik Clayton 1998-06-29 09:43:53 +00:00
parent 4649264b1d
commit 1454451780
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=3010
4 changed files with 230 additions and 300 deletions

View file

@ -263,3 +263,17 @@ for example,
18. Yet more things that should be filenames marked up as such.
19. Use the new <hostid> element to mark up hostnames, IP addresses and
such. The markup choice is as follows.
<hostid>...</hostid> is a simple hostname.
<hostid role="ipaddr">...</hostid> is an IP address.
<hostid role="domainname">...</hostid> is a domain name.
<hostid role="fqdn">...</hostid> is a fully qualified domain name.
<hostid role="netmask">...</hostid> is a netmask.
<hostid role="mac">...</hostid> is a network card MAC address.
These might migrate to being separate elements in the future. However,
if they do then changing the markup can be done automatically.

View file

@ -4333,8 +4333,7 @@
<listitem>
<para><emphasis remap=tt>loop</emphasis> is the generic
loopback device for TCP/IP. If you telnet or FTP to
<emphasis>localhost</emphasis> (a.k.a. <emphasis
remap=tt>127.0.0.1</emphasis>) it will come back at you
<hostid>localhost</hostid> (a.k.a. <hostid role="ipaddr">127.0.0.1</hostid>) it will come back at you
through this pseudo-device. Mandatory.</para>
</listitem>
</varlistentry>
@ -5695,7 +5694,7 @@
<command>kinit</command>, see above) access to
<command>rlogin</command> to
<emphasis>jane</emphasis>'s account or files on this system
(<emphasis>grunt</emphasis>) via <command>rlogin</command>, <command>rsh</command> or
(<hostid>grunt</hostid>) via <command>rlogin</command>, <command>rsh</command> or
<command>rcp</command>.</para>
<para>For example, Jane now logs into another system, using
@ -7530,13 +7529,13 @@
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript
v51.4:</programlisting>
</informalexample> In this example, the first printer is named
<emphasis remap=tt>rattan</emphasis> and has as aliases
<hostid>rattan</hostid> and has as aliases
<emphasis remap=tt>line</emphasis>, <emphasis
remap=tt>diablo</emphasis>, <emphasis
remap=tt>lp</emphasis>, and <emphasis remap=tt>Diablo 630
Line Printer</emphasis>. Since it has the alias <emphasis
remap=tt>lp</emphasis>, it is also the default printer. The
second is named <emphasis remap=tt>bamboo</emphasis>, and has
second is named <hostid>bamboo</hostid>, and has
as aliases <emphasis remap=tt>ps</emphasis>,
<option>PS</option>, <emphasis remap=tt>S</emphasis>,
<emphasis remap=tt>panasonic</emphasis>, and <emphasis
@ -7599,8 +7598,7 @@
your network, you might want to put the spooling directories
under a single directory that you reserve just for printing
with LPD. We will do this for our two example printers
<emphasis remap=tt>rattan</emphasis> and <emphasis
remap=tt>bamboo</emphasis>:
<hostid>rattan</hostid> and <hostid>bamboo</hostid>:
<informalexample>
<screen>mkdir /var/spool/lpd mkdir /var/spool/lpd/rattan
mkdir /var/spool/lpd/bamboo</screen>
@ -7663,9 +7661,8 @@
<filename>/etc/printcap</filename> file using the <emphasis
remap=tt>lp</emphasis> capability.</para>
<para>In our running example, let us assume that <emphasis
remap=tt>rattan</emphasis> is on the first parallel port,
and <emphasis remap=tt>bamboo</emphasis> is on a sixth serial
<para>In our running example, let us assume that <hostid>rattan</hostid> is on the first parallel port,
and <hostid>bamboo</hostid> is on a sixth serial
port; here are the additions to
<filename>/etc/printcap</filename>:
<informalexample>
@ -8082,8 +8079,7 @@
<filename>/etc/printcap</filename> from a host
called orchid. It has a single printer attached
to its first parallel port, a Hewlett Packard
LaserJet 3Si named <emphasis
remap=tt>teak</emphasis>. It is using the
LaserJet 3Si named <hostid>teak</hostid>. It is using the
above script as its text filter:
<informalexample>
<programlisting># # /etc/printcap for host
@ -8197,8 +8193,7 @@
(<emphasis remap=tt>lf</emphasis>) capability to the
entry for the printer you are debugging in the
<filename>/etc/printcap</filename> file. For example,
here is the entry for <emphasis
remap=tt>rattan</emphasis>, with the <emphasis
here is the entry for <hostid>rattan</hostid>, with the <emphasis
remap=tt>lf</emphasis> capability:
<informalexample>
<screen>rattan|line|diablo|lp|Diablo 630 Line
@ -8304,8 +8299,7 @@
<screen><command>lpr -P <replaceable>printer-name</replaceable>
<replaceable>filename...</replaceable></command></screen>
</informalexample> This example prints a long listing of the
current directory to the printer named <emphasis
remap=tt>rattan</emphasis>:
current directory to the printer named <hostid>rattan</hostid>:
<informalexample>
<screen>ls -l | lpr -P rattan</screen>
</informalexample> Because no files were listed for the <ulink
@ -8343,8 +8337,7 @@
example, the command
<informalexample>
<screen>lpq -P bamboo</screen>
</informalexample> shows the queue for the printer named <emphasis
remap=tt>bamboo</emphasis>. Here is an example of the output of
</informalexample> shows the queue for the printer named <hostid>bamboo</hostid>. Here is an example of the output of
the <command>lpq</command> command:
<informalexample>
<screen>bamboo is ready and printing Rank Owner Job Files
@ -8353,7 +8346,7 @@
input) 1635 bytes 3rd mary 11 ...
78519 bytes</screen>
</informalexample> This shows three jobs in the queue for
<emphasis remap=tt>bamboo</emphasis>. The first job, submitted by
<hostid>bamboo</hostid>. The first job, submitted by
user kelly, got assigned <emphasis>job number</emphasis> 9. Every
job for a printer gets a unique job number. Most of the time you
can ignore the job number, but you will need it if you want to
@ -8421,8 +8414,7 @@
<replaceable>job-number</replaceable></emphasis></screen>
</informalexample> To remove the job from a specific printer, add
the <option>-P</option> option. The following command removes job
number 10 from the queue for the printer <emphasis
remap=tt>bamboo</emphasis>:
number 10 from the queue for the printer <hostid>bamboo</hostid>:
<informalexample>
<screen>lprm -P bamboo 10</screen>
</informalexample> The <ulink
@ -8463,8 +8455,7 @@
<para>Just use the <option>-P</option> option with the above
shortcuts to operate on a specific printer instead of the default.
For example, the following command removes all jobs for the
current user in the queue for the printer named <emphasis
remap=tt>rattan</emphasis>:</para>
current user in the queue for the printer named <hostid>rattan</hostid>:</para>
<para>
<informalexample>
@ -8521,7 +8512,7 @@
<para>For example, the following command prints a DVI file (from
the TeX typesetting system) named
<filename>fish-report.dvi</filename> to the printer named
<emphasis remap=tt>bamboo</emphasis>:
<hostid>bamboo</hostid>:
<informalexample>
<screen>lpr -P bamboo -d fish-report.dvi</screen>
</informalexample> These options apply to every file in the job,
@ -9588,11 +9579,10 @@
<filename>/etc/printcap</filename>.</para>
<para>In our example, we will add the DVI conversion filter to
the entry for the printer named <emphasis
remap=tt>bamboo</emphasis>. Here is the example
the entry for the printer named <hostid>bamboo</hostid>. Here is the example
<filename>/etc/printcap</filename> file again, with the new
<emphasis remap=tt>df</emphasis> capability for the printer
<emphasis remap=tt>bamboo</emphasis>
<hostid>bamboo</hostid>
<informalexample>
<programlisting># # /etc/printcap for host rose - added df
filter for bamboo # rattan|line|diablo|lp|Diablo 630 Line
@ -9656,7 +9646,7 @@
<para>The following script is a conversion filter for troff data
from the groff typesetting system for the PostScript printer
named <emphasis remap=tt>bamboo</emphasis>:
named <hostid>bamboo</hostid>:
<informalexample>
<programlisting>#!/bin/sh # # pstf - Convert groff's troff
data into PS, then print. # Installed in
@ -9680,23 +9670,21 @@
<para>Here is an example that might make old hands at FORTRAN
blush. It is a FORTRAN-text filter for any printer that can
directly print plain text. We will install it for the printer
<emphasis remap=tt>teak</emphasis>:
<hostid>teak</hostid>:
<informalexample>
<programlisting>#!/bin/sh # # hprf - FORTRAN text filter for
LaserJet 3si: # Installed in /usr/local/libexec/hprf #
printf "\033&amp;k2G" &amp;&amp; fpr &amp;&amp; printf
"\f" &amp;&amp; exit 0 exit 2</programlisting>
</informalexample> And we will add this line to the
<filename>/etc/printcap</filename> for the printer <emphasis
remap=tt>teak</emphasis> to enable this filter:
<filename>/etc/printcap</filename> for the printer <hostid>teak</hostid> to enable this filter:
<informalexample>
<screen> :rf=/usr/local/libexec/hprf:</screen>
</informalexample>
</para>
<para>Here is one final, somewhat complex example. We will add
a DVI filter to the LaserJet printer <emphasis
remap=tt>teak</emphasis> introduced earlier. First, the
a DVI filter to the LaserJet printer <hostid>teak</hostid> introduced earlier. First, the
easy part: updating <filename>/etc/printcap</filename> with
the location of the DVI filter:
<informalexample>
@ -9968,7 +9956,7 @@
remap="Output Filters"> for more information.</para>
<para>Here is an example <filename>/etc/printcap</filename> file
for the printer <emphasis remap=tt>teak</emphasis> that we
for the printer <hostid>teak</hostid> that we
introduced earlier; we enabled header pages and added the above
output filter:
<informalexample>
@ -9977,8 +9965,7 @@
:lp=/dev/lpt0:sd=/var/spool/lpd/teak:mx#0:\
:if=/usr/local/libexec/hpif:\ :vf=/usr/local/libexec/hpvf:\
:of=/usr/local/libexec/hpof:</programlisting>
</informalexample> Now, when users print jobs to <emphasis
remap=tt>teak</emphasis>, they get a header page with each
</informalexample> Now, when users print jobs to <hostid>teak</hostid>, they get a header page with each
job. If users want to spend time searching for their printouts,
they can suppress header pages by submitting the job with
<command>lpr -h</command>; see <xref
@ -10349,14 +10336,13 @@
<filename>/etc/printcap</filename> file.</para>
<para>Here is an example. The host rose has two printers,
<emphasis remap=tt>bamboo</emphasis> and <emphasis
remap=tt>rattan</emphasis>. We will enable users on the host
<hostid>bamboo</hostid> and <hostid>rattan</hostid>. We will enable users on the host
orchid to print to those printers. Here is the
<filename>/etc/printcap</filename> file for orchid (back from
section
<xref linkend="printing-advanced-header-pages-enabling"
remap="Enabling Header Pages">). It already had the entry for
the printer <emphasis remap=tt>teak</emphasis>; we have added
the printer <hostid>teak</hostid>; we have added
entries for the two printers on the host rose:
<informalexample>
<programlisting># # /etc/printcap for host orchid - added
@ -10383,17 +10369,14 @@
</informalexample>
</para>
<para>Now, users on orchid can print to <emphasis
remap=tt>rattan</emphasis> and <emphasis
remap=tt>bamboo</emphasis>. If, for example, a user on orchid
<para>Now, users on orchid can print to <hostid>rattan</hostid> and <hostid>bamboo</hostid>. If, for example, a user on orchid
typed
<informalexample>
<screen>lpr -P bamboo -d sushi-review.dvi</screen>
</informalexample> the LPD system on orchid would copy the job
to the spooling directory
<filename>/var/spool/lpd/bamboo</filename> and note that it was
a DVI job. As soon as the host rose has room in its <emphasis
remap=tt>bamboo</emphasis> spooling directory, the two LPDs
a DVI job. As soon as the host rose has room in its <hostid>bamboo</hostid> spooling directory, the two LPDs
would transfer the file to rose. The file would wait in rose's
queue until it was finally printed. It would be converted from
DVI to PostScript (since bamboo is a PostScript printer) on
@ -10508,9 +10491,8 @@
<para>Here is an example. This is the
<filename>/etc/printcap</filename> file for the host rose. The
printer <emphasis remap=tt>rattan</emphasis> is quite hearty, so
we will allow multiple copies, but the laser printer <emphasis
remap=tt>bamboo</emphasis>'s a bit more delicate, so we will
printer <hostid>rattan</hostid> is quite hearty, so
we will allow multiple copies, but the laser printer <hostid>bamboo</hostid>'s a bit more delicate, so we will
disable multiple copies by adding the <emphasis
remap=tt>sc</emphasis> capability:
<informalexample>
@ -10526,8 +10508,7 @@
</informalexample> Now, we also need to add the <emphasis
remap=tt>sc</emphasis> capability on the host orchid's
<filename>/etc/printcap</filename> (and while we are at it, let
us disable multiple copies for the printer <emphasis
remap=tt>teak</emphasis>):
us disable multiple copies for the printer <hostid>teak</hostid>):
<informalexample>
<programlisting># # /etc/printcap for host orchid - no
multiple copies for local # printer teak or remote printer
@ -10579,10 +10560,8 @@
<xref linkend="printing-advanced-network-rm"
remap="Printers Installed on Remote Hosts">).</para>
<para>For example, we will let anyone access the printer <emphasis
remap=tt>rattan</emphasis>, but only those in group <emphasis
remap=tt>artists</emphasis> can use <emphasis
remap=tt>bamboo</emphasis>. Here is the familiar
<para>For example, we will let anyone access the printer <hostid>rattan</hostid>, but only those in group <emphasis
remap=tt>artists</emphasis> can use <hostid>bamboo</hostid>. Here is the familiar
<filename>/etc/printcap</filename> for host rose:
<informalexample>
<programlisting># # /etc/printcap for host rose - restricted
@ -10596,8 +10575,7 @@
:df=/usr/local/libexec/psdf:</programlisting>
</informalexample> Let us leave the other example
<filename>/etc/printcap</filename> file (for the host orchid)
alone. Of course, anyone on orchid can print to <emphasis
remap=tt>bamboo</emphasis>. It might be the case that we only
alone. Of course, anyone on orchid can print to <hostid>bamboo</hostid>. It might be the case that we only
allow certain logins on orchid anyway, and want them to have
access to the printer. Or not.</para>
@ -10634,9 +10612,7 @@
discarded. Whether this is correct behavior is up for
debate.</para>
<para>Let us add limits to our example printers <emphasis
remap=tt>rattan</emphasis> and <emphasis
remap=tt>bamboo</emphasis>. Since those artists' PostScript
<para>Let us add limits to our example printers <hostid>rattan</hostid> and <hostid>bamboo</hostid>. Since those artists' PostScript
files tend to be large, we will limit them to five megabytes.
We will put no limit on the plain text line printer:
<informalexample>
@ -10726,10 +10702,9 @@
<para>For example, let us add a
<filename>minfree</filename> file for the printer
<emphasis remap=tt>bamboo</emphasis>. We examine
<hostid>bamboo</hostid>. We examine
<filename>/etc/printcap</filename> to find the spooling
directory for this printer; here is <emphasis
remap=tt>bamboo</emphasis>'s entry:
directory for this printer; here is <hostid>bamboo</hostid>'s entry:
<informalexample>
<screen>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455
PostScript v51.4:\
@ -19387,14 +19362,14 @@
</informalexample>
</para>
<para>The first line defines the alias ``localhost'' as a synonym
<para>The first line defines the alias <hostid>localhost</hostid> as a synonym
for the current machine. Regardless of your own IP address, the
IP address for this line should always be 127.0.0.1. The second
line maps the name ``foo.bar.com'' (and the shorthand ``foo'')
to the IP address 10.0.0.1.</para>
IP address for this line should always be <hostid role="ipaddr">127.0.0.1</hostid>. The second
line maps the name <hostid role="fqdn">foo.bar.com</hostid> (and the shorthand <hostid>foo</hostid>)
to the IP address <hostid role="ipaddr">10.0.0.1</hostid>.</para>
<para>If your provider allocates you a static IP address and name,
then use these in place of the 10.0.0.1 entry.</para>
then use these in place of the <hostid role="ipaddr">10.0.0.1</hostid> entry.</para>
</sect3>
@ -19591,7 +19566,7 @@
replaced by the IP address that your ISP indicated for
their gateway (the machine to which you connect). If
your ISP hasn't given you a gateway address, use
<emphasis remap="tt">10.0.0.2/0</emphasis>. If you need
<hostid role="netmask">10.0.0.2/0</hostid>. If you need
to use a <quote>guessed</quote> address, make sure that you create
an entry in <filename>/etc/ppp/ppp.linkup</filename> as
per the instructions for
@ -19683,10 +19658,10 @@
</informalexample>
</para>
<para>This tells ppp to negotiate using address <emphasis
remap=tt>0.0.0.0</emphasis> rather than <emphasis
remap=tt>10.0.0.1</emphasis>. Do not use <emphasis
remap="tt">0.0.0.0/0</emphasis> as the first argument
<para>This tells ppp to negotiate using address <hostid
role="ipaddr">0.0.0.0</hostid> rather than <hostid
role="ipaddr">10.0.0.1</hostid>. Do not use <hostid
role="netmask">0.0.0.0/0</hostid> as the first argument
to <command>set ifaddr</command> as it
prevents ppp from setting up an initial route in
<option>-auto</option> and <option>-ddial</option>
@ -19952,8 +19927,8 @@
<para>The file <filename>/etc/ppp/ppp.linkup</filename> should
also contain routing information for each static IP user if
required. The line below would add a route for the <emphasis
remap=tt>203.14.101.0</emphasis> class C via the client's
required. The line below would add a route for the <hostid
role="ipaddr">203.14.101.0</hostid> class C via the client's
ppp link.</para>
<para>
@ -21353,8 +21328,7 @@
asks to speak to the SLIP client's IP address.</para>
<para>When using the example above, be sure to replace the
Ethernet MAC address (<emphasis
remap=tt>00:11:22:33:44:55</emphasis>) with the MAC address of
Ethernet MAC address (<hostid role="mac">00:11:22:33:44:55</hostid>) with the MAC address of
your system's Ethernet card, or your <quote>proxy ARP</quote> will
definitely not work! You can discover your SLIP server's
Ethernet MAC address by looking at the results of running
@ -21370,7 +21344,7 @@
</para>
<para>which indicates that this particular system's Ethernet MAC
address is <emphasis remap=tt>00:02:c1:28:5f:4a</emphasis> --
address is <hostid role="mac">00:02:c1:28:5f:4a</hostid> --
the periods in the Ethernet MAC address given by
<command>netstat -i</command> must be changed to colons and
leading zeros should be added to each single-digit hexadecimal
@ -21604,8 +21578,7 @@
</para>
<para>The first two lines specify the default route (which we will
cover in the next section) and the <emphasis
remap=tt>localhost</emphasis> route.</para>
cover in the next section) and the <hostid>localhost</hostid> route.</para>
<para>The interface (<emphasis remap=tt>Netif</emphasis> column)
that it specifies to use for <emphasis
@ -21615,8 +21588,7 @@
than sending it out over the LAN, since it will only end up back
where it started anyway.</para>
<para>The next thing that stands out are the <emphasis
remap=tt>0:e0:...</emphasis> addresses. These are ethernet
<para>The next thing that stands out are the <hostid role="mac">0:e0:...</hostid> addresses. These are ethernet
hardware addresses. FreeBSD will automatically identify any hosts
(<emphasis remap=tt>test0</emphasis> in the example) on the local
ethernet and add a route for that host, directly to it over the
@ -21630,9 +21602,9 @@
determination.</para>
<para>FreeBSD will also add subnet routes for the local subnet
(<emphasis remap=tt>10.20.30.255</emphasis> is the broadcast
address for the subnet <emphasis remap=tt>10.20.30</emphasis>, and
<emphasis remap="tt">foobar.com</emphasis> is the domain name
(<hostid role="ipaddr">10.20.30.255</hostid> is the broadcast
address for the subnet <hostid role="ipaddr">10.20.30</hostid>, and
<hostid role="domainname">foobar.com</hostid> is the domain name
associated with that subnet). The designation <emphasis
remap=tt>link#1</emphasis> refers to the first ethernet card in
the machine. You will notice no additional interface is specified
@ -21767,8 +21739,7 @@
</informalexample>
</para>
<para>The hosts <emphasis remap=tt>Local1</emphasis> and <emphasis
remap=tt>Local2</emphasis> are at your site, with the formed
<para>The hosts <hostid>Local1</hostid> and <hostid>Local2</hostid> are at your site, with the formed
being your PPP connection to your ISP's Terminal Server. Your ISP
has a local network at their site, which has, among other things,
the server where you connect and a hardware device (T1-GW)
@ -21795,11 +21766,11 @@
the T1-GW machine, so there is no need for the intermediate step
of sending traffic to the ISP server.</para>
<para>As a final note, it is common to use the address <emphasis
remap=tt>...1</emphasis> as the gateway address for your local
<para>As a final note, it is common to use the address <hostid
role="ipaddr">...1</hostid> as the gateway address for your local
network. So (using the same example), if your local class-C
address space was <emphasis remap=tt>10.20.30</emphasis> and your
ISP was using <emphasis remap=tt>10.9.9</emphasis> then the
address space was <hostid role="ipaddr">10.20.30</hostid> and your
ISP was using <hostid role="ipaddr">10.9.9</hostid> then the
default routes would be:</para>
<para>
@ -22610,10 +22581,10 @@
<para>- Run a name server ( <emphasis remap=tt><command>man -k
named</command></emphasis> ) and have your own domain
<emphasis remap=tt>smallminingco.com </emphasis></para>
<hostid role="domainname">smallminingco.com </hostid></para>
<para>- Get mail delivered to the current DNS name for your host.
Ie: <emphasis remap=tt>dorm6.ahouse.school.edu </emphasis> </para>
Ie: <hostid role="fqdn">dorm6.ahouse.school.edu </hostid> </para>
<para>No matter what option you choose, to have mail delivered
directly to your host, you must be a full Internet host. You must
@ -22682,8 +22653,8 @@
<para>To setup up a network mailhost, you need to direct the mail
from arriving at all the workstations. In other words, you want to
hijack all mail for <emphasis remap=tt> *.smallminingco.com
</emphasis> and divert it to one machine, your mailhost.</para>
hijack all mail for <hostid role="domainname"> *.smallminingco.com
</hostid> and divert it to one machine, your mailhost.</para>
<para>The network users on their workstations will most likely pick
up their mail over POP or telnet. </para>
@ -22900,22 +22871,23 @@
<title>Why do I have to use the FQDN for hosts on my site?</title>
<para>You will probably find that the host is actually in a
different domain; for example, if you are in foo.bar.edu and you
wish to reach a host called ``mumble'' in the bar.edu domain, you
different domain; for example, if you are in <hostid role="fqdn">foo.bar.edu</hostid> and you
wish to reach a host called <hostid>mumble</hostid> in the <hostid
role="domainname">bar.edu</hostid> domain, you
will have to refer to it by the fully-qualified domain name,
``mumble.bar.edu'', instead of just ``mumble''. </para>
<hostid role="fqdn">mumble.bar.edu</hostid>, instead of just <hostid>mumble</hostid>. </para>
<para>Traditionally, this was allowed by BSD BIND resolvers. However
the current version of <application>BIND</application> that ships with
FreeBSD no longer provides default abbreviations for non-fully
qualified domain names other than the domain you are in. So an
unqualified host <emphasis remap=tt>mumble</emphasis> must either
be found as <emphasis remap="tt">mumble.foo.bar.edu</emphasis>, or
unqualified host <hostid>mumble</hostid> must either
be found as <hostid role="fqdn">mumble.foo.bar.edu</hostid>, or
it will be searched for in the root domain.</para>
<para>This is different from the previous behavior, where the search
continued across <emphasis remap="tt">mumble.bar.edu</emphasis>,
and <emphasis remap="tt">mumble.edu</emphasis>. Have a look at
continued across <hostid role="domainname">mumble.bar.edu</hostid>,
and <hostid role="domainname">mumble.edu</hostid>. Have a look at
RFC 1535 for why this was considered bad practice, or even a
security hole.</para>

View file

@ -4333,8 +4333,7 @@
<listitem>
<para><emphasis remap=tt>loop</emphasis> is the generic
loopback device for TCP/IP. If you telnet or FTP to
<emphasis>localhost</emphasis> (a.k.a. <emphasis
remap=tt>127.0.0.1</emphasis>) it will come back at you
<hostid>localhost</hostid> (a.k.a. <hostid role="ipaddr">127.0.0.1</hostid>) it will come back at you
through this pseudo-device. Mandatory.</para>
</listitem>
</varlistentry>
@ -5695,7 +5694,7 @@
<command>kinit</command>, see above) access to
<command>rlogin</command> to
<emphasis>jane</emphasis>'s account or files on this system
(<emphasis>grunt</emphasis>) via <command>rlogin</command>, <command>rsh</command> or
(<hostid>grunt</hostid>) via <command>rlogin</command>, <command>rsh</command> or
<command>rcp</command>.</para>
<para>For example, Jane now logs into another system, using
@ -7530,13 +7529,13 @@
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript
v51.4:</programlisting>
</informalexample> In this example, the first printer is named
<emphasis remap=tt>rattan</emphasis> and has as aliases
<hostid>rattan</hostid> and has as aliases
<emphasis remap=tt>line</emphasis>, <emphasis
remap=tt>diablo</emphasis>, <emphasis
remap=tt>lp</emphasis>, and <emphasis remap=tt>Diablo 630
Line Printer</emphasis>. Since it has the alias <emphasis
remap=tt>lp</emphasis>, it is also the default printer. The
second is named <emphasis remap=tt>bamboo</emphasis>, and has
second is named <hostid>bamboo</hostid>, and has
as aliases <emphasis remap=tt>ps</emphasis>,
<option>PS</option>, <emphasis remap=tt>S</emphasis>,
<emphasis remap=tt>panasonic</emphasis>, and <emphasis
@ -7599,8 +7598,7 @@
your network, you might want to put the spooling directories
under a single directory that you reserve just for printing
with LPD. We will do this for our two example printers
<emphasis remap=tt>rattan</emphasis> and <emphasis
remap=tt>bamboo</emphasis>:
<hostid>rattan</hostid> and <hostid>bamboo</hostid>:
<informalexample>
<screen>mkdir /var/spool/lpd mkdir /var/spool/lpd/rattan
mkdir /var/spool/lpd/bamboo</screen>
@ -7663,9 +7661,8 @@
<filename>/etc/printcap</filename> file using the <emphasis
remap=tt>lp</emphasis> capability.</para>
<para>In our running example, let us assume that <emphasis
remap=tt>rattan</emphasis> is on the first parallel port,
and <emphasis remap=tt>bamboo</emphasis> is on a sixth serial
<para>In our running example, let us assume that <hostid>rattan</hostid> is on the first parallel port,
and <hostid>bamboo</hostid> is on a sixth serial
port; here are the additions to
<filename>/etc/printcap</filename>:
<informalexample>
@ -8082,8 +8079,7 @@
<filename>/etc/printcap</filename> from a host
called orchid. It has a single printer attached
to its first parallel port, a Hewlett Packard
LaserJet 3Si named <emphasis
remap=tt>teak</emphasis>. It is using the
LaserJet 3Si named <hostid>teak</hostid>. It is using the
above script as its text filter:
<informalexample>
<programlisting># # /etc/printcap for host
@ -8197,8 +8193,7 @@
(<emphasis remap=tt>lf</emphasis>) capability to the
entry for the printer you are debugging in the
<filename>/etc/printcap</filename> file. For example,
here is the entry for <emphasis
remap=tt>rattan</emphasis>, with the <emphasis
here is the entry for <hostid>rattan</hostid>, with the <emphasis
remap=tt>lf</emphasis> capability:
<informalexample>
<screen>rattan|line|diablo|lp|Diablo 630 Line
@ -8304,8 +8299,7 @@
<screen><command>lpr -P <replaceable>printer-name</replaceable>
<replaceable>filename...</replaceable></command></screen>
</informalexample> This example prints a long listing of the
current directory to the printer named <emphasis
remap=tt>rattan</emphasis>:
current directory to the printer named <hostid>rattan</hostid>:
<informalexample>
<screen>ls -l | lpr -P rattan</screen>
</informalexample> Because no files were listed for the <ulink
@ -8343,8 +8337,7 @@
example, the command
<informalexample>
<screen>lpq -P bamboo</screen>
</informalexample> shows the queue for the printer named <emphasis
remap=tt>bamboo</emphasis>. Here is an example of the output of
</informalexample> shows the queue for the printer named <hostid>bamboo</hostid>. Here is an example of the output of
the <command>lpq</command> command:
<informalexample>
<screen>bamboo is ready and printing Rank Owner Job Files
@ -8353,7 +8346,7 @@
input) 1635 bytes 3rd mary 11 ...
78519 bytes</screen>
</informalexample> This shows three jobs in the queue for
<emphasis remap=tt>bamboo</emphasis>. The first job, submitted by
<hostid>bamboo</hostid>. The first job, submitted by
user kelly, got assigned <emphasis>job number</emphasis> 9. Every
job for a printer gets a unique job number. Most of the time you
can ignore the job number, but you will need it if you want to
@ -8421,8 +8414,7 @@
<replaceable>job-number</replaceable></emphasis></screen>
</informalexample> To remove the job from a specific printer, add
the <option>-P</option> option. The following command removes job
number 10 from the queue for the printer <emphasis
remap=tt>bamboo</emphasis>:
number 10 from the queue for the printer <hostid>bamboo</hostid>:
<informalexample>
<screen>lprm -P bamboo 10</screen>
</informalexample> The <ulink
@ -8463,8 +8455,7 @@
<para>Just use the <option>-P</option> option with the above
shortcuts to operate on a specific printer instead of the default.
For example, the following command removes all jobs for the
current user in the queue for the printer named <emphasis
remap=tt>rattan</emphasis>:</para>
current user in the queue for the printer named <hostid>rattan</hostid>:</para>
<para>
<informalexample>
@ -8521,7 +8512,7 @@
<para>For example, the following command prints a DVI file (from
the TeX typesetting system) named
<filename>fish-report.dvi</filename> to the printer named
<emphasis remap=tt>bamboo</emphasis>:
<hostid>bamboo</hostid>:
<informalexample>
<screen>lpr -P bamboo -d fish-report.dvi</screen>
</informalexample> These options apply to every file in the job,
@ -9588,11 +9579,10 @@
<filename>/etc/printcap</filename>.</para>
<para>In our example, we will add the DVI conversion filter to
the entry for the printer named <emphasis
remap=tt>bamboo</emphasis>. Here is the example
the entry for the printer named <hostid>bamboo</hostid>. Here is the example
<filename>/etc/printcap</filename> file again, with the new
<emphasis remap=tt>df</emphasis> capability for the printer
<emphasis remap=tt>bamboo</emphasis>
<hostid>bamboo</hostid>
<informalexample>
<programlisting># # /etc/printcap for host rose - added df
filter for bamboo # rattan|line|diablo|lp|Diablo 630 Line
@ -9656,7 +9646,7 @@
<para>The following script is a conversion filter for troff data
from the groff typesetting system for the PostScript printer
named <emphasis remap=tt>bamboo</emphasis>:
named <hostid>bamboo</hostid>:
<informalexample>
<programlisting>#!/bin/sh # # pstf - Convert groff's troff
data into PS, then print. # Installed in
@ -9680,23 +9670,21 @@
<para>Here is an example that might make old hands at FORTRAN
blush. It is a FORTRAN-text filter for any printer that can
directly print plain text. We will install it for the printer
<emphasis remap=tt>teak</emphasis>:
<hostid>teak</hostid>:
<informalexample>
<programlisting>#!/bin/sh # # hprf - FORTRAN text filter for
LaserJet 3si: # Installed in /usr/local/libexec/hprf #
printf "\033&amp;k2G" &amp;&amp; fpr &amp;&amp; printf
"\f" &amp;&amp; exit 0 exit 2</programlisting>
</informalexample> And we will add this line to the
<filename>/etc/printcap</filename> for the printer <emphasis
remap=tt>teak</emphasis> to enable this filter:
<filename>/etc/printcap</filename> for the printer <hostid>teak</hostid> to enable this filter:
<informalexample>
<screen> :rf=/usr/local/libexec/hprf:</screen>
</informalexample>
</para>
<para>Here is one final, somewhat complex example. We will add
a DVI filter to the LaserJet printer <emphasis
remap=tt>teak</emphasis> introduced earlier. First, the
a DVI filter to the LaserJet printer <hostid>teak</hostid> introduced earlier. First, the
easy part: updating <filename>/etc/printcap</filename> with
the location of the DVI filter:
<informalexample>
@ -9968,7 +9956,7 @@
remap="Output Filters"> for more information.</para>
<para>Here is an example <filename>/etc/printcap</filename> file
for the printer <emphasis remap=tt>teak</emphasis> that we
for the printer <hostid>teak</hostid> that we
introduced earlier; we enabled header pages and added the above
output filter:
<informalexample>
@ -9977,8 +9965,7 @@
:lp=/dev/lpt0:sd=/var/spool/lpd/teak:mx#0:\
:if=/usr/local/libexec/hpif:\ :vf=/usr/local/libexec/hpvf:\
:of=/usr/local/libexec/hpof:</programlisting>
</informalexample> Now, when users print jobs to <emphasis
remap=tt>teak</emphasis>, they get a header page with each
</informalexample> Now, when users print jobs to <hostid>teak</hostid>, they get a header page with each
job. If users want to spend time searching for their printouts,
they can suppress header pages by submitting the job with
<command>lpr -h</command>; see <xref
@ -10349,14 +10336,13 @@
<filename>/etc/printcap</filename> file.</para>
<para>Here is an example. The host rose has two printers,
<emphasis remap=tt>bamboo</emphasis> and <emphasis
remap=tt>rattan</emphasis>. We will enable users on the host
<hostid>bamboo</hostid> and <hostid>rattan</hostid>. We will enable users on the host
orchid to print to those printers. Here is the
<filename>/etc/printcap</filename> file for orchid (back from
section
<xref linkend="printing-advanced-header-pages-enabling"
remap="Enabling Header Pages">). It already had the entry for
the printer <emphasis remap=tt>teak</emphasis>; we have added
the printer <hostid>teak</hostid>; we have added
entries for the two printers on the host rose:
<informalexample>
<programlisting># # /etc/printcap for host orchid - added
@ -10383,17 +10369,14 @@
</informalexample>
</para>
<para>Now, users on orchid can print to <emphasis
remap=tt>rattan</emphasis> and <emphasis
remap=tt>bamboo</emphasis>. If, for example, a user on orchid
<para>Now, users on orchid can print to <hostid>rattan</hostid> and <hostid>bamboo</hostid>. If, for example, a user on orchid
typed
<informalexample>
<screen>lpr -P bamboo -d sushi-review.dvi</screen>
</informalexample> the LPD system on orchid would copy the job
to the spooling directory
<filename>/var/spool/lpd/bamboo</filename> and note that it was
a DVI job. As soon as the host rose has room in its <emphasis
remap=tt>bamboo</emphasis> spooling directory, the two LPDs
a DVI job. As soon as the host rose has room in its <hostid>bamboo</hostid> spooling directory, the two LPDs
would transfer the file to rose. The file would wait in rose's
queue until it was finally printed. It would be converted from
DVI to PostScript (since bamboo is a PostScript printer) on
@ -10508,9 +10491,8 @@
<para>Here is an example. This is the
<filename>/etc/printcap</filename> file for the host rose. The
printer <emphasis remap=tt>rattan</emphasis> is quite hearty, so
we will allow multiple copies, but the laser printer <emphasis
remap=tt>bamboo</emphasis>'s a bit more delicate, so we will
printer <hostid>rattan</hostid> is quite hearty, so
we will allow multiple copies, but the laser printer <hostid>bamboo</hostid>'s a bit more delicate, so we will
disable multiple copies by adding the <emphasis
remap=tt>sc</emphasis> capability:
<informalexample>
@ -10526,8 +10508,7 @@
</informalexample> Now, we also need to add the <emphasis
remap=tt>sc</emphasis> capability on the host orchid's
<filename>/etc/printcap</filename> (and while we are at it, let
us disable multiple copies for the printer <emphasis
remap=tt>teak</emphasis>):
us disable multiple copies for the printer <hostid>teak</hostid>):
<informalexample>
<programlisting># # /etc/printcap for host orchid - no
multiple copies for local # printer teak or remote printer
@ -10579,10 +10560,8 @@
<xref linkend="printing-advanced-network-rm"
remap="Printers Installed on Remote Hosts">).</para>
<para>For example, we will let anyone access the printer <emphasis
remap=tt>rattan</emphasis>, but only those in group <emphasis
remap=tt>artists</emphasis> can use <emphasis
remap=tt>bamboo</emphasis>. Here is the familiar
<para>For example, we will let anyone access the printer <hostid>rattan</hostid>, but only those in group <emphasis
remap=tt>artists</emphasis> can use <hostid>bamboo</hostid>. Here is the familiar
<filename>/etc/printcap</filename> for host rose:
<informalexample>
<programlisting># # /etc/printcap for host rose - restricted
@ -10596,8 +10575,7 @@
:df=/usr/local/libexec/psdf:</programlisting>
</informalexample> Let us leave the other example
<filename>/etc/printcap</filename> file (for the host orchid)
alone. Of course, anyone on orchid can print to <emphasis
remap=tt>bamboo</emphasis>. It might be the case that we only
alone. Of course, anyone on orchid can print to <hostid>bamboo</hostid>. It might be the case that we only
allow certain logins on orchid anyway, and want them to have
access to the printer. Or not.</para>
@ -10634,9 +10612,7 @@
discarded. Whether this is correct behavior is up for
debate.</para>
<para>Let us add limits to our example printers <emphasis
remap=tt>rattan</emphasis> and <emphasis
remap=tt>bamboo</emphasis>. Since those artists' PostScript
<para>Let us add limits to our example printers <hostid>rattan</hostid> and <hostid>bamboo</hostid>. Since those artists' PostScript
files tend to be large, we will limit them to five megabytes.
We will put no limit on the plain text line printer:
<informalexample>
@ -10726,10 +10702,9 @@
<para>For example, let us add a
<filename>minfree</filename> file for the printer
<emphasis remap=tt>bamboo</emphasis>. We examine
<hostid>bamboo</hostid>. We examine
<filename>/etc/printcap</filename> to find the spooling
directory for this printer; here is <emphasis
remap=tt>bamboo</emphasis>'s entry:
directory for this printer; here is <hostid>bamboo</hostid>'s entry:
<informalexample>
<screen>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455
PostScript v51.4:\
@ -19387,14 +19362,14 @@
</informalexample>
</para>
<para>The first line defines the alias ``localhost'' as a synonym
<para>The first line defines the alias <hostid>localhost</hostid> as a synonym
for the current machine. Regardless of your own IP address, the
IP address for this line should always be 127.0.0.1. The second
line maps the name ``foo.bar.com'' (and the shorthand ``foo'')
to the IP address 10.0.0.1.</para>
IP address for this line should always be <hostid role="ipaddr">127.0.0.1</hostid>. The second
line maps the name <hostid role="fqdn">foo.bar.com</hostid> (and the shorthand <hostid>foo</hostid>)
to the IP address <hostid role="ipaddr">10.0.0.1</hostid>.</para>
<para>If your provider allocates you a static IP address and name,
then use these in place of the 10.0.0.1 entry.</para>
then use these in place of the <hostid role="ipaddr">10.0.0.1</hostid> entry.</para>
</sect3>
@ -19591,7 +19566,7 @@
replaced by the IP address that your ISP indicated for
their gateway (the machine to which you connect). If
your ISP hasn't given you a gateway address, use
<emphasis remap="tt">10.0.0.2/0</emphasis>. If you need
<hostid role="netmask">10.0.0.2/0</hostid>. If you need
to use a <quote>guessed</quote> address, make sure that you create
an entry in <filename>/etc/ppp/ppp.linkup</filename> as
per the instructions for
@ -19683,10 +19658,10 @@
</informalexample>
</para>
<para>This tells ppp to negotiate using address <emphasis
remap=tt>0.0.0.0</emphasis> rather than <emphasis
remap=tt>10.0.0.1</emphasis>. Do not use <emphasis
remap="tt">0.0.0.0/0</emphasis> as the first argument
<para>This tells ppp to negotiate using address <hostid
role="ipaddr">0.0.0.0</hostid> rather than <hostid
role="ipaddr">10.0.0.1</hostid>. Do not use <hostid
role="netmask">0.0.0.0/0</hostid> as the first argument
to <command>set ifaddr</command> as it
prevents ppp from setting up an initial route in
<option>-auto</option> and <option>-ddial</option>
@ -19952,8 +19927,8 @@
<para>The file <filename>/etc/ppp/ppp.linkup</filename> should
also contain routing information for each static IP user if
required. The line below would add a route for the <emphasis
remap=tt>203.14.101.0</emphasis> class C via the client's
required. The line below would add a route for the <hostid
role="ipaddr">203.14.101.0</hostid> class C via the client's
ppp link.</para>
<para>
@ -21353,8 +21328,7 @@
asks to speak to the SLIP client's IP address.</para>
<para>When using the example above, be sure to replace the
Ethernet MAC address (<emphasis
remap=tt>00:11:22:33:44:55</emphasis>) with the MAC address of
Ethernet MAC address (<hostid role="mac">00:11:22:33:44:55</hostid>) with the MAC address of
your system's Ethernet card, or your <quote>proxy ARP</quote> will
definitely not work! You can discover your SLIP server's
Ethernet MAC address by looking at the results of running
@ -21370,7 +21344,7 @@
</para>
<para>which indicates that this particular system's Ethernet MAC
address is <emphasis remap=tt>00:02:c1:28:5f:4a</emphasis> --
address is <hostid role="mac">00:02:c1:28:5f:4a</hostid> --
the periods in the Ethernet MAC address given by
<command>netstat -i</command> must be changed to colons and
leading zeros should be added to each single-digit hexadecimal
@ -21604,8 +21578,7 @@
</para>
<para>The first two lines specify the default route (which we will
cover in the next section) and the <emphasis
remap=tt>localhost</emphasis> route.</para>
cover in the next section) and the <hostid>localhost</hostid> route.</para>
<para>The interface (<emphasis remap=tt>Netif</emphasis> column)
that it specifies to use for <emphasis
@ -21615,8 +21588,7 @@
than sending it out over the LAN, since it will only end up back
where it started anyway.</para>
<para>The next thing that stands out are the <emphasis
remap=tt>0:e0:...</emphasis> addresses. These are ethernet
<para>The next thing that stands out are the <hostid role="mac">0:e0:...</hostid> addresses. These are ethernet
hardware addresses. FreeBSD will automatically identify any hosts
(<emphasis remap=tt>test0</emphasis> in the example) on the local
ethernet and add a route for that host, directly to it over the
@ -21630,9 +21602,9 @@
determination.</para>
<para>FreeBSD will also add subnet routes for the local subnet
(<emphasis remap=tt>10.20.30.255</emphasis> is the broadcast
address for the subnet <emphasis remap=tt>10.20.30</emphasis>, and
<emphasis remap="tt">foobar.com</emphasis> is the domain name
(<hostid role="ipaddr">10.20.30.255</hostid> is the broadcast
address for the subnet <hostid role="ipaddr">10.20.30</hostid>, and
<hostid role="domainname">foobar.com</hostid> is the domain name
associated with that subnet). The designation <emphasis
remap=tt>link#1</emphasis> refers to the first ethernet card in
the machine. You will notice no additional interface is specified
@ -21767,8 +21739,7 @@
</informalexample>
</para>
<para>The hosts <emphasis remap=tt>Local1</emphasis> and <emphasis
remap=tt>Local2</emphasis> are at your site, with the formed
<para>The hosts <hostid>Local1</hostid> and <hostid>Local2</hostid> are at your site, with the formed
being your PPP connection to your ISP's Terminal Server. Your ISP
has a local network at their site, which has, among other things,
the server where you connect and a hardware device (T1-GW)
@ -21795,11 +21766,11 @@
the T1-GW machine, so there is no need for the intermediate step
of sending traffic to the ISP server.</para>
<para>As a final note, it is common to use the address <emphasis
remap=tt>...1</emphasis> as the gateway address for your local
<para>As a final note, it is common to use the address <hostid
role="ipaddr">...1</hostid> as the gateway address for your local
network. So (using the same example), if your local class-C
address space was <emphasis remap=tt>10.20.30</emphasis> and your
ISP was using <emphasis remap=tt>10.9.9</emphasis> then the
address space was <hostid role="ipaddr">10.20.30</hostid> and your
ISP was using <hostid role="ipaddr">10.9.9</hostid> then the
default routes would be:</para>
<para>
@ -22610,10 +22581,10 @@
<para>- Run a name server ( <emphasis remap=tt><command>man -k
named</command></emphasis> ) and have your own domain
<emphasis remap=tt>smallminingco.com </emphasis></para>
<hostid role="domainname">smallminingco.com </hostid></para>
<para>- Get mail delivered to the current DNS name for your host.
Ie: <emphasis remap=tt>dorm6.ahouse.school.edu </emphasis> </para>
Ie: <hostid role="fqdn">dorm6.ahouse.school.edu </hostid> </para>
<para>No matter what option you choose, to have mail delivered
directly to your host, you must be a full Internet host. You must
@ -22682,8 +22653,8 @@
<para>To setup up a network mailhost, you need to direct the mail
from arriving at all the workstations. In other words, you want to
hijack all mail for <emphasis remap=tt> *.smallminingco.com
</emphasis> and divert it to one machine, your mailhost.</para>
hijack all mail for <hostid role="domainname"> *.smallminingco.com
</hostid> and divert it to one machine, your mailhost.</para>
<para>The network users on their workstations will most likely pick
up their mail over POP or telnet. </para>
@ -22900,22 +22871,23 @@
<title>Why do I have to use the FQDN for hosts on my site?</title>
<para>You will probably find that the host is actually in a
different domain; for example, if you are in foo.bar.edu and you
wish to reach a host called ``mumble'' in the bar.edu domain, you
different domain; for example, if you are in <hostid role="fqdn">foo.bar.edu</hostid> and you
wish to reach a host called <hostid>mumble</hostid> in the <hostid
role="domainname">bar.edu</hostid> domain, you
will have to refer to it by the fully-qualified domain name,
``mumble.bar.edu'', instead of just ``mumble''. </para>
<hostid role="fqdn">mumble.bar.edu</hostid>, instead of just <hostid>mumble</hostid>. </para>
<para>Traditionally, this was allowed by BSD BIND resolvers. However
the current version of <application>BIND</application> that ships with
FreeBSD no longer provides default abbreviations for non-fully
qualified domain names other than the domain you are in. So an
unqualified host <emphasis remap=tt>mumble</emphasis> must either
be found as <emphasis remap="tt">mumble.foo.bar.edu</emphasis>, or
unqualified host <hostid>mumble</hostid> must either
be found as <hostid role="fqdn">mumble.foo.bar.edu</hostid>, or
it will be searched for in the root domain.</para>
<para>This is different from the previous behavior, where the search
continued across <emphasis remap="tt">mumble.bar.edu</emphasis>,
and <emphasis remap="tt">mumble.edu</emphasis>. Have a look at
continued across <hostid role="domainname">mumble.bar.edu</hostid>,
and <hostid role="domainname">mumble.edu</hostid>. Have a look at
RFC 1535 for why this was considered bad practice, or even a
security hole.</para>

View file

@ -4333,8 +4333,7 @@
<listitem>
<para><emphasis remap=tt>loop</emphasis> is the generic
loopback device for TCP/IP. If you telnet or FTP to
<emphasis>localhost</emphasis> (a.k.a. <emphasis
remap=tt>127.0.0.1</emphasis>) it will come back at you
<hostid>localhost</hostid> (a.k.a. <hostid role="ipaddr">127.0.0.1</hostid>) it will come back at you
through this pseudo-device. Mandatory.</para>
</listitem>
</varlistentry>
@ -5695,7 +5694,7 @@
<command>kinit</command>, see above) access to
<command>rlogin</command> to
<emphasis>jane</emphasis>'s account or files on this system
(<emphasis>grunt</emphasis>) via <command>rlogin</command>, <command>rsh</command> or
(<hostid>grunt</hostid>) via <command>rlogin</command>, <command>rsh</command> or
<command>rcp</command>.</para>
<para>For example, Jane now logs into another system, using
@ -7530,13 +7529,13 @@
bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript
v51.4:</programlisting>
</informalexample> In this example, the first printer is named
<emphasis remap=tt>rattan</emphasis> and has as aliases
<hostid>rattan</hostid> and has as aliases
<emphasis remap=tt>line</emphasis>, <emphasis
remap=tt>diablo</emphasis>, <emphasis
remap=tt>lp</emphasis>, and <emphasis remap=tt>Diablo 630
Line Printer</emphasis>. Since it has the alias <emphasis
remap=tt>lp</emphasis>, it is also the default printer. The
second is named <emphasis remap=tt>bamboo</emphasis>, and has
second is named <hostid>bamboo</hostid>, and has
as aliases <emphasis remap=tt>ps</emphasis>,
<option>PS</option>, <emphasis remap=tt>S</emphasis>,
<emphasis remap=tt>panasonic</emphasis>, and <emphasis
@ -7599,8 +7598,7 @@
your network, you might want to put the spooling directories
under a single directory that you reserve just for printing
with LPD. We will do this for our two example printers
<emphasis remap=tt>rattan</emphasis> and <emphasis
remap=tt>bamboo</emphasis>:
<hostid>rattan</hostid> and <hostid>bamboo</hostid>:
<informalexample>
<screen>mkdir /var/spool/lpd mkdir /var/spool/lpd/rattan
mkdir /var/spool/lpd/bamboo</screen>
@ -7663,9 +7661,8 @@
<filename>/etc/printcap</filename> file using the <emphasis
remap=tt>lp</emphasis> capability.</para>
<para>In our running example, let us assume that <emphasis
remap=tt>rattan</emphasis> is on the first parallel port,
and <emphasis remap=tt>bamboo</emphasis> is on a sixth serial
<para>In our running example, let us assume that <hostid>rattan</hostid> is on the first parallel port,
and <hostid>bamboo</hostid> is on a sixth serial
port; here are the additions to
<filename>/etc/printcap</filename>:
<informalexample>
@ -8082,8 +8079,7 @@
<filename>/etc/printcap</filename> from a host
called orchid. It has a single printer attached
to its first parallel port, a Hewlett Packard
LaserJet 3Si named <emphasis
remap=tt>teak</emphasis>. It is using the
LaserJet 3Si named <hostid>teak</hostid>. It is using the
above script as its text filter:
<informalexample>
<programlisting># # /etc/printcap for host
@ -8197,8 +8193,7 @@
(<emphasis remap=tt>lf</emphasis>) capability to the
entry for the printer you are debugging in the
<filename>/etc/printcap</filename> file. For example,
here is the entry for <emphasis
remap=tt>rattan</emphasis>, with the <emphasis
here is the entry for <hostid>rattan</hostid>, with the <emphasis
remap=tt>lf</emphasis> capability:
<informalexample>
<screen>rattan|line|diablo|lp|Diablo 630 Line
@ -8304,8 +8299,7 @@
<screen><command>lpr -P <replaceable>printer-name</replaceable>
<replaceable>filename...</replaceable></command></screen>
</informalexample> This example prints a long listing of the
current directory to the printer named <emphasis
remap=tt>rattan</emphasis>:
current directory to the printer named <hostid>rattan</hostid>:
<informalexample>
<screen>ls -l | lpr -P rattan</screen>
</informalexample> Because no files were listed for the <ulink
@ -8343,8 +8337,7 @@
example, the command
<informalexample>
<screen>lpq -P bamboo</screen>
</informalexample> shows the queue for the printer named <emphasis
remap=tt>bamboo</emphasis>. Here is an example of the output of
</informalexample> shows the queue for the printer named <hostid>bamboo</hostid>. Here is an example of the output of
the <command>lpq</command> command:
<informalexample>
<screen>bamboo is ready and printing Rank Owner Job Files
@ -8353,7 +8346,7 @@
input) 1635 bytes 3rd mary 11 ...
78519 bytes</screen>
</informalexample> This shows three jobs in the queue for
<emphasis remap=tt>bamboo</emphasis>. The first job, submitted by
<hostid>bamboo</hostid>. The first job, submitted by
user kelly, got assigned <emphasis>job number</emphasis> 9. Every
job for a printer gets a unique job number. Most of the time you
can ignore the job number, but you will need it if you want to
@ -8421,8 +8414,7 @@
<replaceable>job-number</replaceable></emphasis></screen>
</informalexample> To remove the job from a specific printer, add
the <option>-P</option> option. The following command removes job
number 10 from the queue for the printer <emphasis
remap=tt>bamboo</emphasis>:
number 10 from the queue for the printer <hostid>bamboo</hostid>:
<informalexample>
<screen>lprm -P bamboo 10</screen>
</informalexample> The <ulink
@ -8463,8 +8455,7 @@
<para>Just use the <option>-P</option> option with the above
shortcuts to operate on a specific printer instead of the default.
For example, the following command removes all jobs for the
current user in the queue for the printer named <emphasis
remap=tt>rattan</emphasis>:</para>
current user in the queue for the printer named <hostid>rattan</hostid>:</para>
<para>
<informalexample>
@ -8521,7 +8512,7 @@
<para>For example, the following command prints a DVI file (from
the TeX typesetting system) named
<filename>fish-report.dvi</filename> to the printer named
<emphasis remap=tt>bamboo</emphasis>:
<hostid>bamboo</hostid>:
<informalexample>
<screen>lpr -P bamboo -d fish-report.dvi</screen>
</informalexample> These options apply to every file in the job,
@ -9588,11 +9579,10 @@
<filename>/etc/printcap</filename>.</para>
<para>In our example, we will add the DVI conversion filter to
the entry for the printer named <emphasis
remap=tt>bamboo</emphasis>. Here is the example
the entry for the printer named <hostid>bamboo</hostid>. Here is the example
<filename>/etc/printcap</filename> file again, with the new
<emphasis remap=tt>df</emphasis> capability for the printer
<emphasis remap=tt>bamboo</emphasis>
<hostid>bamboo</hostid>
<informalexample>
<programlisting># # /etc/printcap for host rose - added df
filter for bamboo # rattan|line|diablo|lp|Diablo 630 Line
@ -9656,7 +9646,7 @@
<para>The following script is a conversion filter for troff data
from the groff typesetting system for the PostScript printer
named <emphasis remap=tt>bamboo</emphasis>:
named <hostid>bamboo</hostid>:
<informalexample>
<programlisting>#!/bin/sh # # pstf - Convert groff's troff
data into PS, then print. # Installed in
@ -9680,23 +9670,21 @@
<para>Here is an example that might make old hands at FORTRAN
blush. It is a FORTRAN-text filter for any printer that can
directly print plain text. We will install it for the printer
<emphasis remap=tt>teak</emphasis>:
<hostid>teak</hostid>:
<informalexample>
<programlisting>#!/bin/sh # # hprf - FORTRAN text filter for
LaserJet 3si: # Installed in /usr/local/libexec/hprf #
printf "\033&amp;k2G" &amp;&amp; fpr &amp;&amp; printf
"\f" &amp;&amp; exit 0 exit 2</programlisting>
</informalexample> And we will add this line to the
<filename>/etc/printcap</filename> for the printer <emphasis
remap=tt>teak</emphasis> to enable this filter:
<filename>/etc/printcap</filename> for the printer <hostid>teak</hostid> to enable this filter:
<informalexample>
<screen> :rf=/usr/local/libexec/hprf:</screen>
</informalexample>
</para>
<para>Here is one final, somewhat complex example. We will add
a DVI filter to the LaserJet printer <emphasis
remap=tt>teak</emphasis> introduced earlier. First, the
a DVI filter to the LaserJet printer <hostid>teak</hostid> introduced earlier. First, the
easy part: updating <filename>/etc/printcap</filename> with
the location of the DVI filter:
<informalexample>
@ -9968,7 +9956,7 @@
remap="Output Filters"> for more information.</para>
<para>Here is an example <filename>/etc/printcap</filename> file
for the printer <emphasis remap=tt>teak</emphasis> that we
for the printer <hostid>teak</hostid> that we
introduced earlier; we enabled header pages and added the above
output filter:
<informalexample>
@ -9977,8 +9965,7 @@
:lp=/dev/lpt0:sd=/var/spool/lpd/teak:mx#0:\
:if=/usr/local/libexec/hpif:\ :vf=/usr/local/libexec/hpvf:\
:of=/usr/local/libexec/hpof:</programlisting>
</informalexample> Now, when users print jobs to <emphasis
remap=tt>teak</emphasis>, they get a header page with each
</informalexample> Now, when users print jobs to <hostid>teak</hostid>, they get a header page with each
job. If users want to spend time searching for their printouts,
they can suppress header pages by submitting the job with
<command>lpr -h</command>; see <xref
@ -10349,14 +10336,13 @@
<filename>/etc/printcap</filename> file.</para>
<para>Here is an example. The host rose has two printers,
<emphasis remap=tt>bamboo</emphasis> and <emphasis
remap=tt>rattan</emphasis>. We will enable users on the host
<hostid>bamboo</hostid> and <hostid>rattan</hostid>. We will enable users on the host
orchid to print to those printers. Here is the
<filename>/etc/printcap</filename> file for orchid (back from
section
<xref linkend="printing-advanced-header-pages-enabling"
remap="Enabling Header Pages">). It already had the entry for
the printer <emphasis remap=tt>teak</emphasis>; we have added
the printer <hostid>teak</hostid>; we have added
entries for the two printers on the host rose:
<informalexample>
<programlisting># # /etc/printcap for host orchid - added
@ -10383,17 +10369,14 @@
</informalexample>
</para>
<para>Now, users on orchid can print to <emphasis
remap=tt>rattan</emphasis> and <emphasis
remap=tt>bamboo</emphasis>. If, for example, a user on orchid
<para>Now, users on orchid can print to <hostid>rattan</hostid> and <hostid>bamboo</hostid>. If, for example, a user on orchid
typed
<informalexample>
<screen>lpr -P bamboo -d sushi-review.dvi</screen>
</informalexample> the LPD system on orchid would copy the job
to the spooling directory
<filename>/var/spool/lpd/bamboo</filename> and note that it was
a DVI job. As soon as the host rose has room in its <emphasis
remap=tt>bamboo</emphasis> spooling directory, the two LPDs
a DVI job. As soon as the host rose has room in its <hostid>bamboo</hostid> spooling directory, the two LPDs
would transfer the file to rose. The file would wait in rose's
queue until it was finally printed. It would be converted from
DVI to PostScript (since bamboo is a PostScript printer) on
@ -10508,9 +10491,8 @@
<para>Here is an example. This is the
<filename>/etc/printcap</filename> file for the host rose. The
printer <emphasis remap=tt>rattan</emphasis> is quite hearty, so
we will allow multiple copies, but the laser printer <emphasis
remap=tt>bamboo</emphasis>'s a bit more delicate, so we will
printer <hostid>rattan</hostid> is quite hearty, so
we will allow multiple copies, but the laser printer <hostid>bamboo</hostid>'s a bit more delicate, so we will
disable multiple copies by adding the <emphasis
remap=tt>sc</emphasis> capability:
<informalexample>
@ -10526,8 +10508,7 @@
</informalexample> Now, we also need to add the <emphasis
remap=tt>sc</emphasis> capability on the host orchid's
<filename>/etc/printcap</filename> (and while we are at it, let
us disable multiple copies for the printer <emphasis
remap=tt>teak</emphasis>):
us disable multiple copies for the printer <hostid>teak</hostid>):
<informalexample>
<programlisting># # /etc/printcap for host orchid - no
multiple copies for local # printer teak or remote printer
@ -10579,10 +10560,8 @@
<xref linkend="printing-advanced-network-rm"
remap="Printers Installed on Remote Hosts">).</para>
<para>For example, we will let anyone access the printer <emphasis
remap=tt>rattan</emphasis>, but only those in group <emphasis
remap=tt>artists</emphasis> can use <emphasis
remap=tt>bamboo</emphasis>. Here is the familiar
<para>For example, we will let anyone access the printer <hostid>rattan</hostid>, but only those in group <emphasis
remap=tt>artists</emphasis> can use <hostid>bamboo</hostid>. Here is the familiar
<filename>/etc/printcap</filename> for host rose:
<informalexample>
<programlisting># # /etc/printcap for host rose - restricted
@ -10596,8 +10575,7 @@
:df=/usr/local/libexec/psdf:</programlisting>
</informalexample> Let us leave the other example
<filename>/etc/printcap</filename> file (for the host orchid)
alone. Of course, anyone on orchid can print to <emphasis
remap=tt>bamboo</emphasis>. It might be the case that we only
alone. Of course, anyone on orchid can print to <hostid>bamboo</hostid>. It might be the case that we only
allow certain logins on orchid anyway, and want them to have
access to the printer. Or not.</para>
@ -10634,9 +10612,7 @@
discarded. Whether this is correct behavior is up for
debate.</para>
<para>Let us add limits to our example printers <emphasis
remap=tt>rattan</emphasis> and <emphasis
remap=tt>bamboo</emphasis>. Since those artists' PostScript
<para>Let us add limits to our example printers <hostid>rattan</hostid> and <hostid>bamboo</hostid>. Since those artists' PostScript
files tend to be large, we will limit them to five megabytes.
We will put no limit on the plain text line printer:
<informalexample>
@ -10726,10 +10702,9 @@
<para>For example, let us add a
<filename>minfree</filename> file for the printer
<emphasis remap=tt>bamboo</emphasis>. We examine
<hostid>bamboo</hostid>. We examine
<filename>/etc/printcap</filename> to find the spooling
directory for this printer; here is <emphasis
remap=tt>bamboo</emphasis>'s entry:
directory for this printer; here is <hostid>bamboo</hostid>'s entry:
<informalexample>
<screen>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455
PostScript v51.4:\
@ -19387,14 +19362,14 @@
</informalexample>
</para>
<para>The first line defines the alias ``localhost'' as a synonym
<para>The first line defines the alias <hostid>localhost</hostid> as a synonym
for the current machine. Regardless of your own IP address, the
IP address for this line should always be 127.0.0.1. The second
line maps the name ``foo.bar.com'' (and the shorthand ``foo'')
to the IP address 10.0.0.1.</para>
IP address for this line should always be <hostid role="ipaddr">127.0.0.1</hostid>. The second
line maps the name <hostid role="fqdn">foo.bar.com</hostid> (and the shorthand <hostid>foo</hostid>)
to the IP address <hostid role="ipaddr">10.0.0.1</hostid>.</para>
<para>If your provider allocates you a static IP address and name,
then use these in place of the 10.0.0.1 entry.</para>
then use these in place of the <hostid role="ipaddr">10.0.0.1</hostid> entry.</para>
</sect3>
@ -19591,7 +19566,7 @@
replaced by the IP address that your ISP indicated for
their gateway (the machine to which you connect). If
your ISP hasn't given you a gateway address, use
<emphasis remap="tt">10.0.0.2/0</emphasis>. If you need
<hostid role="netmask">10.0.0.2/0</hostid>. If you need
to use a <quote>guessed</quote> address, make sure that you create
an entry in <filename>/etc/ppp/ppp.linkup</filename> as
per the instructions for
@ -19683,10 +19658,10 @@
</informalexample>
</para>
<para>This tells ppp to negotiate using address <emphasis
remap=tt>0.0.0.0</emphasis> rather than <emphasis
remap=tt>10.0.0.1</emphasis>. Do not use <emphasis
remap="tt">0.0.0.0/0</emphasis> as the first argument
<para>This tells ppp to negotiate using address <hostid
role="ipaddr">0.0.0.0</hostid> rather than <hostid
role="ipaddr">10.0.0.1</hostid>. Do not use <hostid
role="netmask">0.0.0.0/0</hostid> as the first argument
to <command>set ifaddr</command> as it
prevents ppp from setting up an initial route in
<option>-auto</option> and <option>-ddial</option>
@ -19952,8 +19927,8 @@
<para>The file <filename>/etc/ppp/ppp.linkup</filename> should
also contain routing information for each static IP user if
required. The line below would add a route for the <emphasis
remap=tt>203.14.101.0</emphasis> class C via the client's
required. The line below would add a route for the <hostid
role="ipaddr">203.14.101.0</hostid> class C via the client's
ppp link.</para>
<para>
@ -21353,8 +21328,7 @@
asks to speak to the SLIP client's IP address.</para>
<para>When using the example above, be sure to replace the
Ethernet MAC address (<emphasis
remap=tt>00:11:22:33:44:55</emphasis>) with the MAC address of
Ethernet MAC address (<hostid role="mac">00:11:22:33:44:55</hostid>) with the MAC address of
your system's Ethernet card, or your <quote>proxy ARP</quote> will
definitely not work! You can discover your SLIP server's
Ethernet MAC address by looking at the results of running
@ -21370,7 +21344,7 @@
</para>
<para>which indicates that this particular system's Ethernet MAC
address is <emphasis remap=tt>00:02:c1:28:5f:4a</emphasis> --
address is <hostid role="mac">00:02:c1:28:5f:4a</hostid> --
the periods in the Ethernet MAC address given by
<command>netstat -i</command> must be changed to colons and
leading zeros should be added to each single-digit hexadecimal
@ -21604,8 +21578,7 @@
</para>
<para>The first two lines specify the default route (which we will
cover in the next section) and the <emphasis
remap=tt>localhost</emphasis> route.</para>
cover in the next section) and the <hostid>localhost</hostid> route.</para>
<para>The interface (<emphasis remap=tt>Netif</emphasis> column)
that it specifies to use for <emphasis
@ -21615,8 +21588,7 @@
than sending it out over the LAN, since it will only end up back
where it started anyway.</para>
<para>The next thing that stands out are the <emphasis
remap=tt>0:e0:...</emphasis> addresses. These are ethernet
<para>The next thing that stands out are the <hostid role="mac">0:e0:...</hostid> addresses. These are ethernet
hardware addresses. FreeBSD will automatically identify any hosts
(<emphasis remap=tt>test0</emphasis> in the example) on the local
ethernet and add a route for that host, directly to it over the
@ -21630,9 +21602,9 @@
determination.</para>
<para>FreeBSD will also add subnet routes for the local subnet
(<emphasis remap=tt>10.20.30.255</emphasis> is the broadcast
address for the subnet <emphasis remap=tt>10.20.30</emphasis>, and
<emphasis remap="tt">foobar.com</emphasis> is the domain name
(<hostid role="ipaddr">10.20.30.255</hostid> is the broadcast
address for the subnet <hostid role="ipaddr">10.20.30</hostid>, and
<hostid role="domainname">foobar.com</hostid> is the domain name
associated with that subnet). The designation <emphasis
remap=tt>link#1</emphasis> refers to the first ethernet card in
the machine. You will notice no additional interface is specified
@ -21767,8 +21739,7 @@
</informalexample>
</para>
<para>The hosts <emphasis remap=tt>Local1</emphasis> and <emphasis
remap=tt>Local2</emphasis> are at your site, with the formed
<para>The hosts <hostid>Local1</hostid> and <hostid>Local2</hostid> are at your site, with the formed
being your PPP connection to your ISP's Terminal Server. Your ISP
has a local network at their site, which has, among other things,
the server where you connect and a hardware device (T1-GW)
@ -21795,11 +21766,11 @@
the T1-GW machine, so there is no need for the intermediate step
of sending traffic to the ISP server.</para>
<para>As a final note, it is common to use the address <emphasis
remap=tt>...1</emphasis> as the gateway address for your local
<para>As a final note, it is common to use the address <hostid
role="ipaddr">...1</hostid> as the gateway address for your local
network. So (using the same example), if your local class-C
address space was <emphasis remap=tt>10.20.30</emphasis> and your
ISP was using <emphasis remap=tt>10.9.9</emphasis> then the
address space was <hostid role="ipaddr">10.20.30</hostid> and your
ISP was using <hostid role="ipaddr">10.9.9</hostid> then the
default routes would be:</para>
<para>
@ -22610,10 +22581,10 @@
<para>- Run a name server ( <emphasis remap=tt><command>man -k
named</command></emphasis> ) and have your own domain
<emphasis remap=tt>smallminingco.com </emphasis></para>
<hostid role="domainname">smallminingco.com </hostid></para>
<para>- Get mail delivered to the current DNS name for your host.
Ie: <emphasis remap=tt>dorm6.ahouse.school.edu </emphasis> </para>
Ie: <hostid role="fqdn">dorm6.ahouse.school.edu </hostid> </para>
<para>No matter what option you choose, to have mail delivered
directly to your host, you must be a full Internet host. You must
@ -22682,8 +22653,8 @@
<para>To setup up a network mailhost, you need to direct the mail
from arriving at all the workstations. In other words, you want to
hijack all mail for <emphasis remap=tt> *.smallminingco.com
</emphasis> and divert it to one machine, your mailhost.</para>
hijack all mail for <hostid role="domainname"> *.smallminingco.com
</hostid> and divert it to one machine, your mailhost.</para>
<para>The network users on their workstations will most likely pick
up their mail over POP or telnet. </para>
@ -22900,22 +22871,23 @@
<title>Why do I have to use the FQDN for hosts on my site?</title>
<para>You will probably find that the host is actually in a
different domain; for example, if you are in foo.bar.edu and you
wish to reach a host called ``mumble'' in the bar.edu domain, you
different domain; for example, if you are in <hostid role="fqdn">foo.bar.edu</hostid> and you
wish to reach a host called <hostid>mumble</hostid> in the <hostid
role="domainname">bar.edu</hostid> domain, you
will have to refer to it by the fully-qualified domain name,
``mumble.bar.edu'', instead of just ``mumble''. </para>
<hostid role="fqdn">mumble.bar.edu</hostid>, instead of just <hostid>mumble</hostid>. </para>
<para>Traditionally, this was allowed by BSD BIND resolvers. However
the current version of <application>BIND</application> that ships with
FreeBSD no longer provides default abbreviations for non-fully
qualified domain names other than the domain you are in. So an
unqualified host <emphasis remap=tt>mumble</emphasis> must either
be found as <emphasis remap="tt">mumble.foo.bar.edu</emphasis>, or
unqualified host <hostid>mumble</hostid> must either
be found as <hostid role="fqdn">mumble.foo.bar.edu</hostid>, or
it will be searched for in the root domain.</para>
<para>This is different from the previous behavior, where the search
continued across <emphasis remap="tt">mumble.bar.edu</emphasis>,
and <emphasis remap="tt">mumble.edu</emphasis>. Have a look at
continued across <hostid role="domainname">mumble.bar.edu</hostid>,
and <hostid role="domainname">mumble.edu</hostid>. Have a look at
RFC 1535 for why this was considered bad practice, or even a
security hole.</para>