1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
|
<?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"?>
<sect1info condition="script">
<productname>iproute2</productname>
<productnumber>&iproute2-version;</productnumber>
<address>&iproute2-url;</address>
</sect1info>
<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>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem>
<seg>&iproute2-ch6-sbu;</seg>
<seg>&iproute2-ch6-du;</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of IPRoute2</title>
<para>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 the BLFS Book at
<ulink url="&blfs-root;view/svn/server/databases.html#db"/>.
</para>
<screen><userinput>sed -i '/^TARGETS/s@arpd@@g' misc/Makefile</userinput></screen>
<para>Compile the package:</para>
<screen><userinput remap="make">make DESTDIR=</userinput></screen>
<variablelist>
<title>The meaning of the make option:</title>
<varlistentry>
<term><parameter>DESTDIR=</parameter></term>
<listitem>
<para>This ensures that the IPRoute2 binaries will install into
the correct directory. By default, <parameter>DESTDIR</parameter> is
set to <filename class="directory">/usr</filename>.</para>
</listitem>
</varlistentry>
</variablelist>
<para>This package comes with a testsuite, but due to assumptions it makes,
it is not possible to reliably run these tests from within the chroot
environment. If you wish to run these tests after booting into your new LFS
system, ensure you select <filename>/proc/config.gz</filename>
CONFIG_IKCONFIG_PROC ("General setup" -> "Enable access to
.config through /proc/config.gz") support into your kernel then run
'make alltests' from the <filename class="directory">testsuite/</filename>
subdirectory.</para>
<para>Install the package:</para>
<screen><userinput remap="install">make DESTDIR= SBINDIR=/sbin MANDIR=/usr/share/man \
DOCDIR=/usr/share/doc/iproute2-&iproute2-version; install</userinput></screen>
</sect2>
<sect2 id="contents-iproute2" role="content">
<title>Contents of IPRoute2</title>
<segmentedlist>
<segtitle>Installed programs</segtitle>
<segtitle>Installed directories</segtitle>
<seglistitem>
<seg>ctstat (link to lnstat), genl, ifcfg, ifstat, ip, lnstat,
nstat, routef, routel, rtacct, rtmon, rtpr, rtstat (link to lnstat), ss,
and tc</seg>
<seg>/etc/iproute2, /lib/tc, /usr/share/doc/iproute2-&iproute2-version;,
/usr/lib/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="genl">
<term><command>genl</command></term>
<listitem>
<para></para>
<indexterm zone="ch-system-iproute2 genl">
<primary sortas="b-genl">genl</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="ifcfg">
<term><command>ifcfg</command></term>
<listitem>
<para>A shell script wrapper for the <command>ip</command> command.
Note that it requires the <command>arping</command> and
<command>rdisk</command> programs from the
iputils package found at <ulink url="http://www.skbuff.net/iputils/"/>.</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>
|