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