openstack-manuals/doc/install-guide/section_compute-config-guest-network.xml
Tom Fifield b112b46611 Remove use of fixed_range from docs
fixed_range in nova.conf was deprecated in Grizzly and has been
removed in Havana.

Change-Id: I663ab54260ab7a6041b951598b901cf95a259df3
Closes-Bug: 1207559
2013-10-01 09:45:33 -05:00

85 lines
4.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xml:id="compute-configuring-guest-network"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>Pre-configuring the network</title>
<para>These instructions are for using the FlatDHCP networking mode with a single network
interface. More complex configurations are described in the networking section, but this
configuration is known to work. These configuration options should be set on all compute
nodes.</para>
<para>Set your network interface in promiscuous mode so that it can receive packets that are
intended for virtual machines. As
root:<screen><prompt>#</prompt> <userinput>ip link set eth0 promisc on</userinput></screen></para>
<para os="ubuntu">Set up your /etc/network/interfaces file with these settings:</para>
<itemizedlist os="ubuntu"><listitem><para>eth0: public IP, gateway</para></listitem>
<listitem><para>br100: no ports, stp off, fd 0, first address from your defined network range.</para></listitem></itemizedlist>
<para os="ubuntu">Here's an Ubuntu/Debian example:</para>
<para os="ubuntu"><programlisting># The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# Bridge network interface for VM networks
auto br100
iface br100 inet static
address 192.168.100.1
netmask 255.255.255.0
bridge_stp off
bridge_fd 0</programlisting></para>
<para os="centos;fedora;rhel">Here's an example network setup for RHEL, Fedora, or CentOS. Create
<filename>/etc/sysconfig/network-scripts/ifcfg-br100</filename>:</para>
<programlisting os="centos;fedora;rhel">DEVICE=br100
TYPE=Bridge
ONBOOT=yes
DELAY=0
BOOTPROTO=static
IPADDR=192.168.100.1
NETMASK=255.255.255.0</programlisting>
<para os="opensuse">Here's an example network setup for openSUSE. Create
<filename>/etc/sysconfig/network/ifcfg-br100</filename>:</para>
<programlisting os="opensuse">DEVICE=br100
TYPE=Bridge
ONBOOT=yes
DELAY=0
BOOTPROTO=static
STARTMODE=auto
IPADDR=192.168.100.1
NETMASK=255.255.255.0</programlisting>
<para>Also install bridge-utils:</para>
<screen os="ubuntu"><prompt>$</prompt> <userinput>sudo apt-get install bridge-utils</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>$</prompt> <userinput>sudo yum install bridge-utils</userinput></screen>
<screen os="opensuse"><prompt>$</prompt> <userinput>sudo zypper install bridge-utils</userinput></screen>
<para>Ensure that you set up the bridge, although if you use flat_network_bridge=br100 in your
<filename>nova.conf</filename> file, nova will set up the bridge for you when you run
the <command>nova network-create</command> command.</para>
<screen><prompt>$</prompt> <userinput>sudo brctl addbr br100</userinput></screen>
<para>Lastly, restart networking to have these changes take
effect. (This method is deprecated but "<code>restart
networking</code>" doesn't always work.)</para>
<screen><prompt>$</prompt> <userinput>sudo /etc/init.d/networking restart</userinput></screen>
<section xml:id="config-requirements-rhel" os="rhel;centos">
<title>Configuration requirements with
RHEL</title>
<para>Set selinux in permissive mode:</para>
<screen><prompt>$</prompt> <userinput>sudo setenforce permissive</userinput></screen>
<para>Otherwise you will get issues like <link
xlink:href="https://bugzilla.redhat.com/show_bug.cgi?id=734346"
>https://bugzilla.redhat.com/show_bug.cgi?id=734346</link> /usr/bin/nova-dhcpbridge: No such file or
directory.</para>
<para>If you are using a distribution based on RHEL 6.2 or earlier, use the <command>openstack-config</command> utility to
turn off forced DHCP releases:</para>
<screen><prompt>$</prompt> <userinput>sudo openstack-config --set /etc/nova/nova.conf DEFAULT force_dhcp_release False</userinput></screen>
<para>If you are using a distribution based on RHEL 6.3 or later, install the dnsmasq utilities (<package>dnsmasq-utils</package>) package, which provides support for forced DHCP releases:</para>
<screen><prompt>$</prompt> <userinput>sudo yum install dnsmasq-utils</userinput></screen>
<para os="rhel;centos;fedora">If you intend to use guest images that don't have a single partition, then allow libguestfs to inspect the image so that files can be injected, by setting:
</para>
<screen><prompt>$></prompt> <userinput>sudo openstack-config --set /etc/nova/nova.conf DEFAULT libvirt_inject_partition -1</userinput></screen>
</section></section>