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 keystone openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_uri http://controller:5000 openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_host controller openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_protocol http openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_port 35357 openstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_tenant_name service openstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_user neutron openstack-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_qpid openstack-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 ml2 openstack-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 gre openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types gre openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers openvswitch openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2_type_gre tunnel_id_ranges 1:1000 openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs local_ip 10.0.10.124 openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs tunnel_type gre openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs enable_tunneling True openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup enable_security_group TrueStart Open vSwitch Service
service openvswitch start chkconfig openvswitch on ovs-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.API openstack-config --set /etc/nova/nova.conf DEFAULT neutron_url http://controller:9696 openstack-config --set /etc/nova/nova.conf DEFAULT neutron_auth_strategy keystone openstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_tenant_name service openstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_username neutron openstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_password neutron openstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_auth_url http://controller:35357/v2.0 openstack-config --set /etc/nova/nova.conf DEFAULT linuxnet_interface_driver nova.network.linux_net.LinuxOVSInterfaceDriver openstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver openstack-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.ini cp /etc/init.d/neutron-openvswitch-agent /etc/init.d/neutron-openvswitch-agent.orig sed -i 's,plugins/openvswitch/ovs_neutron_plugin.ini,plugin.ini,g' /etc/init.d/neutron-openvswitch-agent service openstack-nova-compute restart service neutron-openvswitch-agent start chkconfig neutron-openvswitch-agent onCreate External Network on Controller
. admin-openrc.sh neutron 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-net neutron 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-router neutron router-interface-add demo-router demo-subnet neutron router-gateway-set demo-router ext-netInstall and Configure OpenStack Dashboard
yum install memcached python-memcached mod_wsgi openstack-dashboard vim /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 start service httpd start chkconfig memcached on chkconfig 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.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
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.
