mirror of https://github.com/tLDP/LDP
233 lines
9.6 KiB
XML
233 lines
9.6 KiB
XML
<!-- $Id$ -->
|
|
|
|
<appendix id="tools-misc">
|
|
<title>Miscellany</title>
|
|
<para>
|
|
This appendix is a collection of odds and ends which didn't fit anyplace
|
|
else. So, consider it a grab-bag of toys, tips, and remarks. Here,
|
|
you'll find a brief look at some
|
|
<link linkend="tools-ipcalc">IP calculators</link> and some
|
|
<link linkend="tools-iproute2-remarks">general remarks about iproute2
|
|
tools</link>.
|
|
</para>
|
|
<section id="tools-ipcalc">
|
|
<title><command>ipcalc</command> and other IP addressing calculators</title>
|
|
<para>
|
|
There are a number of different utilities called ipcalc, almost all of
|
|
which perform the same basic task. These are handy calculators for
|
|
converting from CIDR to traditional IP notation and determining network
|
|
and broadcast addresses.
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
A short
|
|
<ulink url="http://packages.debian.org/unstable/net/ipcalc.html">perl
|
|
script</ulink>, this prints out alll the information you would
|
|
want to know about an IP address. It defaults to print colorized
|
|
output, and comes with its own CGI (shown running
|
|
<ulink url="http://jodies.de/ipcalc">here</ulink>).
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
For those who perform all operations and research through a web
|
|
browser, a
|
|
<ulink url="http://www.hesketh.com/~schampeo/projects/ipcalc/">DHTML
|
|
calculator</ulink> should do the trick.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
And here's another
|
|
<ulink url="http://www.telusplanet.net/public/sparkman/netcalc.htm">IP
|
|
calculator</ulink>.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
You can run this
|
|
<ulink url="http://www.ajw.com/ipcalc.htm">ipcalc</ulink>,
|
|
which features hexadecimal as well as decimal output, on your PDA.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
RedHat has created their own <command>ipcalc</command> utility
|
|
which prints out a shell variable assignment command instead of
|
|
simply the requested piece of information. In the startup
|
|
scripts, RedHat evals this variable assignement into existence.
|
|
Despite this shortcoming, it is a useful tool and is documented
|
|
in its manpage (part of the initscripts RPM).
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>
|
|
Doubtless, there are a large number of other IP calculators available
|
|
to ease the job of the network administrator. The above tools are
|
|
meant as a brief summary of some of the offerings.
|
|
</para>
|
|
|
|
<!--
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
|
# #
|
|
# ip network aggregation tool #
|
|
# #
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
|
|
|
#
|
|
# simply put, this tool aggregates the IP networks on STDIN and
|
|
# prints the result
|
|
#
|
|
|
|
http://www.vergenet.net/linux/aggregate/
|
|
|
|
-->
|
|
|
|
</section>
|
|
<section id="tools-iproute2-remarks">
|
|
<title>Some general remarks about &iproute2; tools</title>
|
|
<para>
|
|
This is a meant to be a collected set of thoughts which don't fit
|
|
anyplace else about the &iproute2; tools. If you are
|
|
reading this in search of more details about the
|
|
&iproute2; tools, you should run (not walk) to your
|
|
nearest command line, and execute the following command:
|
|
<userinput>bash -c ' gv $( locate ip-cref.ps ) '</userinput>.
|
|
</para>
|
|
<para>
|
|
In any case, I suggest that the reader consult the
|
|
documentation which comes with the &iproute2;
|
|
package for canonical answers.
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
The &iproute2; suite exposes all of the
|
|
networking functionality of the linux kernel where the venerable
|
|
tools
|
|
(<link linkend="tools-ifconfig"><command>ifconfig</command></link>,
|
|
<link linkend="tools-route"><command>route</command></link>) are
|
|
hamstrung by history.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Each of the &iproute2; object names can be
|
|
shortened to the shortest unique set of characters. This means
|
|
that <command>ip route show</command> can be abbreviated
|
|
<command>ip ro s</command> and <command>ip rule show</command> can
|
|
be abbreviated <command>ip ru s</command>. Also <command>ip
|
|
address show</command> can be <command>ip a s</command>. Such
|
|
convenient shortcuts on the command line are often confusing in
|
|
documentation. For this reason, I have preferred examples
|
|
featuring the complete object names and action verbs. Note also
|
|
below that &iproute2; accepts not only
|
|
abbreviations but also synonyms as described in
|
|
<xref linkend="tb-tools-iproute2-remarks"/>.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
There are some syntactic synonyms available within the
|
|
&iproute2; package. See this
|
|
<xref linkend="tb-tools-iproute2-remarks"/> for a complete list
|
|
of synonyms.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Because the &iproute2; command suite is under
|
|
development, there may be slight differences between the output
|
|
described in this documentation and that of your release of
|
|
&iproute2;. I have tried to focus on the
|
|
overwhelmingly common uses of the &iproute2;
|
|
tools rather than the ones which are under active development, and
|
|
are subject to syntactic changes or new output presentations.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
There are extensions to the &iproute2; command
|
|
suite, which can alter the sets of objects or syntax
|
|
available for manipulation and inspection. Where these are
|
|
covered in detail in this documentation, they will be relegated to
|
|
a non-canonical ghetto. Examples will (someday) include
|
|
<ulink url="http://www.ssi.bg/~ja/#iparp"><command>ip
|
|
arp</command></ulink> and <command>tc</command> extensions.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>
|
|
</para>
|
|
<para>
|
|
There are some common synonyms in &iproute2; syntax.
|
|
Outlined below in <xref linkend="tb-tools-iproute2-remarks"/> is a list
|
|
of the common synonyms. Note, that these synonyms are available in
|
|
addition to the abbreviations indicated above.
|
|
</para>
|
|
<table id="tb-tools-iproute2-remarks">
|
|
<title>&iproute2; Synonyms</title>
|
|
<tgroup cols="2" align="center" colsep="1" rowsep="1">
|
|
<thead>
|
|
<row>
|
|
<entry>Command Variant</entry>
|
|
<entry>Synonyms</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><command>ip neighbor</command></entry>
|
|
<entry><command>ip neighbour</command></entry>
|
|
</row>
|
|
<row>
|
|
<entry><command>ip tunnel</command></entry>
|
|
<entry><command>ip tunl</command></entry>
|
|
</row>
|
|
<row>
|
|
<entry><command>ip OBJECT show</command></entry>
|
|
<entry><command>ip OBJECT ls</command>,
|
|
<command>ip OBJECT list</command></entry>
|
|
</row>
|
|
<row>
|
|
<entry><command>ip OBJECT change</command></entry>
|
|
<entry><command>ip OBJECT chg</command>,
|
|
<command>ip OBJECT replace</command></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
<para>
|
|
Because the &iproute2; suite of tools is so tightly
|
|
integrated with linux, it is not available for other operating
|
|
systems. This is at once its strength and weakness. For users
|
|
contemplating linux for the first time, <command>ifconfig</command>,
|
|
<command>netstat</command>, and <command>route</command> are familiar
|
|
and they feel intuitive. More experienced users and control freaks
|
|
will find the &iproute2; tools attractive and perhaps
|
|
indispensable.
|
|
</para>
|
|
</section>
|
|
<section id="tools-sysctl-intro">
|
|
<title>Brief introduction to <command>sysctl</command></title>
|
|
<para>
|
|
Many behaviours of the linux kernel can be modified through the use of
|
|
run time variables. These variables can be changed manually or with
|
|
the use of a convenient command line utility. Most linux
|
|
distributions also include a standard configuration file which can
|
|
store these parameters for use at boot time.
|
|
</para>
|
|
<para>
|
|
For a deeper reference into the matter and use of
|
|
<command>sysctl</command> see
|
|
<ulink url="http://ipsysctl-tutorial.frozentux.net/">the IP Sysctl
|
|
tutorial</ulink>, maintained by Oskar Andreasson.
|
|
</para>
|
|
<para>
|
|
</para>
|
|
<para>
|
|
</para>
|
|
</section>
|
|
</appendix>
|