Saturday 7 June 2014

Steps to create initial networks for OpenStack




[Steps summarised from http://docs.openstack.org/icehouse/install-guide/install/yum/content/neutron-initial-networks.html]



Pre-requisites

Run steps from link http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html to setup command line tools for OpenStack.
Run steps from link http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html to create a tenant and user for OpenStack.



Change the iptables rule for Neutron Server to allow command line access from an IP other than the OpenStack Controller Node

On the Controller node, in file /etc/sysconfig/iptables, remove the line
-A INPUT -s 192.168.2.6/32 -p tcp -m multiport --dports 9696 -m comment --comment "001 neutron server incoming neutron_server_192.168.2.6_192.168.2.6" -j ACCEPT

and in its place, add the line
-A INPUT -p tcp -m multiport --dports 9696 -m comment --comment "Neutron incoming ALL" -j ACCEPT

Restart iptables service to enable the change
# service iptables restart



On the node where OpenStack Command Line tools are installed, set environment for the user admin tenant admin

# source ~/keystonerc_admin



Create external networ

 # neutron net-create <external-network-name> --shared --router:external=True

Example

# neutron net-create Ext1 --shared --router:external=True



Create subnet for the external networ

 # neutron subnet-create <external-network-name> --name <external-network-subnet-name> \
  --allocation-pool start=<start-floating-IP>,end=<end-floating-IP> \
  --disable-dhcp --gateway <external-network-gateway-IP> <external-network-CIDR>

Example 

 # neutron subnet-create Ext1 --name Ext1Subnet1 \
  --allocation-pool start=192.168.3.51,end=192.168.3.230 \
  --disable-dhcp --gateway 192.168.3.1 192.168.3.0/24



Set environment for your specific user and tenant

# source ~/keystonerc_<user-name>



Create tenant network

# neutron net-create <tenant-network-name>

Example

# neutron net-create Private1



Create subnet for the tenant network

# neutron subnet-create <tenant-network-name> --name <tenant-network-subnet-name> \
  --gateway <tenant-network-gateway-IP> <tenant-network-CIDR>
 
Example

# neutron subnet-create Private1 --name Private1Subnet1 \
  --gateway 10.10.3.1 10.10.3.0/24
 


Create a router on the tenant network 

# neutron router-create <router-name>

Example

# neutron router-create Router1



Attach tenant networks to the router

# neutron router-interface-add <router-name> <tenant-network-subnet-name>

Example

# neutron router-interface-add Router1 Private1Subnet1



Attach external network to the router

# neutron router-gateway-set <router-name> <external-network-name>

Example

# neutron router-gateway-set Router1 Ext1



Verify network connectivity by pinging the tenant router gateway

# ping -c 4 <router-gateway-IP>

Example

# ping -c 4 192.168.3.51



Assign Floating IP to the tenant

# nova floating-ip-create <external-network-name>

Note the IP address as <floating-IP> to be used to assign to an instance.



3 comments:

  1. OpenStack Networking (Neutron, formerly Quantum) is a system for managing networks and IP addresses. Like other aspects of the cloud operating system, it can be used by administrators and users to increase the value of existing datacenter assets.

    Networking in openstack

    ReplyDelete
  2. I constantly like to read a top quality content having accurate info pertaining to the subject and the exact same thing I found in this article. Nice job.ถ่ายวีดีโอ

    ReplyDelete
  3. our enthusiasm leads you beyond the limits. When you feel yourself enthusiastic that’s the time you can cross any limit. You seek to get perfection by using the ability of work. Read such motivational article and definitely it will help you to know new facts.dell server ราคา

    ReplyDelete