[OpenStack Beginner’s Guide for Ubuntu 11.04] Network Management
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 routable on the Internet ; it can even be an address on the corporate LAN.
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.
nova-network provides 3 different network management options. Currently you can only choose one of these 3 options for your network management.
- Flat Network
- Flat DHCP Network
- VLAN Network
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.
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.
--network_manager = nova.network.manager.FlatManager --network_manager = nova.network.manager.FlatDHCPManager --network_manager = nova.network.manager.VlanManager
In each of these cases, run the following commands to set up private and public IP addresses for use by the instances:
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
The public IP which you are going to associate with an instance needs to be allocated first by using “euca-allocate-address” command:
You can then associate a public IP to a running instance by using “euca-associate-address” command:
euca-associate-address -i i-0000008 10.10.2.225
Please refer to http://docs.openstack.org/openstack-compute/admin/content/ch04.html for more details about each of the networking types.