Step-by-Step Guide to Configure OpenStack Compute & Neutron Networking
This guide walks through configuring kernel network parameters, installing required packages, setting up Keystone authentication, enabling the ML2 plugin, configuring Open vSwitch, linking Compute with Neutron, creating external and tenant networks, and deploying the OpenStack dashboard on an Icehouse cloud.
Configure Kernel Network Parameters
vim /etc/sysctl.confnet.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
sysctl -pInstall Required Packages
yum install openstack-neutron-ml2 openstack-neutron-openvswitchConfigure Keystone Authentication for Neutron
openstack-config --set /etc/neutron/neutron.conf DEFAULT auth_strategy keystoneopenstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_uri http://controller:5000openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_host controlleropenstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_protocol httpopenstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_port 35357openstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_tenant_name serviceopenstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_user neutronopenstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_password neutronConfigure Message Queue Backend
openstack-config --set /etc/neutron/neutron.conf DEFAULT rpc_backend neutron.openstack.common.rpc.impl_qpidopenstack-config --set /etc/neutron/neutron.conf DEFAULT qpid_hostname controllerEnable ML2 Plugin and Service Plugins
openstack-config --set /etc/neutron/neutron.conf DEFAULT core_plugin ml2openstack-config --set /etc/neutron/neutron.conf DEFAULT service_plugins routerConfigure ML2 Plugin Details
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 type_drivers greopenstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types greopenstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers openvswitchopenstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2_type_gre tunnel_id_ranges 1:1000openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs local_ip 10.0.10.124openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs tunnel_type greopenstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs enable_tunneling Trueopenstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriveropenstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup enable_security_group TrueStart Open vSwitch Service
service openvswitch startchkconfig openvswitch onovs-vsctl add-br br-intConfigure Compute to Use Neutron Networking
openstack-config --set /etc/nova/nova.conf DEFAULT network_api_class nova.network.neutronv2.api.APIopenstack-config --set /etc/nova/nova.conf DEFAULT neutron_url http://controller:9696openstack-config --set /etc/nova/nova.conf DEFAULT neutron_auth_strategy keystoneopenstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_tenant_name serviceopenstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_username neutronopenstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_password neutronopenstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_auth_url http://controller:35357/v2.0openstack-config --set /etc/nova/nova.conf DEFAULT linuxnet_interface_driver nova.network.linux_net.LinuxOVSInterfaceDriveropenstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriveropenstack-config --set /etc/nova/nova.conf DEFAULT security_group_api neutronEnable and Restart Services
cd /etc/neutron/ln -s plugins/ml2/ml2_conf.ini /etc/neutron/plugin.inicp /etc/init.d/neutron-openvswitch-agent /etc/init.d/neutron-openvswitch-agent.origsed -i 's,plugins/openvswitch/ovs_neutron_plugin.ini,plugin.ini,g' /etc/init.d/neutron-openvswitch-agentservice openstack-nova-compute restartservice neutron-openvswitch-agent startchkconfig neutron-openvswitch-agent onCreate External Network on Controller
. admin-openrc.shneutron net-create ext-net --shared --router:external=TrueCreate Subnet for External Network
neutron subnet-create ext-net --name ext-subnet \--allocation-pool start=172.16.20.12,end=172.16.20.61 \
--disable-dhcp --gateway 172.16.0.1 172.16.0.0/16
Create Tenant Network and Subnet
neutron net-create demo-netneutron subnet-create demo-net --name demo-subnet \--gateway 192.168.22.1 192.168.22.0/24
Create Router and Attach Networks
neutron router-create demo-routerneutron router-interface-add demo-router demo-subnetneutron router-gateway-set demo-router ext-netInstall and Configure OpenStack Dashboard
yum install memcached python-memcached mod_wsgi openstack-dashboardvim /etc/openstack-dashboard/local_settingsCACHES = {'default': {'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache','LOCATION': '127.0.0.1:11211',}}
ALLOWED_HOSTS = ['*', 'localhost']
OPENSTACK_HOST = "controller"
TIME_ZONE = "Asia/Shanghai"
Start Dashboard Services
service memcached startservice httpd startchkconfig memcached onchkconfig httpd onVerification
Use the dashboard or CLI to view the network topology.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
