{"id":236,"date":"2015-09-07T13:47:50","date_gmt":"2015-09-07T13:47:50","guid":{"rendered":"http:\/\/onlinelab.info\/?p=236"},"modified":"2015-09-07T13:47:50","modified_gmt":"2015-09-07T13:47:50","slug":"openstack-kilo-on-ubuntu-14-04-2-configure-neutron-2","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2015\/09\/07\/openstack-kilo-on-ubuntu-14-04-2-configure-neutron-2\/","title":{"rendered":"OpenStack Kilo on Ubuntu 14.04.2 \u2013 Configure Neutron #2"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8807 aligncenter\" src=\"http:\/\/www.itzgeek.com\/wp-content\/uploads\/2015\/06\/OpenStack-Logo.png\" alt=\"OpenStack Logo\" width=\"200\" height=\"200\" title=\"\"><\/p>\n<p>This is the second part of configuring neutron (Networking) on Ubuntu 14.04, you can go through previous article on Configure Neutron #1, in which we have installed and configured Networking components on Controller node.<\/p>\n<p>Here, in this tutorial we will install and configure Network Node.<\/p>\n<h2>Prerequisite:<\/h2>\n<p>Make sure you have enabled OpenStack Kilo repository on Compute Node, or follow below steps to enable it.<\/p>\n<p>Install the Ubuntu Cloud archive keyring and repository.<\/p>\n<pre># apt-get install ubuntu-cloud-keyring\n\n# echo \"deb http:\/\/ubuntu-cloud.archive.canonical.com\/ubuntu\" \"trusty-updates\/kilo main\" &gt; \/etc\/apt\/sources.list.d\/cloudarchive-kilo.list<\/pre>\n<p>Upgrade your system.<\/p>\n<pre># apt-get update<\/pre>\n<p>Configure kernel parameters on network node, edit \/etc\/sysctl.conf file.<\/p>\n<pre># nano \/etc\/sysctl.conf<\/pre>\n<p>Add the following parameters into the file.<\/p>\n<pre>net.ipv4.ip_forward=1\nnet.ipv4.conf.all.rp_filter=0\nnet.ipv4.conf.default.rp_filter=0<\/pre>\n<p>Apply the changes.<\/p>\n<pre># sysctl -p<\/pre>\n<h2>Install and configure Networking components:<\/h2>\n<p>Install the following packages on Network node.<\/p>\n<pre># apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent<\/pre>\n<p>Edit \/etc\/neutron\/neutron.conf.<\/p>\n<pre># nano \/etc\/neutron\/neutron.conf<\/pre>\n<p>Modify the below settings and make sure to place a entries in the proper sections. In the case of database section, comment out any connection options as network node does not directly access the database<\/p>\n<pre>[DEFAULT]\n...\nrpc_backend = rabbit\ncore_plugin = ml2\nservice_plugins = router\nallow_overlapping_ips = True\nauth_strategy = keystone\nverbose = True\n\n[oslo_messaging_rabbit]\n...\nrabbit_host = controller\nrabbit_userid = openstack\nrabbit_password = password\n\n<strong>## Replace \"password\" with the password you chose for the openstack account in RabbitMQ<\/strong>\n\n[database]\n...\n#connection = sqlite:\/\/\/\/var\/lib\/neutron\/neutron.sqlite\n\n<strong>##Comment out the above line.<\/strong>\n\n[keystone_authtoken]\n...\nauth_uri = http:\/\/controller:5000\nauth_url = http:\/\/controller:35357\nauth_plugin = password\nproject_domain_id = default\nuser_domain_id = default\nproject_name = service\nusername = neutron\npassword = password\n\n<strong>## Replace \"password\" with the password you chose for neutron user in the identity service<\/strong><\/pre>\n<h2>Configure Modular Layer 2 (ML2) plug-in:<\/h2>\n<p>Edit the \/etc\/neutron\/plugins\/ml2\/ml2_conf.ini file.<\/p>\n<pre># nano \/etc\/neutron\/plugins\/ml2\/ml2_conf.ini<\/pre>\n<p>Modify the below sections.<\/p>\n<pre>[ml2]\n...\ntype_drivers = flat,vlan,gre,vxlan\ntenant_network_types = gre\nmechanism_drivers = openvswitch\n\n[ml2_type_flat]\n...\nflat_networks = external\n\n[ml2_type_gre]\n...\ntunnel_id_ranges = 1:1000\n\n[securitygroup]\n...\nenable_security_group = True\nenable_ipset = True\nfirewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver\n\n[ovs]\nlocal_ip = 192.168.11.22\n<strong>## Tunnel network interface on your Network Node.<\/strong>\nbridge_mappings = external:br-ex\n\n[agent]\ntunnel_types = gre<\/pre>\n<p><strong>Note: [ovs] and [agent] stanzas are need to be added extra at the bottom of the file.<\/strong><\/p>\n<h2>Configure the Layer-3 (L3) agent:<\/h2>\n<p>It provides routing services for virtual networks, Edit the \/etc\/neutron\/l3_agent.ini file.<\/p>\n<pre># nano \/etc\/neutron\/l3_agent.ini<\/pre>\n<p>Modify the [DEFAULT] section.<\/p>\n<pre>[DEFAULT]\n...\ninterface_driver = neutron.agent.linux.interface.OVSInterfaceDriver\nexternal_network_bridge =\nrouter_delete_namespaces = True\nverbose = True<\/pre>\n<h2>Configure the DHCP agent:<\/h2>\n<p>Edit the \/etc\/neutron\/dhcp_agent.ini file.<\/p>\n<pre># nano\u00a0 \/etc\/neutron\/dhcp_agent.ini<\/pre>\n<p>Modify the following stanzas.<\/p>\n<pre>[DEFAULT]\n...\ninterface_driver = neutron.agent.linux.interface.OVSInterfaceDriver\ndhcp_driver = neutron.agent.linux.dhcp.Dnsmasq\ndhcp_delete_namespaces = True\nverbose = True<\/pre>\n<h2>Configure the metadata agent:<\/h2>\n<p>Edit the \/etc\/neutron\/metadata_agent.ini file<\/p>\n<pre># nano \/etc\/neutron\/metadata_agent.ini<\/pre>\n<p>Modify the following sections, you may have to comment out the existing entries.<\/p>\n<pre>[DEFAULT]\n...\nverbose = True\nauth_uri = http:\/\/controller:5000\nauth_url = http:\/\/controller:35357\nauth_region = RegionOne\nauth_plugin = password\nproject_domain_id = default\nuser_domain_id = default\nproject_name = service\nusername = neutron\npassword = password\n\n<strong>## Replace \"password\" with the password you chose for neutron user in the identity service.<\/strong>\n\nnova_metadata_ip = controller\nmetadata_proxy_shared_secret = 26f008fb8c504b393df3\n<strong>## Replace \"26f008fb8c504b393df3\" with a suitable secret for the metadata proxy<\/strong><\/pre>\n<p>On the <strong>Controller node<\/strong>, edit the \/etc\/nova\/nova.conf file.<\/p>\n<pre># nano \/etc\/nova\/nova.conf<\/pre>\n<p>Modify the [neutron] sections.<\/p>\n<pre>[neutron]\n...\nservice_metadata_proxy = True\nmetadata_proxy_shared_secret = 26f008fb8c504b393df3\n\n<strong>## Replace \"26f008fb8c504b393df3\" with the secret you chose for the metadata proxy.<\/strong><\/pre>\n<p>Restart the compute API service on controller node.<\/p>\n<pre># service nova-api restart<\/pre>\n<h2>Configure the Open vSwitch (OVS) service:<\/h2>\n<p>Restart the OVS service on Network Node.<\/p>\n<pre># service openvswitch-switch restart<\/pre>\n<p>Add the external bridge.<\/p>\n<pre># ovs-vsctl add-br br-ex<\/pre>\n<p>Add a port to the external bridge that connects to the physical external network interface, in my case eth2 is the interface name.<\/p>\n<pre># ovs-vsctl add-port br-ex eth2<\/pre>\n<p>Restar the networking services.<\/p>\n<pre># service neutron-plugin-openvswitch-agent restart\n# service neutron-l3-agent restart\n# service neutron-dhcp-agent restart\n# service neutron-metadata-agent restart<\/pre>\n<h2>Verify operation:<\/h2>\n<p>Load admin credentials on the controller node.<\/p>\n<pre># source admin-openrc.sh<\/pre>\n<p>List the agents.<\/p>\n<pre># neutron agent-list\n+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+\n| id\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | agent_type\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | host\u00a0\u00a0\u00a0 | alive | admin_state_up | binary\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\n+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+\n| 23da3f95-b81b-4426-9d7a-d5cbfc5241c0 | Metadata agent\u00a0\u00a0\u00a0\u00a0 | network | :-)\u00a0\u00a0 | True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | neutron-metadata-agent\u00a0\u00a0\u00a0 |\n| 4217b0c0-fbd4-47d9-bc22-5187f09d958a | DHCP agent\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | network | :-)\u00a0\u00a0 | True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | neutron-dhcp-agent\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\n| b4cf95cd-2eba-4c69-baa6-ae8832384e40 | Open vSwitch agent | network | :-)\u00a0\u00a0 | True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | neutron-openvswitch-agent |\n| d9e174be-e719-4f05-ad05-bc444eb97df5 | L3 agent\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | network | :-)\u00a0\u00a0 | True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | neutron-l3-agent\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\n+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+<\/pre>\n<p>That\u2019s All!!!, you have successfully configured Network Node.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the second part of configuring neutron (Networking) on Ubuntu 14.04, you can go through previous article on Configure Neutron #1, in which we have installed and configured Networking components on Controller node. Here,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-236","post","type-post","status-publish","format-standard","hentry","category-virtualization"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=236"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}