%BOOK_ENTITIES; ]>
Configure the network using OpenVswitch This is a very important section, please make sure you read this thoroughly. In order to forward traffic to your instances you will need at least two bridges: public and private. By default these bridges are called cloudbr0 and cloudbr1, but you do have to make sure they are available on each hypervisor. The most important factor is that you keep the configuration consistent on all your hypervisors.
Preparing To make sure that the native bridge module will not interfere with openvswitch the bridge module should be added to the blacklist. See the modprobe documentation for your distribution on where to find the blacklist. Make sure the module is not loaded either by rebooting or executing rmmod bridge before executing next steps. The network configurations below depend on the ifup-ovs and ifdown-ovs scripts which are part of the openvswitch installation. They should be installed in /etc/sysconfig/network-scripts/
Network example There are many ways to configure your network. In the Basic networking mode you should have two (V)LAN's, one for your private network and one for the public network. We assume that the hypervisor has one NIC (eth0) with three tagged VLAN's: VLAN 100 for management of the hypervisor VLAN 200 for public network of the instances (cloudbr0) VLAN 300 for private network of the instances (cloudbr1) On VLAN 100 we give the Hypervisor the IP-Address 192.168.42.11/24 with the gateway 192.168.42.1 The Hypervisor and Management server don't have to be in the same subnet!
Configuring the network bridges It depends on the distribution you are using how to configure these, below you'll find examples for RHEL/CentOS. The goal is to have three bridges called 'mgmt0', 'cloudbr0' and 'cloudbr1' after this section. This should be used as a guideline only. The exact configuration will depend on your network layout.
Configure OpenVswitch The network interfaces using OpenVswitch are created using the ovs-vsctl command. This command will configure the interfaces and persist them to the OpenVswitch database. First we create a main bridge connected to the eth0 interface. Next we create three fake bridges, each connected to a specific vlan tag.
Configure in RHEL or CentOS The required packages were installed when openvswitch and libvirt were installed, we can proceed to configuring the network. First we configure eth0 vi /etc/sysconfig/network-scripts/ifcfg-eth0 Make sure it looks similar to: We have to configure the base bridge with the trunk. vi /etc/sysconfig/network-scripts/ifcfg-cloudbr We now have to configure the three VLAN bridges: vi /etc/sysconfig/network-scripts/ifcfg-mgmt0 vi /etc/sysconfig/network-scripts/ifcfg-cloudbr0 vi /etc/sysconfig/network-scripts/ifcfg-cloudbr1 With this configuration you should be able to restart the network, although a reboot is recommended to see if everything works properly. Make sure you have an alternative way like IPMI or ILO to reach the machine in case you made a configuration error and the network stops functioning!