5.4.1.2. Creating Network Bridges for Physical Network Adapters

By default, each OpenVZ server has one network bridge br0 set up for a single physical network adapter. If your server has more than one physical network adapter, you need to create a network bridge for each of those that you need to connect to a bridged virtual network.

Assuming that two physical network adapters enp0s5 and enp0s6 and a bridge br0 exist on the server, you can create a bridge br1 for enp0s6 as follows:

  1. In the /etc/sysconfig/network-scripts/ directory, create two configuration files: one for the physical adapter enp0s6 and one for the bridge br1. You can use the configuration files for enp0s5 and br0, respectively, as a basis:

    cat /etc/sysconfig/network-scripts/ifcfg-enp0s5 > /etc/sysconfig/network-scripts/ \
    ifcfg-enp0s6
    cat /etc/sysconfig/network-scripts/ifcfg-br0 > /etc/sysconfig/network-scripts/ \
    ifcfg-br1
  2. In ifcfg-enp0s6, set DEVICE to enp0s6, BRIDGE to br1, and UUID to empty.
  3. In ifcfg-br1 set DEVICE to br1, NAME to enp0s6, and UUID to empty.
  4. Restart network to apply changes:

    /etc/init.d/network restart

After the network bridge is set up, you can bind a virtual network to it.