Installation guide

Chapter 10.
75
Network Configuration
This page provides an introduction to the common networking configurations used by libvirt based
applications. For additional information consult the libvirt network architecture documentation: http://
libvirt.org/intro.html.
Red Hat Enterprise Linux 6 supports the following networking setups for virtualization:
virtual networks using Network Address Translation (NAT)
directly allocated physical devices using PCI passthrough or SR-IOV.
bridged networks
You must enable NAT, network bridging or directly share a physical device to allow external hosts
access to network services on virtualized guests.
10.1. Network Address Translation (NAT) with libvirt
One of the most common methods for sharing network connections is to use Network Address
Translation (NAT) forwarding (also know as virtual networks).
Host configuration
Every standard libvirt installation provides NAT based connectivity to virtual machines out of the
box. This is the so called 'default virtual network'. Verify that it is available with the virsh net-list
--all command.
# virsh net-list --all
Name State Autostart
-----------------------------------------
default active yes
If it is missing, the example XML configuration file can be reloaded and activated:
# virsh net-define /usr/share/libvirt/networks/default.xml
The default network is defined from /usr/share/libvirt/networks/default.xml
Mark the default network to automatically start:
# virsh net-autostart default
Network default marked as autostarted
Start the default network:
# virsh net-start default
Network default started
Once the libvirt default network is running, you will see an isolated bridge device. This device does
not have any physical interfaces added. The new device uses NAT and IP forwarding to connect to
outside world. Do not add new interfaces.
# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes