1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY bridge-download-http "&kernel-dl;/linux/utils/net/bridge-utils/bridge-utils-&bridgeutils-version;.tar.xz">
|
---|
8 | <!ENTITY bridge-download-ftp " ">
|
---|
9 | <!ENTITY bridge-md5sum "3e1fee4dc22cac5457c2f6ffb990a518">
|
---|
10 | <!ENTITY bridge-size "29 KB">
|
---|
11 | <!ENTITY bridge-buildsize "1.1 MB">
|
---|
12 | <!ENTITY bridge-time "less than 0.1 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="bridgeutils" xreflabel="bridge-utils-&bridgeutils-version;">
|
---|
16 | <?dbhtml filename="bridge-utils.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <date>$Date$</date>
|
---|
20 | </sect1info>
|
---|
21 |
|
---|
22 | <title>bridge-utils-&bridgeutils-version;</title>
|
---|
23 |
|
---|
24 | <indexterm zone="bridgeutils">
|
---|
25 | <primary sortas="a-bridgeutils">bridge-utils</primary>
|
---|
26 | </indexterm>
|
---|
27 |
|
---|
28 | <sect2 role="package">
|
---|
29 | <title>Introduction to bridge-utils</title>
|
---|
30 |
|
---|
31 | <para>
|
---|
32 | The <application>bridge-utils</application> package contains a utility
|
---|
33 | needed to create and manage bridge devices. This is useful in setting up
|
---|
34 | networks for a hosted virtual machine (VM).
|
---|
35 | </para>
|
---|
36 |
|
---|
37 | &lfs110a_checked;
|
---|
38 |
|
---|
39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
40 | <itemizedlist spacing="compact">
|
---|
41 | <listitem>
|
---|
42 | <para>
|
---|
43 | Download (HTTP): <ulink url="&bridge-download-http;"/>
|
---|
44 | </para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>
|
---|
48 | Download (FTP): <ulink url="&bridge-download-ftp;"/>
|
---|
49 | </para>
|
---|
50 | </listitem>
|
---|
51 | <listitem>
|
---|
52 | <para>
|
---|
53 | Download MD5 sum: &bridge-md5sum;
|
---|
54 | </para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>
|
---|
58 | Download size: &bridge-size;
|
---|
59 | </para>
|
---|
60 | </listitem>
|
---|
61 | <listitem>
|
---|
62 | <para>
|
---|
63 | Estimated disk space required: &bridge-buildsize;
|
---|
64 | </para>
|
---|
65 | </listitem>
|
---|
66 | <listitem>
|
---|
67 | <para>
|
---|
68 | Estimated build time: &bridge-time;
|
---|
69 | </para>
|
---|
70 | </listitem>
|
---|
71 | </itemizedlist>
|
---|
72 |
|
---|
73 | <bridgehead renderas="sect3">bridge-utils Dependencies</bridgehead>
|
---|
74 |
|
---|
75 | <bridgehead renderas="sect4">Optional (to run tests)</bridgehead>
|
---|
76 | <para role="optional">
|
---|
77 | <xref linkend="net-tools"/>
|
---|
78 | </para>
|
---|
79 |
|
---|
80 | <para condition="html" role="usernotes">User Notes:
|
---|
81 | <ulink url="&blfs-wiki;/bridge"/></para>
|
---|
82 |
|
---|
83 | </sect2>
|
---|
84 |
|
---|
85 | <sect2 role="kernel" id='bridgeutils-kernel'>
|
---|
86 | <title>Kernel Configuration</title>
|
---|
87 |
|
---|
88 | <para>
|
---|
89 | Enable the following options in the kernel configuration
|
---|
90 | and recompile the kernel if necessary:
|
---|
91 | </para>
|
---|
92 |
|
---|
93 | <screen><literal>[*] Networking support ---> [CONFIG_NET]
|
---|
94 | Networking options --->
|
---|
95 | <*/M> 802.1d Ethernet Bridging [CONFIG_BRIDGE]</literal></screen>
|
---|
96 |
|
---|
97 | <indexterm zone="bridgeutils bridgeutils-kernel">
|
---|
98 | <primary sortas="d-bridgeutils">Bridge Utilities</primary>
|
---|
99 | </indexterm>
|
---|
100 |
|
---|
101 | </sect2>
|
---|
102 |
|
---|
103 | <sect2 role="installation">
|
---|
104 | <title>Installation of bridge-utils</title>
|
---|
105 |
|
---|
106 | <para>
|
---|
107 | Install <application>bridge-utils</application> by running the following
|
---|
108 | commands:
|
---|
109 | </para>
|
---|
110 |
|
---|
111 | <screen><userinput>autoconf &&
|
---|
112 | ./configure --prefix=/usr &&
|
---|
113 | make</userinput></screen>
|
---|
114 |
|
---|
115 | <para>
|
---|
116 | Testing the results requires running the six shell scripts in
|
---|
117 | the <filename class='directory'>tools/</filename> directory.
|
---|
118 | Two of the tests require two ethernet ports. Some tests
|
---|
119 | will not preserve the current network configuration. See
|
---|
120 | <filename>tests/README</filename> for details.
|
---|
121 | </para>
|
---|
122 |
|
---|
123 | <para>
|
---|
124 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
125 | </para>
|
---|
126 |
|
---|
127 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
128 |
|
---|
129 | </sect2>
|
---|
130 |
|
---|
131 | <sect2 role="configuration" revision="sysv">
|
---|
132 | <title>Configuring bridge-utils</title>
|
---|
133 |
|
---|
134 | <sect3 id='bridgeutils-init'>
|
---|
135 | <title>Configuration Information</title>
|
---|
136 |
|
---|
137 | <para>
|
---|
138 | To automate bridge creation and configuration,
|
---|
139 | install the <filename>/lib/services/etc/bridge</filename>
|
---|
140 | service script included in the <xref linkend="bootscripts"/>
|
---|
141 | package.
|
---|
142 | </para>
|
---|
143 |
|
---|
144 | <indexterm zone="bridgeutils bridgeutils-init">
|
---|
145 | <primary sortas="f-bridgeutils">bridge-utils</primary>
|
---|
146 | </indexterm>
|
---|
147 |
|
---|
148 | <screen role="root"><userinput>make install-service-bridge</userinput></screen>
|
---|
149 |
|
---|
150 | <note>
|
---|
151 | <para>
|
---|
152 | The <filename>bridge</filename> script depends
|
---|
153 | on the commands <command>/sbin/ifup</command> and
|
---|
154 | <command>/sbin/ifdown</command> and the service script
|
---|
155 | <emphasis>ipv4-static</emphasis> from the <emphasis>LFS</emphasis>
|
---|
156 | bootscripts dated January 27, 2012 or later.
|
---|
157 | </para>
|
---|
158 | </note>
|
---|
159 |
|
---|
160 | <para>
|
---|
161 | The following configuration file will create a bridge device at
|
---|
162 | boot time and attach the eth0 device to it. If more than one device is
|
---|
163 | desired, use a space separated list of INTERFACE_COMPONENTS. This
|
---|
164 | configuration is useful when planning to run a virtual machine such as
|
---|
165 | kvm/qemu.
|
---|
166 | </para>
|
---|
167 |
|
---|
168 | <para>
|
---|
169 | Other <envar>SERVICE</envar> combinations are possible, for example,
|
---|
170 | <code>SERVICE="bridge dhcp"</code>. In that case, the address
|
---|
171 | parameters are not needed, but do not interfere if present. The
|
---|
172 | bridge service may also be used alone, but will require
|
---|
173 | additional subsequent configuration.
|
---|
174 | </para>
|
---|
175 |
|
---|
176 | <caution>
|
---|
177 | <para>
|
---|
178 | Do not run a parallel configuration for a device in the
|
---|
179 | INTERFACE_COMPONENTS list. For instance, in the example below, do not
|
---|
180 | configure <filename>/etc/sysconfig/ifconfig.eth0</filename> to run at
|
---|
181 | boot time. The command <command>ifdown br0</command> followed by
|
---|
182 | command <command>ifup eth0</command> will work, but don't try to have
|
---|
183 | both up at the same time.
|
---|
184 | </para>
|
---|
185 | </caution>
|
---|
186 |
|
---|
187 | <screen role="root"><userinput>cat > /etc/sysconfig/ifconfig.br0 << "EOF"
|
---|
188 | <literal>ONBOOT=yes
|
---|
189 | IFACE=br0
|
---|
190 | VIRTINT=yes
|
---|
191 | SERVICE="bridge ipv4-static" # Space separated
|
---|
192 | IP=192.168.1.32
|
---|
193 | GATEWAY=192.168.1.1
|
---|
194 | PREFIX=24
|
---|
195 | BROADCAST=192.168.1.255
|
---|
196 | CHECK_LINK=no # Don't check before bridge is created
|
---|
197 | STP=no # Spanning tree protocol, default no
|
---|
198 | INTERFACE_COMPONENTS="eth0" # Add to IFACE, space separated devices
|
---|
199 | IP_FORWARD=true</literal>
|
---|
200 | EOF</userinput></screen>
|
---|
201 |
|
---|
202 | <para>
|
---|
203 | All addresses should be changed to meet your circumstance.
|
---|
204 | </para>
|
---|
205 |
|
---|
206 | </sect3>
|
---|
207 | </sect2>
|
---|
208 | <!-- There is a whole page about bridging for systemd in the "Connecting to
|
---|
209 | a network" chapter
|
---|
210 | <sect2 role="configuration" revision="systemd">
|
---|
211 | <title>Configuring bridge-utils</title>
|
---|
212 |
|
---|
213 | <sect3 id='bridgeutils-init-systemd'>
|
---|
214 | <title>Configuration Information</title>
|
---|
215 | <para>
|
---|
216 | TBA
|
---|
217 | </para>
|
---|
218 | </sect3>
|
---|
219 | </sect2>
|
---|
220 | -->
|
---|
221 |
|
---|
222 |
|
---|
223 | <sect2 role="content">
|
---|
224 | <title>Contents</title>
|
---|
225 |
|
---|
226 | <segmentedlist>
|
---|
227 | <segtitle>Installed Program</segtitle>
|
---|
228 | <segtitle>Installed Libraries</segtitle>
|
---|
229 | <segtitle>Installed Directories</segtitle>
|
---|
230 |
|
---|
231 | <seglistitem>
|
---|
232 | <seg>brctl</seg>
|
---|
233 | <seg>None</seg>
|
---|
234 | <seg>None</seg>
|
---|
235 | </seglistitem>
|
---|
236 | </segmentedlist>
|
---|
237 |
|
---|
238 | <variablelist>
|
---|
239 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
240 | <?dbfo list-presentation="list"?>
|
---|
241 | <?dbhtml list-presentation="table"?>
|
---|
242 |
|
---|
243 | <varlistentry id="brctl">
|
---|
244 | <term><command>brctl</command></term>
|
---|
245 | <listitem>
|
---|
246 | <para>
|
---|
247 | is a program used to set up, maintain, and inspect the
|
---|
248 | ethernet bridge configuration in the linux kernel
|
---|
249 | </para>
|
---|
250 | <indexterm zone="bridgeutils brctl">
|
---|
251 | <primary sortas="b-brctl">brctl</primary>
|
---|
252 | </indexterm>
|
---|
253 | </listitem>
|
---|
254 | </varlistentry>
|
---|
255 |
|
---|
256 | </variablelist>
|
---|
257 |
|
---|
258 | </sect2>
|
---|
259 |
|
---|
260 | </sect1>
|
---|