bridge-utils-1.7.1

#### Beyond Linux® From Scratch (System V Edition) - Version r13.0-791

### Chapter 15. Networking Programs

- Prev

  Networking Programs

- Next

  cifs-utils-7.5

- Up
- Home

# bridge-utils-1.7.1

## Introduction to bridge-utils

The bridge-utils package contains a utility needed to create and manage bridge devices. This is useful in setting up networks for a hosted virtual machine (VM).

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://www.kernel.org/pub/linux/utils/net/bridge-utils/bridge-utils-1.7.1.tar.xz

- Download MD5 sum: 3e1fee4dc22cac5457c2f6ffb990a518

- Download size: 29 KB

- Estimated disk space required: 1.1 MB

- Estimated build time: less than 0.1 SBU

### bridge-utils Dependencies

#### Optional (to run tests)

Net-tools-2.10

## Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

    [*] Networking support --->                                                [NET]
      Networking options --->
        <*/M> 802.1d Ethernet Bridging                                      [BRIDGE]

## Installation of bridge-utils

Install bridge-utils by running the following commands:

    autoconf                  &&
    ./configure --prefix=/usr &&
    make

Testing the results requires running the six shell scripts in the `tools/` directory. Two of the tests require two ethernet ports. Some tests will not preserve the current network configuration. See `tests/README` for details.

Now, as the `root` user:

    make install

## Configuring bridge-utils

### Configuration Information

To automate bridge creation and configuration, install the `/usr/lib/services/bridge` service script included in the blfs-bootscripts-20251220 package.

    make install-service-bridge

### Note

The `bridge` script depends on the commands /sbin/ifup and /sbin/ifdown and the service script ipv4-static from the LFS bootscripts dated January 27, 2012 or later.

The following configuration file will create a bridge device at boot time and attach the eth0 device to it. If more than one device is desired, use a space separated list of INTERFACE_COMPONENTS. This configuration is useful when planning to run a virtual machine such as kvm/qemu.

Other `SERVICE` combinations are possible, for example, `SERVICE="bridge dhcp"`. In that case, the address parameters are not needed, but do not interfere if present. The bridge service may also be used alone, but will require additional subsequent configuration.

### Caution

Do not run a parallel configuration for a device in the INTERFACE_COMPONENTS list. For instance, in the example below, do not configure `/etc/sysconfig/ifconfig.eth0` to run at boot time. The command ifdown br0 followed by command ifup eth0 will work, but don't try to have both up at the same time.

    cat > /etc/sysconfig/ifconfig.br0 << "EOF"
    ONBOOT=yes
    IFACE=br0
    VIRTINT=yes
    SERVICE="bridge ipv4-static"  # Space separated
    IP=192.168.1.32
    GATEWAY=192.168.1.1
    PREFIX=24
    BROADCAST=192.168.1.255
    CHECK_LINK=no                 # Don't check before bridge is created
    STP=no                        # Spanning tree protocol, default no
    INTERFACE_COMPONENTS="eth0"   # Add to IFACE, space separated devices
    IP_FORWARD=true
    EOF

All addresses should be changed to meet your circumstance.

## Contents

Installed Program: brctl
Installed Libraries: None
Installed Directories: None

### Short Descriptions

brctl | is a program used to set up, maintain, and inspect the ethernet bridge configuration in the linux kernel

- Prev

  Networking Programs

- Next

  cifs-utils-7.5

- Up
- Home