Reference Document: Http://www.aboutyun.com/thread-13116-1-1.html
Http://www.aboutyun.com/thread-13117-1-1.html
Network node
I. Configuration parameters
- Environment configuration
vim /etc/sysctl.confnet.ipv4.ip_forward=1net.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0
- Make configuration effective
-p
Two. Installing the neutron component
1. Installation
apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent-y
2. Modify the configuration
Vim/etc/neutron/neutron.conf[default]verbose= TrueRpc_backend= Rabbit#配置认证访问Auth_strategy= Keystone#启用 Modular Layer 2 (ML2) plug-in, routing service, and overlapping IP addresses:Core_plugin= ML2Service_plugins= Routerallow_overlapping_ips= True#在 the [database] module comment out connection because the network node does not need to connect to the database[Oslo_messaging_rabbit]#配置RabbitMQ Message Queuing serviceRabbit_host= ControllerRabbit_userid= OpenStackRabbit_password= Rabbit_pass (password for created message middleware password, mine for 123) [Keystone_authtoken]#配置认证访问Auth_uri= http://controller:5000Auth_url= http://controller:35357Auth_plugin= passwordproject_domain_id= Defaultuser_domain_id= DefaultProject_Name= Serviceusername= NeutronPassword= Neutron_pass (my password is NEUTRON)
3. Modify Modular Layer 2 (ML2) plug-in
VIM/ETC/NEUTRON/PLUGINS/ML2/ML2_CONF.INI[ML2]#启用flat, Vlan,gre and Vxlan network type drivers, GRE tenant networks, and OvS mechanism drivers:type_drivers= Flat,vlan,gre,vxlanTenant_network_types= GREmechanism_drivers= Openvswitch[ml2_type_gre]#配置隧道标识的id范围tunnel_id_ranges= 1:1000[ml2_type_flat]#配置external the network provided by flatFlat_networks= External[securitygroup]#启用security groups, enable Ipset, and configure OVS iptables firewall driverEnable_security_group= TrueEnable_ipset= TrueFirewall_driver= Neutron.agent.linux.iptables_firewall. Ovshybridiptablesfirewalldriver[ovs]#启用隧道, configure the local tunneling service, and map the external flat private network to the Br-ex external bridge#INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS是网络节点实例隧道网络接口的IP Mine is 10.0.1.21.local_ip= Instance_tunnels_interface_ip_address (10.0.1.21)bridge_mappings= External:br-ex[agent]#启用GRE隧道Tunnel_types= GRE
4. Configuring the Layer-3 (L3) agent
vim /etc/neutron/l3_agent.ini[DEFAULT]verbose = True#配置网卡驱动,外部网桥,和启用是删除路由命名空间失效,external_network_bridge 是没有值的interface_driver = neutron.agent.linux.interface.OVSInterfaceDriverexternal_network_bridge =router_delete_namespaces = True
5. Configure DHCP
vim /etc/neutron/dhcp_agent.ini [DEFAULT]verbose = True#配置接口和 dhcp 驱动,启用失效删除 DHCP 命令空间interface_driver = neutron.agent.linux.interface.OVSInterfaceDriverdhcp_driver = neutron.agent.linux.dhcp.Dnsmasqdhcp_delete_namespaces = True
6. Configure metadata
vim/etc/neutron/metadata_agent.ini[default]verbose = True #配置访问参数 auth_uri =/http/ Controller:5000auth_url = Http://controller:35357 Auth_region = Regiononeauth_plugin = password project_domain_id = Defaultuser_domain_id = Defaultproject_name = Serviceusername = Neutronpassword = Neutron_pass (my neutron) # Configure metadata host nova_metadata_ip = Controller# Configure the metadata shared proxy password (I set 123, consistent with the control node) metadata_proxy_shared_secret = Metadata_secret (123)
- Add the above password configuration to the control node
vim /etc/nova/nova.conf[neutron]service_metadata_proxyTruemetadata_proxy_shared_secret = METADATA_SECRET(123)退出后,重启nova-api服务service nova-api restart
7. Configure the Open VSwitch (OVS) service
ervice openvswitch-switch restart
- Add an external network bridge
ovs-vsctl add-br br-ex
- Add promiscuous mode NIC to Br-ex (Interface_name is the network card of its own Sisu network, my eth2)
ovs-vsctl add-port br-ex INTERFACE_NAME(eth2)
- Note that depending on the NIC driver, you may need to disable generic receive offload (GRO) and temporarily disable GRO on the external NIC
ethtool -K INTERFACE_NAME gro off
8. Restart the Network Service
service neutron-plugin-openvswitch-agent restartservice neutron-l3-agent restartservice neutron-dhcp-agent restartservice neutron-metadata-agent restart
9. Verification (Control node)
source admin-openrc.sh
- List neutron agents that were created successfully
Neutron agent-list+------------------------------------+------------------+--------+-----+-------------+--- ----------------------+|id |agent_type |host |alive|admin_state_up| binary |+----- --------------------------------+-----------------+--------+-----+-------------+-------------------------+|30275801-e17a-41e4-8f53-9db63544f689| Metadata Agent |network| :-) | True |neutron-metadata-agent | | 4bd8c50e-7bad-4f3b-955d-67658a491a15| Open VSwitch agent|network| :-) | True |neutron-openvswitch-agent| | 756e5bba-b70f-4715-b80e-e37f59803d20| L3 Agent |network| :-) | True |neutron-l3-agent ||9c45473c-6d6d-4f94-8df1-ebd0b6838d5f| DHCP Agent |network| :-) | True |neutron-dhcp-agent |+------------------------------------+------------------+-------+-----+---------- ----+-------------------------+
COMPUTE nodes
1. Configure certain Kernel network parameters
vim /etc/sysctl.conf net.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0net.bridge.bridge-nf-call-iptables=1net.bridge.bridge-nf-call-ip6tables=1
-p
2. Installing the Neutron component
apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent
3. Modify the Configuration
Vim/etc/neutron/neutron.conf[default]verbose= TrueRpc_backend= Rabbit#配置认证访问Auth_strategy= Keystone#启用 Modular Layer 2 (ML2) plug-in, routing service, and overlapping IP addresses:Core_plugin= ML2Service_plugins= Routerallow_overlapping_ips= True#在 the [database] module comment out connection because the network node does not need to connect to the database[Oslo_messaging_rabbit]#配置RabbitMQ Message Queuing serviceRabbit_host= ControllerRabbit_userid= OpenStackRabbit_password= Rabbit_pass (password for created message middleware password, mine for 123) [Keystone_authtoken]#配置认证访问Auth_uri= http://controller:5000Auth_url= http://controller:35357Auth_plugin= passwordproject_domain_id= Defaultuser_domain_id= DefaultProject_Name= Serviceusername= NeutronPassword= Neutron_pass (my password is NEUTRON)
4. Modify Modular Layer 2 (ML2) plug-in
VIM/ETC/NEUTRON/PLUGINS/ML2/ML2_CONF.INI[ML2]#启用flat, Vlan,gre and Vxlan network type drivers, GRE tenant networks, and OvS mechanism drivers:type_drivers= Flat,vlan,gre,vxlanTenant_network_types= GREmechanism_drivers= Openvswitch[ml2_type_gre]#配置隧道标识的id范围tunnel_id_ranges= 1:1000[securitygroup]#启用security groups, enable Ipset, and configure OVS iptables firewall driverEnable_security_group= TrueEnable_ipset= TrueFirewall_driver= Neutron.agent.linux.iptables_firewall. Ovshybridiptablesfirewalldriver[ovs]#启用隧道, configuring the local tunnel service#INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS是计算节点实例隧道网络接口的IP Mine is 10.0.1.31.local_ip= Instance_tunnels_interface_ip_address (10.0.1.31) [Agent]#启用GRE隧道Tunnel_types= GRE
5. Configure the Open VSwitch (OVS) service
service openvswitch-switch restart
- Configure compute node nova.conf (add the following)
Vim/etc/nova/nova. conf[DEFAULT]#配置Apis与驱动Network_api_class = Nova. Network. Neutronv2. API. APISecurity_group_api = Neutronlinuxnet_interface_driver = Nova. Network. Linux_net. LinuxovsinterfacedriverFirewall_driver = Nova. Virt. Firewall. Noopfirewalldriver[Neutron]#配置访问参数url = http://controller:9696Auth_strategy = Keystoneadmin_auth_url = Http://controller:35357/v2. 0Admin_tenant_name = Serviceadmin_username = Neutronadmin_password = Neutron_pass (my password is NEUTRON)
- Restart compute service and OVS Agent
service nova-compute restartservice neutron-plugin-openvswitch-agent restart
6. Control node Validation
source admin-openrc.sh
- List the created neutron agents
Neutron agent-list+------------------------------------+------------------+-------+-----+--------------+--- -----------------------+| id | agent_type | host |alive|admin_state_up| binary |+---- --------------------------------+------------------+-------+-----+--------------+--------------------------+|30275801-e17a-41e4-8f53-9db63544f689| Metadata Agent |network| :-) | True |neutron-metadata-agent | | 4bd8c50e-7bad-4f3b-955d-67658a491a15| Open VSwitch agent|network| :-) | True |neutron-openvswitch-agent | | 756e5bba-b70f-4715-b80e-e37f59803d20| L3 Agent |network| :-) | True |neutron-l3-agent | | 9c45473c-6d6d-4f94-8df1-ebd0b6838d5f| DHCP Agent |network| :-) | True |neutron-dhcp-agent ||a5a49051-05eb-4b4f-bfc7-d36235fe9131| Open VSwitch agent|compute| :-) | True |neutron-openvswitch-agent |+--------------------------------------+--------------------+----------+------- +----------------+---------------------------+
Ubuntu Build OpenStack Platform (Kilo) (five. Neutron (b) network nodes and compute nodes)