[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 |
|
---|
| 7 | <!ENTITY bridge-download-http "&sourceforge-repo2;/projects/bridge/files/bridge/bridge-utils-&bridgeutils-version;.tar.gz">
|
---|
| 8 | <!ENTITY bridge-download-ftp " ">
|
---|
| 9 | <!ENTITY bridge-md5sum "ec7b381160b340648dede58c31bb2238">
|
---|
| 10 | <!ENTITY bridge-size "36 KB">
|
---|
| 11 | <!ENTITY bridge-buildsize "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 | <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 |
|
---|
| 32 | <para>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).</para>
|
---|
| 35 |
|
---|
[dc20ce3] | 36 | &lfs78_checked;
|
---|
[5f6ab32] | 37 |
|
---|
| 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>Download (HTTP): <ulink url="&bridge-download-http;"/></para>
|
---|
| 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (FTP): <ulink url="&bridge-download-ftp;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download MD5 sum: &bridge-md5sum;</para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download size: &bridge-size;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Estimated disk space required: &bridge-buildsize;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated build time: &bridge-time;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | </itemizedlist>
|
---|
| 59 |
|
---|
[0f79fa20] | 60 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 61 | <itemizedlist spacing="compact">
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>
|
---|
| 64 | Required patch:
|
---|
| 65 | <ulink url="&patch-root;/bridge-utils-&bridgeutils-version;-linux_3.8_fix-1.patch"/>
|
---|
| 66 | </para>
|
---|
| 67 | </listitem>
|
---|
| 68 | </itemizedlist>
|
---|
| 69 |
|
---|
[5f6ab32] | 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 | <para condition="html" role="usernotes">User Notes:
|
---|
| 78 | <ulink url="&blfs-wiki;/bridge"/></para>
|
---|
| 79 |
|
---|
| 80 | </sect2>
|
---|
| 81 |
|
---|
[a23aa7b] | 82 | <sect2 role="kernel" id='bridgeutils-kernel'>
|
---|
| 83 | <title>Kernel Configuration</title>
|
---|
| 84 |
|
---|
| 85 | <para>Enable the following options in the kernel configuration
|
---|
| 86 | and recompile the kernel if necessary:</para>
|
---|
| 87 |
|
---|
[8beb27b] | 88 | <screen><literal>[*] Networking support ---> [CONFIG_NET]
|
---|
[196d393] | 89 | Networking options --->
|
---|
| 90 | <*/M> 802.1d Ethernet Bridging [CONFIG_BRIDGE]</literal></screen>
|
---|
[a23aa7b] | 91 |
|
---|
| 92 | <indexterm zone="bridgeutils bridgeutils-kernel">
|
---|
| 93 | <primary sortas="d-bridgeutils">Bridge Utilities</primary>
|
---|
| 94 | </indexterm>
|
---|
| 95 |
|
---|
| 96 | </sect2>
|
---|
| 97 |
|
---|
[5f6ab32] | 98 | <sect2 role="installation">
|
---|
[a23aa7b] | 99 | <title>Installation of bridge-utils</title>
|
---|
[5f6ab32] | 100 |
|
---|
[a23aa7b] | 101 | <para>Install <application>bridge-utils</application> by running the following
|
---|
[5f6ab32] | 102 | commands:</para>
|
---|
| 103 |
|
---|
[0f79fa20] | 104 | <screen><userinput>patch -Np1 -i ../bridge-utils-&bridgeutils-version;-linux_3.8_fix-1.patch &&
|
---|
| 105 | autoconf -o configure configure.in &&
|
---|
| 106 | ./configure --prefix=/usr &&
|
---|
[5f6ab32] | 107 | make</userinput></screen>
|
---|
| 108 |
|
---|
| 109 | <para>Testing the results requires running the six shell scripts in
|
---|
[0d7900a] | 110 | the <filename class='directory'>tools/</filename> directory.
|
---|
[73006114] | 111 | Two of the tests require two ethernet ports. Some tests
|
---|
[5f6ab32] | 112 | will not preserve the current network configuration. See
|
---|
| 113 | <filename>tests/README</filename> for details.</para>
|
---|
| 114 |
|
---|
| 115 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 116 |
|
---|
| 117 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 118 |
|
---|
| 119 | </sect2>
|
---|
| 120 |
|
---|
[a23aa7b] | 121 | <sect2 role="configuration">
|
---|
| 122 | <title>Configuring bridge-utils</title>
|
---|
| 123 |
|
---|
| 124 | <sect3 id='bridgeutils-init'>
|
---|
| 125 | <title>Configuration Information</title>
|
---|
| 126 |
|
---|
[0d7900a] | 127 | <para>To automate bridge creation and configuration,
|
---|
[a23aa7b] | 128 | install the <filename>/lib/services/etc/bridge</filename>
|
---|
| 129 | service script included in the <xref linkend="bootscripts"/>
|
---|
| 130 | package.</para>
|
---|
| 131 |
|
---|
| 132 | <indexterm zone="bridgeutils bridgeutils-init">
|
---|
| 133 | <primary sortas="f-bridgeutils">bridge-utils</primary>
|
---|
| 134 | </indexterm>
|
---|
| 135 |
|
---|
[bcad034] | 136 | <screen role="root"><userinput>make install-service-bridge</userinput></screen>
|
---|
[a23aa7b] | 137 |
|
---|
| 138 | <note><para>The <filename>bridge</filename> script depends
|
---|
[a2472e1] | 139 | on the commands <command>/sbin/ifup</command> and
|
---|
[a23aa7b] | 140 | <command>/sbin/ifdown</command> and the service script
|
---|
| 141 | <emphasis>ipv4-static</emphasis> from the <emphasis>LFS</emphasis>
|
---|
| 142 | bootscripts dated January 27, 2012 or later.</para></note>
|
---|
| 143 |
|
---|
[63d51c9] | 144 | <para>The following configuration file will create a bridge device at
|
---|
| 145 | boot time and attach the eth0 device to it. If more than one device is
|
---|
| 146 | desired, use a space separated list of INTERFACE_COMPONENTS. This
|
---|
| 147 | configuration is useful when planning to run a virtual machine such as
|
---|
| 148 | kvm/qemu.</para>
|
---|
[a23aa7b] | 149 |
|
---|
[0d7900a] | 150 | <para>Other SERVICE combinations are possible, for example,
|
---|
[a23aa7b] | 151 | SERVICES="bridge dhcp". In that case, the address parameters
|
---|
[0d7900a] | 152 | are not needed, but do not interfere if present. The
|
---|
[a23aa7b] | 153 | bridge service may also be used alone, but will require
|
---|
| 154 | additional subsequent configuration.</para>
|
---|
| 155 |
|
---|
[63d51c9] | 156 | <caution><para>Do not run a parallel configuration for a device in the
|
---|
| 157 | INTERFACE_COMPONENTS list. For instance, in the example below, do not
|
---|
| 158 | configure <filename>/etc/sysconfig/ifconfig.eth0</filename> to run at
|
---|
| 159 | boot time. The command <command>ifdown br0</command> followed by
|
---|
| 160 | command <command>ifup eth0</command> will work, but don't try to have
|
---|
| 161 | both up at the same time.</para></caution>
|
---|
[0d7900a] | 162 |
|
---|
[a23aa7b] | 163 | <screen role="root"><userinput>cat > /etc/sysconfig/ifconfig.br0 << "EOF"
|
---|
| 164 | <literal>ONBOOT=yes
|
---|
| 165 | IFACE=br0
|
---|
| 166 | SERVICE="bridge ipv4-static" # Space separated
|
---|
| 167 | IP=192.168.1.32
|
---|
| 168 | GATEWAY=192.168.1.1
|
---|
| 169 | PREFIX=24
|
---|
| 170 | BROADCAST=192.168.1.255
|
---|
[d28198d3] | 171 | CHECK_LINK=no # Don't check before bridge is created
|
---|
[a23aa7b] | 172 | STP=no # Spanning tree protocol, default no
|
---|
[0d7900a] | 173 | INTERFACE_COMPONENTS="eth0" # Add to IFACE, space separated devices
|
---|
[a23aa7b] | 174 | IP_FORWARD=true</literal>
|
---|
| 175 | EOF</userinput></screen>
|
---|
| 176 |
|
---|
| 177 | <para>All addresses should be changed to meet your circumstance.</para>
|
---|
| 178 |
|
---|
| 179 | </sect3>
|
---|
| 180 |
|
---|
| 181 | </sect2>
|
---|
| 182 |
|
---|
| 183 |
|
---|
[5f6ab32] | 184 | <sect2 role="content">
|
---|
| 185 | <title>Contents</title>
|
---|
| 186 |
|
---|
| 187 | <segmentedlist>
|
---|
| 188 | <segtitle>Installed Program</segtitle>
|
---|
| 189 | <segtitle>Installed Libraries</segtitle>
|
---|
| 190 | <segtitle>Installed Directories</segtitle>
|
---|
| 191 |
|
---|
| 192 | <seglistitem>
|
---|
| 193 | <seg>brctl</seg>
|
---|
| 194 | <seg>None</seg>
|
---|
| 195 | <seg>None</seg>
|
---|
| 196 | </seglistitem>
|
---|
| 197 | </segmentedlist>
|
---|
| 198 |
|
---|
| 199 | <variablelist>
|
---|
| 200 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 201 | <?dbfo list-presentation="list"?>
|
---|
| 202 | <?dbhtml list-presentation="table"?>
|
---|
| 203 |
|
---|
| 204 | <varlistentry id="brctl">
|
---|
| 205 | <term><command>brctl</command></term>
|
---|
| 206 | <listitem>
|
---|
| 207 | <para>is a program used to set up, maintain, and inspect the
|
---|
| 208 | ethernet bridge configuration in the linux kernel. </para>
|
---|
| 209 | <indexterm zone="bridgeutils brctl">
|
---|
| 210 | <primary sortas="b-brctl">brctl</primary>
|
---|
| 211 | </indexterm>
|
---|
| 212 | </listitem>
|
---|
| 213 | </varlistentry>
|
---|
| 214 |
|
---|
| 215 | </variablelist>
|
---|
| 216 |
|
---|
| 217 | </sect2>
|
---|
| 218 |
|
---|
| 219 | </sect1>
|
---|