Chapter 11. Pre-Red Hat Enterprise Linux 5.4 Xen networking
This chapter covers special topics for networking and network configuration with the Xen hypervisor.
Most guest network configuration occurs during the guest initialization and installation process. To learn about configuring networking during the guest installation process, read the relevant sections of the installation process, Chapter 7, Guest installation overview.
Network configuration is also covered in the tool specific reference chapters for
virsh (Chapter 26, Managing guests with virsh) and virt-manager (Chapter 27, Managing guests with the Virtual Machine Manager (virt-manager)). Those chapters provide a detailed description of the networking configuration tasks using both tools.
Note
Using para-virtualized network drivers improves performance on fully virtualized Linux guests. Chapter 12, Xen Para-virtualized Drivers explains how to utilize para-virtualized network drivers.
11.1. Configuring multiple guest network bridges to use multiple Ethernet cards Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
To set up network bridges (with the Xen hypervisor):
- Configure another network interface using either the
system-config-networkapplication. Alternatively, create a new configuration file namedifcfg-ethXin the/etc/sysconfig/network-scripts/directory whereXis any number not already in use. Below is an example configuration file for a second network interface calledeth1:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Copy the file
/etc/xen/scripts/network-bridgeto/etc/xen/scripts/network-bridge.xen. - Comment out any existing network scripts in
/etc/xen/xend-config.sxpand add the line(network-xen-multi-bridge).A typicalxend-config.sxpfile should have the following line. Comment this line out. Use the # symbol to comment out lines.network-script network-bridge
network-script network-bridgeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Below is the commented out line and the new line, containing thenetwork-xen-multi-bridgeparameter to enable multiple network bridges:#network-script network-bridge network-script network-xen-multi-bridge
#network-script network-bridge network-script network-xen-multi-bridgeCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a script to create multiple network bridges. This example creates a script called
network-xen-multi-bridge.shin the/etc/xen/scripts/directory. The following example script will create two Xen network bridges (xenbr0andxenbr1); one will be attached toeth1and the other one toeth0. To create additional bridges, follow the example in the script and copy and paste the lines as required:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Make the script executable.
chmod +x /etc/xen/scripts/network-xen-multi-bridge.sh
# chmod +x /etc/xen/scripts/network-xen-multi-bridge.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart networking or restart the system to activate the bridges.
service network restart
# service network restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Multiple bridges should now be configured for guests on the Xen hypervisor.