14
edits
Changes
m
Renamed openvz-centric bridge interface names to more generic names.
This describes a method of setting up networking for a host and its VEs such that the networking configuration for the VEs can be configured exactly as if the VEs were standalone hosts of their own in the same subnets or VLAN as the host. This method makes use of the Virtual Ethernet device and bridges between the host and its containers. This technique has the advantage of allowing IPv6 network configurations to work on both VEs and hosts as they normally would. In particular, both hosts and VEs can use IPv6 autoconfiguration. The network configuration of a VE can be identical to that of a non-VE system.
In the following example the host has two physical interfaces and we are setting up the network configuration for VE 100. The host IP configuration is moved out of the ethN interface configs and into the vzbrN brN interface config scripts (ifcfg-vzbr0 br0 and ifcfg-vzbr1br1). Ie. the host IP configuration will now reside on the vzbrN brN interfaces instead of the ethN interfaces. The example also assumes IPv4 is configured statically, whereas IPv6 is auto-configured.
==Configure host bridge interfaces==
DEVICE=veth100.1
ONBOOT=no
BRIDGE=vzbr1br1
To make the above take effect, either start the VE,
Or if it's already started then manually add each VE interface to its corresponding bridge using:
/usr/sbin/brctl addif vzbr0 br0 veth100.0 /usr/sbin/brctl addif vzbr1 br1 veth100.1
8. Verify each bridge includes the host interface and the veth interfaces for each VE: