[a088964] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[a088964] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[bdea25ce] | 7 |
|
---|
[81fd230] | 8 | <sect1 id="ch-system-iproute2" role="wrap">
|
---|
[bdea25ce] | 9 | <?dbhtml filename="iproute2.html"?>
|
---|
| 10 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>iproute2</productname>
|
---|
| 13 | <productnumber>&iproute2-version;</productnumber>
|
---|
| 14 | <address>&iproute2-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[f0d59f2] | 17 | <title>IPRoute2-&iproute2-version;</title>
|
---|
[bdea25ce] | 18 |
|
---|
[a088964] | 19 | <indexterm zone="ch-system-iproute2">
|
---|
[89ed081] | 20 | <primary sortas="a-IPRoute2">IPRoute2</primary>
|
---|
[a088964] | 21 | </indexterm>
|
---|
[bdea25ce] | 22 |
|
---|
[a088964] | 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
[bdea25ce] | 25 |
|
---|
| 26 | <para>The IPRoute2 package contains programs for basic and advanced IPV4-based
|
---|
| 27 | networking.</para>
|
---|
| 28 |
|
---|
[a088964] | 29 | <segmentedlist>
|
---|
| 30 | <segtitle>&buildtime;</segtitle>
|
---|
| 31 | <segtitle>&diskspace;</segtitle>
|
---|
[bdea25ce] | 32 |
|
---|
[a088964] | 33 | <seglistitem>
|
---|
[e4a5635] | 34 | <seg>&iproute2-ch6-sbu;</seg>
|
---|
| 35 | <seg>&iproute2-ch6-du;</seg>
|
---|
[a088964] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
[bdea25ce] | 38 |
|
---|
[a088964] | 39 | </sect2>
|
---|
[bdea25ce] | 40 |
|
---|
[a088964] | 41 | <sect2 role="installation">
|
---|
[f0d59f2] | 42 | <title>Installation of IPRoute2</title>
|
---|
[a088964] | 43 |
|
---|
[9cccea2] | 44 | <para>The <command>arpd</command> binary included in this package is
|
---|
| 45 | dependent on Berkeley DB. Because <command>arpd</command> is not a very
|
---|
[bf10add] | 46 | common requirement on a base Linux system, remove the dependency on Berkeley
|
---|
| 47 | DB by applying the commands below. If the <command>arpd</command> binary is
|
---|
| 48 | needed, instructions for compiling Berkeley DB can be found in the BLFS Book
|
---|
| 49 | at <ulink url="&blfs-root;view/svn/server/databases.html#db"/>.
|
---|
[9cccea2] | 50 | </para>
|
---|
| 51 |
|
---|
[bf10add] | 52 | <screen><userinput remap="pre">sed -i '/^TARGETS/s@arpd@@g' misc/Makefile
|
---|
| 53 | sed -i /ARPD/d Makefile
|
---|
[04b82390] | 54 | sed -i 's/arpd.8//' man/man8/Makefile</userinput></screen>
|
---|
[9cccea2] | 55 |
|
---|
[a3af16f] | 56 | <!-- Save as comments for now
|
---|
[f0f4140] | 57 | <para>Remove a compiler flag that causes the compilation to fail:</para>
|
---|
| 58 | <screen><userinput remap="pre">sed -i 's/-Werror//' Makefile</userinput></screen>
|
---|
[a3af16f] | 59 | -->
|
---|
[f0f4140] | 60 |
|
---|
[a088964] | 61 | <para>Compile the package:</para>
|
---|
| 62 |
|
---|
[aa909a0] | 63 | <screen><userinput remap="make">make DESTDIR=</userinput></screen>
|
---|
[81fd230] | 64 |
|
---|
| 65 | <variablelist>
|
---|
[aa909a0] | 66 | <title>The meaning of the make option:</title>
|
---|
[7af598d1] | 67 |
|
---|
| 68 | <varlistentry>
|
---|
| 69 | <term><parameter>DESTDIR=</parameter></term>
|
---|
| 70 | <listitem>
|
---|
| 71 | <para>This ensures that the IPRoute2 binaries will install into
|
---|
| 72 | the correct directory. By default, <parameter>DESTDIR</parameter> is
|
---|
| 73 | set to <filename class="directory">/usr</filename>.</para>
|
---|
| 74 | </listitem>
|
---|
| 75 | </varlistentry>
|
---|
[bdea25ce] | 76 |
|
---|
[81fd230] | 77 | </variablelist>
|
---|
| 78 |
|
---|
[0ebe029b] | 79 | <para>This package comes with a test suite, but due to assumptions it makes,
|
---|
[971be6b] | 80 | it is not possible to reliably run these tests from within the chroot
|
---|
| 81 | environment. If you wish to run these tests after booting into your new LFS
|
---|
| 82 | system, ensure you select <filename>/proc/config.gz</filename>
|
---|
| 83 | CONFIG_IKCONFIG_PROC ("General setup" -> "Enable access to
|
---|
| 84 | .config through /proc/config.gz") support into your kernel then run
|
---|
| 85 | 'make alltests' from the <filename class="directory">testsuite/</filename>
|
---|
| 86 | subdirectory.</para>
|
---|
[0be3d41] | 87 |
|
---|
[81fd230] | 88 | <para>Install the package:</para>
|
---|
| 89 |
|
---|
[7b08ae24] | 90 | <screen><userinput remap="install">make DESTDIR= \
|
---|
[9f5aaf7] | 91 | MANDIR=/usr/share/man \
|
---|
[bdb3cca] | 92 | DOCDIR=/usr/share/doc/iproute2-&iproute2-version; install</userinput></screen>
|
---|
[bdea25ce] | 93 |
|
---|
[a088964] | 94 | </sect2>
|
---|
| 95 |
|
---|
| 96 | <sect2 id="contents-iproute2" role="content">
|
---|
[f0d59f2] | 97 | <title>Contents of IPRoute2</title>
|
---|
[bdea25ce] | 98 |
|
---|
[81fd230] | 99 | <segmentedlist>
|
---|
| 100 | <segtitle>Installed programs</segtitle>
|
---|
[fe05b08] | 101 | <segtitle>Installed directories</segtitle>
|
---|
[bdea25ce] | 102 |
|
---|
[81fd230] | 103 | <seglistitem>
|
---|
[ca101ad] | 104 | <seg>bridge, ctstat (link to lnstat), genl, ifcfg, ifstat, ip, lnstat,
|
---|
[2791a8e] | 105 | nstat, routef, routel, rtacct, rtmon, rtpr, rtstat (link to lnstat), ss,
|
---|
[79f9e00] | 106 | and tc</seg>
|
---|
[fe05b08] | 107 | <seg>/etc/iproute2, /lib/tc, /usr/share/doc/iproute2-&iproute2-version;,
|
---|
| 108 | /usr/lib/tc</seg>
|
---|
[81fd230] | 109 | </seglistitem>
|
---|
| 110 | </segmentedlist>
|
---|
| 111 |
|
---|
[bdea25ce] | 112 | <variablelist>
|
---|
| 113 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 114 | <?dbfo list-presentation="list"?>
|
---|
| 115 | <?dbhtml list-presentation="table"?>
|
---|
| 116 |
|
---|
[ca101ad] | 117 | <varlistentry id="bridge">
|
---|
| 118 | <term><command>bridge</command></term>
|
---|
| 119 | <listitem>
|
---|
| 120 | <para>Configures network bridges</para>
|
---|
| 121 | <indexterm zone="ch-system-iproute2 bridge">
|
---|
| 122 | <primary sortas="b-bridge">bridge</primary>
|
---|
| 123 | </indexterm>
|
---|
| 124 | </listitem>
|
---|
| 125 | </varlistentry>
|
---|
| 126 |
|
---|
[46a500e] | 127 | <varlistentry id="ctstat">
|
---|
[bdea25ce] | 128 | <term><command>ctstat</command></term>
|
---|
[46a500e] | 129 | <listitem>
|
---|
[89ed081] | 130 | <para>Connection status utility</para>
|
---|
[46a500e] | 131 | <indexterm zone="ch-system-iproute2 ctstat">
|
---|
[005dc3f] | 132 | <primary sortas="b-ctstat">ctstat</primary>
|
---|
[46a500e] | 133 | </indexterm>
|
---|
| 134 | </listitem>
|
---|
| 135 | </varlistentry>
|
---|
| 136 |
|
---|
[2791a8e] | 137 | <varlistentry id="genl">
|
---|
| 138 | <term><command>genl</command></term>
|
---|
| 139 | <listitem>
|
---|
| 140 | <para></para>
|
---|
| 141 | <indexterm zone="ch-system-iproute2 genl">
|
---|
| 142 | <primary sortas="b-genl">genl</primary>
|
---|
| 143 | </indexterm>
|
---|
| 144 | </listitem>
|
---|
| 145 | </varlistentry>
|
---|
| 146 |
|
---|
[46a500e] | 147 | <varlistentry id="ifcfg">
|
---|
[bdea25ce] | 148 | <term><command>ifcfg</command></term>
|
---|
[46a500e] | 149 | <listitem>
|
---|
[ce5ebe1] | 150 | <para>A shell script wrapper for the <command>ip</command> command.
|
---|
| 151 | Note that it requires the <command>arping</command> and
|
---|
| 152 | <command>rdisk</command> programs from the
|
---|
[46fbbc2] | 153 | iputils package found at <ulink url="http://www.skbuff.net/iputils/"/>.</para>
|
---|
[46a500e] | 154 | <indexterm zone="ch-system-iproute2 ifcfg">
|
---|
| 155 | <primary sortas="b-ifcfg">ifcfg</primary>
|
---|
| 156 | </indexterm>
|
---|
| 157 | </listitem>
|
---|
| 158 | </varlistentry>
|
---|
[81fd230] | 159 |
|
---|
| 160 | <varlistentry id="ifstat">
|
---|
[bdea25ce] | 161 | <term><command>ifstat</command></term>
|
---|
[81fd230] | 162 | <listitem>
|
---|
[bdea25ce] | 163 | <para>Shows the interface statistics, including the amount of
|
---|
| 164 | transmitted and received packets by interface</para>
|
---|
[81fd230] | 165 | <indexterm zone="ch-system-iproute2 ifstat">
|
---|
| 166 | <primary sortas="b-ifstat">ifstat</primary>
|
---|
| 167 | </indexterm>
|
---|
| 168 | </listitem>
|
---|
| 169 | </varlistentry>
|
---|
| 170 |
|
---|
| 171 | <varlistentry id="ip">
|
---|
[bdea25ce] | 172 | <term><command>ip</command></term>
|
---|
[81fd230] | 173 | <listitem>
|
---|
| 174 | <para>The main executable. It has several different functions:</para>
|
---|
| 175 |
|
---|
[0090db5] | 176 | <para><command>ip link <replaceable><device></replaceable></command>
|
---|
[bdea25ce] | 177 | allows users to look at the state of devices and to make changes</para>
|
---|
[81fd230] | 178 |
|
---|
| 179 | <para><command>ip addr</command> allows users to look at addresses and
|
---|
[bdea25ce] | 180 | their properties, add new addresses, and delete old ones</para>
|
---|
[81fd230] | 181 |
|
---|
[bdea25ce] | 182 | <para><command>ip neighbor</command> allows users to look at neighbor
|
---|
| 183 | bindings and their properties, add new neighbor entries, and delete
|
---|
| 184 | old ones</para>
|
---|
[81fd230] | 185 |
|
---|
| 186 | <para><command>ip rule</command> allows users to look at the routing
|
---|
[bdea25ce] | 187 | policies and change them</para>
|
---|
[81fd230] | 188 |
|
---|
| 189 | <para><command>ip route</command> allows users to look at the routing
|
---|
[bdea25ce] | 190 | table and change routing table rules</para>
|
---|
[81fd230] | 191 |
|
---|
| 192 | <para><command>ip tunnel</command> allows users to look at the IP
|
---|
[bdea25ce] | 193 | tunnels and their properties, and change them</para>
|
---|
[81fd230] | 194 |
|
---|
| 195 | <para><command>ip maddr</command> allows users to look at the multicast
|
---|
[bdea25ce] | 196 | addresses and their properties, and change them</para>
|
---|
[81fd230] | 197 |
|
---|
| 198 | <para><command>ip mroute</command> allows users to set, change, or
|
---|
[bdea25ce] | 199 | delete the multicast routing</para>
|
---|
[81fd230] | 200 |
|
---|
[cb02946] | 201 | <para><command>ip monitor</command> allows users to continuously monitor
|
---|
[bdea25ce] | 202 | the state of devices, addresses and routes</para>
|
---|
[81fd230] | 203 | <indexterm zone="ch-system-iproute2 ip">
|
---|
| 204 | <primary sortas="b-ip">ip</primary>
|
---|
| 205 | </indexterm>
|
---|
| 206 | </listitem>
|
---|
| 207 | </varlistentry>
|
---|
| 208 |
|
---|
[46a500e] | 209 | <varlistentry id="lnstat">
|
---|
[bdea25ce] | 210 | <term><command>lnstat</command></term>
|
---|
[46a500e] | 211 | <listitem>
|
---|
| 212 | <para>Provides Linux network statistics. It is a generalized and more
|
---|
[bdea25ce] | 213 | feature-complete replacement for the old <command>rtstat</command>
|
---|
| 214 | program</para>
|
---|
[46a500e] | 215 | <indexterm zone="ch-system-iproute2 lnstat">
|
---|
[005dc3f] | 216 | <primary sortas="b-lnstat">lnstat</primary>
|
---|
[46a500e] | 217 | </indexterm>
|
---|
| 218 | </listitem>
|
---|
| 219 | </varlistentry>
|
---|
| 220 |
|
---|
[81fd230] | 221 | <varlistentry id="nstat">
|
---|
[bdea25ce] | 222 | <term><command>nstat</command></term>
|
---|
[81fd230] | 223 | <listitem>
|
---|
[89ed081] | 224 | <para>Shows network statistics</para>
|
---|
[81fd230] | 225 | <indexterm zone="ch-system-iproute2 nstat">
|
---|
| 226 | <primary sortas="b-nstat">nstat</primary>
|
---|
| 227 | </indexterm>
|
---|
| 228 | </listitem>
|
---|
| 229 | </varlistentry>
|
---|
| 230 |
|
---|
| 231 | <varlistentry id="routef">
|
---|
[bdea25ce] | 232 | <term><command>routef</command></term>
|
---|
[81fd230] | 233 | <listitem>
|
---|
[bdea25ce] | 234 | <para>A component of <command>ip route</command>. This is for flushing
|
---|
| 235 | the routing tables</para>
|
---|
[81fd230] | 236 | <indexterm zone="ch-system-iproute2 routef">
|
---|
| 237 | <primary sortas="b-routef">routef</primary>
|
---|
| 238 | </indexterm>
|
---|
| 239 | </listitem>
|
---|
| 240 | </varlistentry>
|
---|
| 241 |
|
---|
| 242 | <varlistentry id="routel">
|
---|
[bdea25ce] | 243 | <term><command>routel</command></term>
|
---|
[81fd230] | 244 | <listitem>
|
---|
[bdea25ce] | 245 | <para>A component of <command>ip route</command>. This is for listing
|
---|
| 246 | the routing tables</para>
|
---|
[81fd230] | 247 | <indexterm zone="ch-system-iproute2 routel">
|
---|
| 248 | <primary sortas="b-routel">routel</primary>
|
---|
| 249 | </indexterm>
|
---|
| 250 | </listitem>
|
---|
| 251 | </varlistentry>
|
---|
| 252 |
|
---|
[46a500e] | 253 | <varlistentry id="rtacct">
|
---|
[bdea25ce] | 254 | <term><command>rtacct</command></term>
|
---|
[46a500e] | 255 | <listitem>
|
---|
[bdea25ce] | 256 | <para>Displays the contents of
|
---|
| 257 | <filename>/proc/net/rt_acct</filename></para>
|
---|
[46a500e] | 258 | <indexterm zone="ch-system-iproute2 rtacct">
|
---|
| 259 | <primary sortas="b-rtacct">rtacct</primary>
|
---|
| 260 | </indexterm>
|
---|
| 261 | </listitem>
|
---|
| 262 | </varlistentry>
|
---|
| 263 |
|
---|
[81fd230] | 264 | <varlistentry id="rtmon">
|
---|
[bdea25ce] | 265 | <term><command>rtmon</command></term>
|
---|
[81fd230] | 266 | <listitem>
|
---|
[89ed081] | 267 | <para>Route monitoring utility</para>
|
---|
[81fd230] | 268 | <indexterm zone="ch-system-iproute2 rtmon">
|
---|
| 269 | <primary sortas="b-rtmon">rtmon</primary>
|
---|
| 270 | </indexterm>
|
---|
| 271 | </listitem>
|
---|
| 272 | </varlistentry>
|
---|
| 273 |
|
---|
[46a500e] | 274 | <varlistentry id="rtpr">
|
---|
[bdea25ce] | 275 | <term><command>rtpr</command></term>
|
---|
[46a500e] | 276 | <listitem>
|
---|
| 277 | <para>Converts the output of <command>ip -o</command> back into a
|
---|
[bdea25ce] | 278 | readable form</para>
|
---|
[46a500e] | 279 | <indexterm zone="ch-system-iproute2 rtpr">
|
---|
| 280 | <primary sortas="b-rtpr">rtpr</primary>
|
---|
| 281 | </indexterm>
|
---|
| 282 | </listitem>
|
---|
| 283 | </varlistentry>
|
---|
| 284 |
|
---|
[81fd230] | 285 | <varlistentry id="rtstat">
|
---|
[bdea25ce] | 286 | <term><command>rtstat</command></term>
|
---|
[81fd230] | 287 | <listitem>
|
---|
[89ed081] | 288 | <para>Route status utility</para>
|
---|
[81fd230] | 289 | <indexterm zone="ch-system-iproute2 rtstat">
|
---|
| 290 | <primary sortas="b-rtstat">rtstat</primary>
|
---|
| 291 | </indexterm>
|
---|
| 292 | </listitem>
|
---|
| 293 | </varlistentry>
|
---|
| 294 |
|
---|
| 295 | <varlistentry id="ss">
|
---|
[bdea25ce] | 296 | <term><command>ss</command></term>
|
---|
[81fd230] | 297 | <listitem>
|
---|
[bdea25ce] | 298 | <para>Similar to the <command>netstat</command> command; shows active
|
---|
| 299 | connections</para>
|
---|
[81fd230] | 300 | <indexterm zone="ch-system-iproute2 ss">
|
---|
| 301 | <primary sortas="b-ss">ss</primary>
|
---|
| 302 | </indexterm>
|
---|
| 303 | </listitem>
|
---|
| 304 | </varlistentry>
|
---|
| 305 |
|
---|
| 306 | <varlistentry id="tc">
|
---|
[bdea25ce] | 307 | <term><command>tc</command></term>
|
---|
[81fd230] | 308 | <listitem>
|
---|
[bdea25ce] | 309 | <para>Traffic Controlling Executable; this is for Quality Of Service
|
---|
| 310 | (QOS) and Class Of Service (COS) implementations</para>
|
---|
[81fd230] | 311 |
|
---|
| 312 | <para><command>tc qdisc</command> allows users to setup the queueing
|
---|
[bdea25ce] | 313 | discipline</para>
|
---|
[81fd230] | 314 |
|
---|
[bdea25ce] | 315 | <para><command>tc class</command> allows users to setup classes based
|
---|
| 316 | on the queuing discipline scheduling</para>
|
---|
[81fd230] | 317 |
|
---|
| 318 | <para><command>tc estimator</command> allows users to estimate the
|
---|
[bdea25ce] | 319 | network flow into a network</para>
|
---|
[81fd230] | 320 |
|
---|
| 321 | <para><command>tc filter</command> allows users to setup the QOS/COS
|
---|
[bdea25ce] | 322 | packet filtering</para>
|
---|
[81fd230] | 323 |
|
---|
| 324 | <para><command>tc policy</command> allows users to setup the QOS/COS
|
---|
[bdea25ce] | 325 | policies</para>
|
---|
[81fd230] | 326 | <indexterm zone="ch-system-iproute2 ss">
|
---|
| 327 | <primary sortas="b-tc">tc</primary>
|
---|
| 328 | </indexterm>
|
---|
| 329 | </listitem>
|
---|
| 330 | </varlistentry>
|
---|
[bdea25ce] | 331 |
|
---|
[81fd230] | 332 | </variablelist>
|
---|
[bdea25ce] | 333 |
|
---|
[a088964] | 334 | </sect2>
|
---|
[81fd230] | 335 |
|
---|
[bdea25ce] | 336 | </sect1>
|
---|