~openstackbook/openstackbook/cactus

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="UTF-8"?>
<chapter xmlns:db="http://docbook.org/ns/docbook" xmlns="http://docbook.org/ns/docbook" xml:id="Network_Management-d1e2079" version="5.0" xml:base="Network.xml">
	<title>Network Management</title>
	<section xml:id="Introduction-d1e2084">
		<title>Introduction</title>
		<para>In OpenStack, the networking is managed by a component called "nova-network". This interacts with nova-compute to ensure that the instances have the right kind of networking setup for them to communicate among themselves as well as with the outside world. Just as in Eucalyptus or AWS, each OpenStack instance can have 2 IP addresses attached to it. One is the private IP address and the other called Public IP address. The private IP address is typically used for communication between instances and the public IP is used for communication of instances with the outside world. The so called public IP address need not be a public IP address route-able on the Internet ; it can even be an address on the corporate LAN.</para>
		<para>The network configuration inside the instance is done with the private IP address in view. The association between the private IP and the public IP and necessary routing is handled by nova-network and the instances need not be aware of it.</para>
		<para>nova-network provides 3 different network management options. Currently you can only choose one of these 3 options for your network management.</para>
		<itemizedlist>
			<listitem><para>Flat Network</para></listitem>
			<listitem><para>Flat DHCP Network</para></listitem>
			<listitem><para>VLAN Network</para></listitem>
		</itemizedlist>
		<para>VLAN Network is the most feature rich and is the idea choice for a production deployment, while the other modes can be used while getting familiar with OpenStack and when you do not have VLAN Enabled switches to connect different components of the OpenStack infrastructure.</para>
		<para>The network type is chosen by using one of the following configuration options in nova.conf file. If no network manager is specified explicitly, the default network manager, VLANManager is used.</para>
		<programlisting>
			--network_manager = nova.network.manager.FlatManager
			--network_manager = nova.network.manager.FlatDHCPManager
			--network_manager = nova.network.manager.VlanManager
		</programlisting>
		<para>In each of these cases, run the following commands to set up private and public IP addresses for use by the instances:</para>
		<programlisting>
			sudo nova-manage network create 192.168.3.0/24 1 255
			sudo nova-manage floating create 10.10.10.2 10.10.10.224/27
		</programlisting>
		<para>The public IP which you are going to associate with an instance needs to be allocated first by using "euca-allocate-address" command:</para>
		<programlisting>
			euca-allocate-address 10.10.2.225
		</programlisting>
		<para>You can then associate a public IP to a running instance by using "euca-associate-address" command:</para>
		<programlisting>
			euca-associate-address -i i-0000008 10.10.2.225
		</programlisting>
		<para>Please refer to http://docs.openstack.org/openstack-compute/admin/content/ch04.html for more details about each of the networking types.</para>
	</section>
</chapter>