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