Subversion Repositories svn LFS-FR

Rev

Blame | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-iproute2" role="wrap">
  <?dbhtml filename="iproute2.html"?>

  <title>IPRoute2-&iproute2-version;</title>

  <indexterm zone="ch-system-iproute2">
    <primary sortas="a-IPRoute2">IPRoute2</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>The IPRoute2 package contains programs for basic and advanced
    IPV4-based networking.</para>

  </sect2>

  &env-target;

  <sect2 role="installation">
    <title>Installation of IPRoute2</title>

    <para os="s1">The following command prevents <command>install</command>
    from trying to strip the binaries:</para>

<screen os="s2"><userinput>for dir in ip misc tc; do
    cp ${dir}/Makefile{,.orig}
    sed 's/0755 -s/0755/' ${dir}/Makefile.orig &gt; ${dir}/Makefile
done</userinput></screen>

    <para os="cb1">The <command>arpd</command> binary included in this package is
    dependent on Berkeley DB.  Because <command>arpd</command> is not a
    very common requirement on a base Linux system, remove the dependency
    on Berkeley DB by applying the <command>sed</command> command below.
    If the <command>arpd</command> binary is needed, instructions for
    compiling Berkeley DB can be found in CBLFS at <ulink
   url="&cblfs-root;index.php/Berkeley_DB"/>.</para>

<screen os="s4"><userinput>cp misc/Makefile{,.orig}
sed '/^TARGETS/s@arpd@@g' misc/Makefile.orig &gt; misc/Makefile</userinput></screen>

    <para os="a">Compile the package:</para>

<screen os="b"><userinput>make DESTDIR=${CLFS} CC="${CC}" \
    DOCDIR=/usr/share/doc/iproute2 \
    MANDIR=/usr/share/man</userinput></screen>

    <variablelist os="c">
      <title>The meaning of the make option:</title>

      <varlistentry>
        <term><parameter>DESTDIR=/</parameter></term>
        <listitem>
          <para>This option overrides the default DESTDIR of /usr, so that
          that the IPRoute2 binaries will be installed into
          <filename class="directory">/sbin</filename>. This is the correct
          location according to the FHS, because some of the IPRoute2 binaries
          are used by the CLFS-Bootscripts package.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>DOCDIR=/usr/share/doc/iproute2 MANDIR=/usr/share/man</parameter></term>
        <listitem>
          <para>The DESTDIR=/ parameter would cause documentation to be
          installed into /share/doc and /share/man. These options ensure
          the docs are installed to the correct locations.</para>
        </listitem>
      </varlistentry>
    </variablelist>
         
    <para os="d">Install the package:</para>

<screen os="e"><userinput>make DESTDIR=${CLFS}  \
    DOCDIR=/usr/share/doc/iproute2 \
    MANDIR=/usr/share/man install</userinput></screen>

  </sect2>

  <sect2 id="contents-iproute2" role="content">
    <title>Contents of IPRoute2</title>

    <segmentedlist>
      <segtitle>Installed programs</segtitle>

      <seglistitem>
        <seg>ctstat (link to lnstat), ifcfg, ifstat, ip, lnstat, nstat,
        routef, routel, rtacct, rtmon, rtpr, rtstat (link to lnstat), ss,
        and tc</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="ctstat">
        <term><command>ctstat</command></term>
        <listitem>
          <para>Connection status utility</para>
          <indexterm zone="ch-system-iproute2 ctstat">
            <primary sortas="b-ctstat">ctstat</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="ifcfg">
        <term><command>ifcfg</command></term>
        <listitem>
          <para>A shell script wrapper for the <command>ip</command>
          command</para>
          <indexterm zone="ch-system-iproute2 ifcfg">
            <primary sortas="b-ifcfg">ifcfg</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="ifstat">
        <term><command>ifstat</command></term>
        <listitem>
          <para>Shows the interface statistics, including the amount of
          transmitted and received packets by interface</para>
          <indexterm zone="ch-system-iproute2 ifstat">
            <primary sortas="b-ifstat">ifstat</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="ip">
        <term><command>ip</command></term>
        <listitem>
          <para>The main executable. It has several different functions:</para>

          <para><command>ip link <replaceable>[device]</replaceable></command>
          allows users to look at the state of devices and to make changes</para>

          <para><command>ip addr</command> allows users to look at addresses and
          their properties, add new addresses, and delete old ones</para>

          <para><command>ip neighbor</command> allows users to look at neighbor
          bindings and their properties, add new neighbor entries, and delete
          old ones</para>

          <para><command>ip rule</command> allows users to look at the routing
          policies and change them</para>

          <para><command>ip route</command> allows users to look at the routing
          table and change routing table rules</para>

          <para><command>ip tunnel</command> allows users to look at the IP
          tunnels and their properties, and change them</para>

          <para><command>ip maddr</command> allows users to look at the multicast
          addresses and their properties, and change them</para>

          <para><command>ip mroute</command> allows users to set, change, or
          delete the multicast routing</para>

          <para><command>ip monitor</command> allows users to continously monitor
          the state of devices, addresses and routes</para>
          <indexterm zone="ch-system-iproute2 ip">
            <primary sortas="b-ip">ip</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="lnstat">
        <term><command>lnstat</command></term>
        <listitem>
          <para>Provides Linux network statistics. It is a generalized and more
          feature-complete replacement for the old <command>rtstat</command>
          program</para>
          <indexterm zone="ch-system-iproute2 lnstat">
            <primary sortas="b-lnstat">lnstat</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="nstat">
        <term><command>nstat</command></term>
        <listitem>
          <para>Shows network statistics</para>
          <indexterm zone="ch-system-iproute2 nstat">
            <primary sortas="b-nstat">nstat</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="routef">
        <term><command>routef</command></term>
        <listitem>
          <para>A component of <command>ip route</command>. This is for flushing
          the routing tables</para>
          <indexterm zone="ch-system-iproute2 routef">
            <primary sortas="b-routef">routef</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="routel">
        <term><command>routel</command></term>
        <listitem>
          <para>A component of <command>ip route</command>. This is for listing
          the routing tables</para>
          <indexterm zone="ch-system-iproute2 routel">
            <primary sortas="b-routel">routel</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="rtacct">
        <term><command>rtacct</command></term>
        <listitem>
          <para>Displays the contents of
          <filename>/proc/net/rt_acct</filename></para>
          <indexterm zone="ch-system-iproute2 rtacct">
            <primary sortas="b-rtacct">rtacct</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="rtmon">
        <term><command>rtmon</command></term>
        <listitem>
          <para>Route monitoring utility</para>
          <indexterm zone="ch-system-iproute2 rtmon">
            <primary sortas="b-rtmon">rtmon</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="rtpr">
        <term><command>rtpr</command></term>
        <listitem>
          <para>Converts the output of <command>ip -o</command> back into a
          readable form</para>
          <indexterm zone="ch-system-iproute2 rtpr">
            <primary sortas="b-rtpr">rtpr</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="rtstat">
        <term><command>rtstat</command></term>
        <listitem>
          <para>Route status utility</para>
          <indexterm zone="ch-system-iproute2 rtstat">
            <primary sortas="b-rtstat">rtstat</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="ss">
        <term><command>ss</command></term>
        <listitem>
          <para>Similar to the <command>netstat</command> command; shows
          active connections</para>
          <indexterm zone="ch-system-iproute2 ss">
            <primary sortas="b-ss">ss</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tc">
        <term><command>tc</command></term>
        <listitem>
          <para>Traffic Controlling Executable; this is for Quality Of Service
          (QOS) and Class Of Service (COS) implementations</para>

          <para><command>tc qdisc</command> allows users to setup the queueing
          discipline</para>

          <para><command>tc class</command> allows users to setup classes based on
          the queuing discipline scheduling</para>

          <para><command>tc estimator</command> allows users to estimate the
          network flow into a network</para>

          <para><command>tc filter</command> allows users to setup the QOS/COS
          packet filtering</para>

          <para><command>tc policy</command> allows users to setup the QOS/COS
          policies</para>
          <indexterm zone="ch-system-iproute2 ss">
            <primary sortas="b-tc">tc</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>