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:
-
In the
/etc/sysconfig/network-scripts/directory, create two configuration files: one for the physical adapterenp0s6and one for the bridgebr1. You can use the configuration files forenp0s5andbr0, 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
-
In
ifcfg-enp0s6, setDEVICEtoenp0s6,BRIDGEtobr1, andUUIDto empty. -
In
ifcfg-br1setDEVICEtobr1,NAMEtoenp0s6, andUUIDto empty. -
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.