openstackneutron
Posted leaders543
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstackneutron相关的知识,希望对你有一定的参考价值。
控制节点
yum install -y openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables
/etc/neutron/neutron.conf
cat > /etc/neutron/neutron.conf << EOF [DEFAULT] auth_strategy = keystone transport_url = rabbit://openstack:openstack@192.168.3.220 core_plugin = ml2 service_plugins = notify_nova_on_port_status_changes = True notify_nova_on_port_data_changes = True [database] connection = mysql+pymysql://neutron:neutron@192.168.3.220/neutron [keystone_authtoken] auth_uri = http://192.168.3.220:5000 auth_url = http://192.168.3.220:35357 memcached_servers = 192.168.3.220:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = neutron [nova] auth_url = http://192.168.3.220:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = nova password = nova [oslo_concurrency] lock_path = /var/lib/neutron/tmp EOF
/etc/neutron/plugins/ml2/ml2_conf.ini
cat > /etc/neutron/plugins/ml2/ml2_conf.ini << EOF [ml2] type_drivers = flat,vlan,gre,vxlan,geneve tenant_network_types = flat,vlan,gre,vxlan,geneve mechanism_drivers = linuxbridge,openvswitch,l2population extension_drivers = port_security,qos [ml2_type_flat] flat_networks = provider [securitygroup] enable_ipset = True EOF
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
cat > /etc/neutron/plugins/ml2/linuxbridge_agent.ini << EOF [linux_bridge] physical_interface_mappings = provider:ens32 [vxlan] enable_vxlan = False [securitygroup] firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver enable_security_group = True EOF
/etc/neutron/dhcp_agent.ini
cat > /etc/neutron/dhcp_agent.ini << EOF [DEFAULT] nova_metadata_host = 192.168.3.220 metadata_proxy_shared_secret = le EOF
/etc/nova/nova.conf (增加)
[neutron] url = http://192.168.3.220:9696 auth_url = http://192.168.3.220:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = neutron service_metadata_proxy = True metadata_proxy_shared_secret = le
建立plugin.ini
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
初始化neutron数据库
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
查看表
mysql -uneutron -pneutron -e "use neutron;show tables;"
重启服务并设置开机启动
systemctl restart openstack-nova-api neutron-server neutron-linuxbridge-agent neutron-dhcp-agent neutron-metadata-agent
systemctl enable neutron-server neutron-linuxbridge-agent neutron-dhcp-agent neutron-metadata-agent 1>&2
创建服务/端点
openstack service create --name neutron --description "OpenStack Networking" network openstack endpoint create --region RegionOne network public http://192.168.3.220:9696 openstack endpoint create --region RegionOne network internal http://192.168.3.220:9696 openstack endpoint create --region RegionOne network admin http://192.168.3.220:9696
查看网络
openstack network agent list
========================================================
计算节点
yum install -y openstack-neutron openstack-neutron-linuxbridge ebtables
/etc/neutron/neutron.conf(删掉控制节数据库)
cat > /etc/neutron/neutron.conf << EOF [DEFAULT] auth_strategy = keystone transport_url = rabbit://openstack:openstack@192.168.3.220 [keystone_authtoken] auth_uri = http://192.168.3.220:5000 auth_url = http://192.168.3.220:35357 memcached_servers = 192.168.3.220:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = neutron [oslo_concurrency] lock_path = /var/lib/neutron/tmp EOF
/etc/neutron/plugins/ml2/linuxbridge_agent.ini(和控制节点一样)
cat > /etc/neutron/plugins/ml2/linuxbridge_agent.ini << EOF [linux_bridge] physical_interface_mappings = provider:ens32 [vxlan] enable_vxlan = False [securitygroup] firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver enable_security_group = True EOF
/etc/nova/nova.conf(添加neutron)
[neutron] url = http://192.168.3.220:9696 auth_url = http://192.168.3.220:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = neutron
配置开机启动并启动服务
systemctl restart neutron-linuxbridge-agent openstack-nova-compute
systemctl enable neutron-linuxbridge-agent 1>&2
========================================================
openstack network agent list
以上是关于openstackneutron的主要内容,如果未能解决你的问题,请参考以下文章
OpenStack Neutron 之 Load Balance
Openstack Neutron - VM 作为同一租户内两个网络之间的路由器