[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 |
|
---|
| 44 | <para>Compile the package:</para>
|
---|
| 45 |
|
---|
[7af598d1] | 46 | <screen><userinput remap="make">make DESTDIR= SBINDIR=/sbin</userinput></screen>
|
---|
[81fd230] | 47 |
|
---|
| 48 | <variablelist>
|
---|
[7af598d1] | 49 | <title>The meaning of the make options:</title>
|
---|
| 50 |
|
---|
| 51 | <varlistentry>
|
---|
| 52 | <term><parameter>DESTDIR=</parameter></term>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>This ensures that the IPRoute2 binaries will install into
|
---|
| 55 | the correct directory. By default, <parameter>DESTDIR</parameter> is
|
---|
| 56 | set to <filename class="directory">/usr</filename>.</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | </varlistentry>
|
---|
[bdea25ce] | 59 |
|
---|
| 60 | <varlistentry>
|
---|
| 61 | <term><parameter>SBINDIR=/sbin</parameter></term>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>This ensures that the IPRoute2 binaries will install into
|
---|
| 64 | <filename class="directory">/sbin</filename>. This is the correct
|
---|
| 65 | location according to the FHS, because some of the IPRoute2 binaries
|
---|
| 66 | are used by the LFS-Bootscripts package.</para>
|
---|
| 67 | </listitem>
|
---|
| 68 | </varlistentry>
|
---|
| 69 |
|
---|
[81fd230] | 70 | </variablelist>
|
---|
| 71 |
|
---|
[971be6b] | 72 | <para>This package comes with a testsuite, but due to assumptions it makes,
|
---|
| 73 | it is not possible to reliably run these tests from within the chroot
|
---|
| 74 | environment. If you wish to run these tests after booting into your new LFS
|
---|
| 75 | system, ensure you select <filename>/proc/config.gz</filename>
|
---|
| 76 | CONFIG_IKCONFIG_PROC ("General setup" -> "Enable access to
|
---|
| 77 | .config through /proc/config.gz") support into your kernel then run
|
---|
| 78 | 'make alltests' from the <filename class="directory">testsuite/</filename>
|
---|
| 79 | subdirectory.</para>
|
---|
[0be3d41] | 80 |
|
---|
[81fd230] | 81 | <para>Install the package:</para>
|
---|
| 82 |
|
---|
[7af598d1] | 83 | <screen><userinput remap="install">make DESTDIR= SBINDIR=/sbin MANDIR=/usr/share/man \
|
---|
[bdb3cca] | 84 | DOCDIR=/usr/share/doc/iproute2-&iproute2-version; install</userinput></screen>
|
---|
[bdea25ce] | 85 |
|
---|
[ee0ed77] | 86 | <para>The <command>arpd</command> binary links against the Berkeley DB
|
---|
| 87 | libraries that reside in <filename class="directory">/usr</filename> and
|
---|
| 88 | uses a database in <filename>/var/lib/arpd/arpd.db</filename>. Thus,
|
---|
| 89 | according to the FHS, it must be in <filename
|
---|
| 90 | class="directory">/usr/sbin</filename>. Move it there:</para>
|
---|
| 91 |
|
---|
| 92 | <screen><userinput remap="install">mv -v /sbin/arpd /usr/sbin</userinput></screen>
|
---|
| 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>
|
---|
[bdea25ce] | 101 |
|
---|
[81fd230] | 102 | <seglistitem>
|
---|
[2791a8e] | 103 | <seg>arpd, ctstat (link to lnstat), genl, ifcfg, ifstat, ip, lnstat,
|
---|
| 104 | nstat, routef, routel, rtacct, rtmon, rtpr, rtstat (link to lnstat), ss,
|
---|
[bdea25ce] | 105 | and tc.</seg>
|
---|
[81fd230] | 106 | </seglistitem>
|
---|
| 107 | </segmentedlist>
|
---|
| 108 |
|
---|
[bdea25ce] | 109 | <variablelist>
|
---|
| 110 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 111 | <?dbfo list-presentation="list"?>
|
---|
| 112 | <?dbhtml list-presentation="table"?>
|
---|
| 113 |
|
---|
[fa21b3d] | 114 | <varlistentry id="arpd">
|
---|
[bdea25ce] | 115 | <term><command>arpd</command></term>
|
---|
[fa21b3d] | 116 | <listitem>
|
---|
[bdea25ce] | 117 | <para>Userspace ARP daemon, useful in really large networks, where the
|
---|
| 118 | kernelspace ARP implementation is insufficient, or when setting up a
|
---|
| 119 | honeypot</para>
|
---|
[fa21b3d] | 120 | <indexterm zone="ch-system-iproute2 arpd">
|
---|
| 121 | <primary sortas="b-arpd">arpd</primary>
|
---|
| 122 | </indexterm>
|
---|
| 123 | </listitem>
|
---|
| 124 | </varlistentry>
|
---|
| 125 |
|
---|
[46a500e] | 126 | <varlistentry id="ctstat">
|
---|
[bdea25ce] | 127 | <term><command>ctstat</command></term>
|
---|
[46a500e] | 128 | <listitem>
|
---|
[89ed081] | 129 | <para>Connection status utility</para>
|
---|
[46a500e] | 130 | <indexterm zone="ch-system-iproute2 ctstat">
|
---|
[005dc3f] | 131 | <primary sortas="b-ctstat">ctstat</primary>
|
---|
[46a500e] | 132 | </indexterm>
|
---|
| 133 | </listitem>
|
---|
| 134 | </varlistentry>
|
---|
| 135 |
|
---|
[2791a8e] | 136 | <varlistentry id="genl">
|
---|
| 137 | <term><command>genl</command></term>
|
---|
| 138 | <listitem>
|
---|
| 139 | <para></para>
|
---|
| 140 | <indexterm zone="ch-system-iproute2 genl">
|
---|
| 141 | <primary sortas="b-genl">genl</primary>
|
---|
| 142 | </indexterm>
|
---|
| 143 | </listitem>
|
---|
| 144 | </varlistentry>
|
---|
| 145 |
|
---|
[46a500e] | 146 | <varlistentry id="ifcfg">
|
---|
[bdea25ce] | 147 | <term><command>ifcfg</command></term>
|
---|
[46a500e] | 148 | <listitem>
|
---|
[46fbbc2] | 149 | <para>A shell script wrapper for the <command>ip</command> command.
|
---|
| 150 | Note that it requires the <command>arping</command> and
|
---|
| 151 | <command>rdisk</command> programs from the
|
---|
| 152 | iputils package found at <ulink url="http://www.skbuff.net/iputils/"/>.</para>
|
---|
[46a500e] | 153 | <indexterm zone="ch-system-iproute2 ifcfg">
|
---|
| 154 | <primary sortas="b-ifcfg">ifcfg</primary>
|
---|
| 155 | </indexterm>
|
---|
| 156 | </listitem>
|
---|
| 157 | </varlistentry>
|
---|
[81fd230] | 158 |
|
---|
| 159 | <varlistentry id="ifstat">
|
---|
[bdea25ce] | 160 | <term><command>ifstat</command></term>
|
---|
[81fd230] | 161 | <listitem>
|
---|
[bdea25ce] | 162 | <para>Shows the interface statistics, including the amount of
|
---|
| 163 | transmitted and received packets by interface</para>
|
---|
[81fd230] | 164 | <indexterm zone="ch-system-iproute2 ifstat">
|
---|
| 165 | <primary sortas="b-ifstat">ifstat</primary>
|
---|
| 166 | </indexterm>
|
---|
| 167 | </listitem>
|
---|
| 168 | </varlistentry>
|
---|
| 169 |
|
---|
| 170 | <varlistentry id="ip">
|
---|
[bdea25ce] | 171 | <term><command>ip</command></term>
|
---|
[81fd230] | 172 | <listitem>
|
---|
| 173 | <para>The main executable. It has several different functions:</para>
|
---|
| 174 |
|
---|
[0090db5] | 175 | <para><command>ip link <replaceable><device></replaceable></command>
|
---|
[bdea25ce] | 176 | allows users to look at the state of devices and to make changes</para>
|
---|
[81fd230] | 177 |
|
---|
| 178 | <para><command>ip addr</command> allows users to look at addresses and
|
---|
[bdea25ce] | 179 | their properties, add new addresses, and delete old ones</para>
|
---|
[81fd230] | 180 |
|
---|
[bdea25ce] | 181 | <para><command>ip neighbor</command> allows users to look at neighbor
|
---|
| 182 | bindings and their properties, add new neighbor entries, and delete
|
---|
| 183 | old ones</para>
|
---|
[81fd230] | 184 |
|
---|
| 185 | <para><command>ip rule</command> allows users to look at the routing
|
---|
[bdea25ce] | 186 | policies and change them</para>
|
---|
[81fd230] | 187 |
|
---|
| 188 | <para><command>ip route</command> allows users to look at the routing
|
---|
[bdea25ce] | 189 | table and change routing table rules</para>
|
---|
[81fd230] | 190 |
|
---|
| 191 | <para><command>ip tunnel</command> allows users to look at the IP
|
---|
[bdea25ce] | 192 | tunnels and their properties, and change them</para>
|
---|
[81fd230] | 193 |
|
---|
| 194 | <para><command>ip maddr</command> allows users to look at the multicast
|
---|
[bdea25ce] | 195 | addresses and their properties, and change them</para>
|
---|
[81fd230] | 196 |
|
---|
| 197 | <para><command>ip mroute</command> allows users to set, change, or
|
---|
[bdea25ce] | 198 | delete the multicast routing</para>
|
---|
[81fd230] | 199 |
|
---|
[bdea25ce] | 200 | <para><command>ip monitor</command> allows users to continously monitor
|
---|
| 201 | the state of devices, addresses and routes</para>
|
---|
[81fd230] | 202 | <indexterm zone="ch-system-iproute2 ip">
|
---|
| 203 | <primary sortas="b-ip">ip</primary>
|
---|
| 204 | </indexterm>
|
---|
| 205 | </listitem>
|
---|
| 206 | </varlistentry>
|
---|
| 207 |
|
---|
[46a500e] | 208 | <varlistentry id="lnstat">
|
---|
[bdea25ce] | 209 | <term><command>lnstat</command></term>
|
---|
[46a500e] | 210 | <listitem>
|
---|
| 211 | <para>Provides Linux network statistics. It is a generalized and more
|
---|
[bdea25ce] | 212 | feature-complete replacement for the old <command>rtstat</command>
|
---|
| 213 | program</para>
|
---|
[46a500e] | 214 | <indexterm zone="ch-system-iproute2 lnstat">
|
---|
[005dc3f] | 215 | <primary sortas="b-lnstat">lnstat</primary>
|
---|
[46a500e] | 216 | </indexterm>
|
---|
| 217 | </listitem>
|
---|
| 218 | </varlistentry>
|
---|
| 219 |
|
---|
[81fd230] | 220 | <varlistentry id="nstat">
|
---|
[bdea25ce] | 221 | <term><command>nstat</command></term>
|
---|
[81fd230] | 222 | <listitem>
|
---|
[89ed081] | 223 | <para>Shows network statistics</para>
|
---|
[81fd230] | 224 | <indexterm zone="ch-system-iproute2 nstat">
|
---|
| 225 | <primary sortas="b-nstat">nstat</primary>
|
---|
| 226 | </indexterm>
|
---|
| 227 | </listitem>
|
---|
| 228 | </varlistentry>
|
---|
| 229 |
|
---|
| 230 | <varlistentry id="routef">
|
---|
[bdea25ce] | 231 | <term><command>routef</command></term>
|
---|
[81fd230] | 232 | <listitem>
|
---|
[bdea25ce] | 233 | <para>A component of <command>ip route</command>. This is for flushing
|
---|
| 234 | the routing tables</para>
|
---|
[81fd230] | 235 | <indexterm zone="ch-system-iproute2 routef">
|
---|
| 236 | <primary sortas="b-routef">routef</primary>
|
---|
| 237 | </indexterm>
|
---|
| 238 | </listitem>
|
---|
| 239 | </varlistentry>
|
---|
| 240 |
|
---|
| 241 | <varlistentry id="routel">
|
---|
[bdea25ce] | 242 | <term><command>routel</command></term>
|
---|
[81fd230] | 243 | <listitem>
|
---|
[bdea25ce] | 244 | <para>A component of <command>ip route</command>. This is for listing
|
---|
| 245 | the routing tables</para>
|
---|
[81fd230] | 246 | <indexterm zone="ch-system-iproute2 routel">
|
---|
| 247 | <primary sortas="b-routel">routel</primary>
|
---|
| 248 | </indexterm>
|
---|
| 249 | </listitem>
|
---|
| 250 | </varlistentry>
|
---|
| 251 |
|
---|
[46a500e] | 252 | <varlistentry id="rtacct">
|
---|
[bdea25ce] | 253 | <term><command>rtacct</command></term>
|
---|
[46a500e] | 254 | <listitem>
|
---|
[bdea25ce] | 255 | <para>Displays the contents of
|
---|
| 256 | <filename>/proc/net/rt_acct</filename></para>
|
---|
[46a500e] | 257 | <indexterm zone="ch-system-iproute2 rtacct">
|
---|
| 258 | <primary sortas="b-rtacct">rtacct</primary>
|
---|
| 259 | </indexterm>
|
---|
| 260 | </listitem>
|
---|
| 261 | </varlistentry>
|
---|
| 262 |
|
---|
[81fd230] | 263 | <varlistentry id="rtmon">
|
---|
[bdea25ce] | 264 | <term><command>rtmon</command></term>
|
---|
[81fd230] | 265 | <listitem>
|
---|
[89ed081] | 266 | <para>Route monitoring utility</para>
|
---|
[81fd230] | 267 | <indexterm zone="ch-system-iproute2 rtmon">
|
---|
| 268 | <primary sortas="b-rtmon">rtmon</primary>
|
---|
| 269 | </indexterm>
|
---|
| 270 | </listitem>
|
---|
| 271 | </varlistentry>
|
---|
| 272 |
|
---|
[46a500e] | 273 | <varlistentry id="rtpr">
|
---|
[bdea25ce] | 274 | <term><command>rtpr</command></term>
|
---|
[46a500e] | 275 | <listitem>
|
---|
| 276 | <para>Converts the output of <command>ip -o</command> back into a
|
---|
[bdea25ce] | 277 | readable form</para>
|
---|
[46a500e] | 278 | <indexterm zone="ch-system-iproute2 rtpr">
|
---|
| 279 | <primary sortas="b-rtpr">rtpr</primary>
|
---|
| 280 | </indexterm>
|
---|
| 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
| 283 |
|
---|
[81fd230] | 284 | <varlistentry id="rtstat">
|
---|
[bdea25ce] | 285 | <term><command>rtstat</command></term>
|
---|
[81fd230] | 286 | <listitem>
|
---|
[89ed081] | 287 | <para>Route status utility</para>
|
---|
[81fd230] | 288 | <indexterm zone="ch-system-iproute2 rtstat">
|
---|
| 289 | <primary sortas="b-rtstat">rtstat</primary>
|
---|
| 290 | </indexterm>
|
---|
| 291 | </listitem>
|
---|
| 292 | </varlistentry>
|
---|
| 293 |
|
---|
| 294 | <varlistentry id="ss">
|
---|
[bdea25ce] | 295 | <term><command>ss</command></term>
|
---|
[81fd230] | 296 | <listitem>
|
---|
[bdea25ce] | 297 | <para>Similar to the <command>netstat</command> command; shows active
|
---|
| 298 | connections</para>
|
---|
[81fd230] | 299 | <indexterm zone="ch-system-iproute2 ss">
|
---|
| 300 | <primary sortas="b-ss">ss</primary>
|
---|
| 301 | </indexterm>
|
---|
| 302 | </listitem>
|
---|
| 303 | </varlistentry>
|
---|
| 304 |
|
---|
| 305 | <varlistentry id="tc">
|
---|
[bdea25ce] | 306 | <term><command>tc</command></term>
|
---|
[81fd230] | 307 | <listitem>
|
---|
[bdea25ce] | 308 | <para>Traffic Controlling Executable; this is for Quality Of Service
|
---|
| 309 | (QOS) and Class Of Service (COS) implementations</para>
|
---|
[81fd230] | 310 |
|
---|
| 311 | <para><command>tc qdisc</command> allows users to setup the queueing
|
---|
[bdea25ce] | 312 | discipline</para>
|
---|
[81fd230] | 313 |
|
---|
[bdea25ce] | 314 | <para><command>tc class</command> allows users to setup classes based
|
---|
| 315 | on the queuing discipline scheduling</para>
|
---|
[81fd230] | 316 |
|
---|
| 317 | <para><command>tc estimator</command> allows users to estimate the
|
---|
[bdea25ce] | 318 | network flow into a network</para>
|
---|
[81fd230] | 319 |
|
---|
| 320 | <para><command>tc filter</command> allows users to setup the QOS/COS
|
---|
[bdea25ce] | 321 | packet filtering</para>
|
---|
[81fd230] | 322 |
|
---|
| 323 | <para><command>tc policy</command> allows users to setup the QOS/COS
|
---|
[bdea25ce] | 324 | policies</para>
|
---|
[81fd230] | 325 | <indexterm zone="ch-system-iproute2 ss">
|
---|
| 326 | <primary sortas="b-tc">tc</primary>
|
---|
| 327 | </indexterm>
|
---|
| 328 | </listitem>
|
---|
| 329 | </varlistentry>
|
---|
[bdea25ce] | 330 |
|
---|
[81fd230] | 331 | </variablelist>
|
---|
[bdea25ce] | 332 |
|
---|
[a088964] | 333 | </sect2>
|
---|
[81fd230] | 334 |
|
---|
[bdea25ce] | 335 | </sect1>
|
---|