[keystone_authtoken]
auth_protocol=http
auth_url=http://controller:5000
auth_host=controller
auth_port=35357
auth_user=neutron
admin_tenant_name=service
admin_password=neutron
# QPID
# rpc_backend=neutron.openstack.common.rpc.impl_qpid
rpc_backend=neutron.openstack.common.rpc.impl_qpid
# Qpid broker hostname
# qpid_hostname = localhost
qpid_hostname = controller
# notify_nova_on_port_status_changes = False
notify_nova_on_port_status_changes = True
# Send notifications to nova when port data (fixed_ips/floatingips) change
# so nova can update it's cache.
# notify_nova_on_port_data_changes = False
notify_nova_on_port_data_changes = True
nova_url = http://192.168.10.1:8774/v2
# Name of nova region to use. Useful if keystone manages more than one region
# nova_region_name =
# Username for connection to nova in admin context
# nova_admin_username =
nova_admin_username = neutron
# The uuid of the admin nova tenant
# nova_admin_tenant_id =
nova_admin_tenant_id = c536e6faa30b4b3f998e14af70f4f7c2 #service tenant id
# Password for connection to nova in admin context.
# nova_admin_password =
nova_admin_password = neutron
# Authorization URL for connection to nova in admin context.
# nova_admin_auth_url =
nova_admin_auth_url =
# core_plugin =
core_plugin = ml2
# Example: core_plugin = ml2
# service_plugins =
service_plugins = router 配置plugins/ml2/ml2_conf.ini:
[root@Node1 neutron]# cd plugins/
[root@Node1 plugins]# ls
ml2
[root@Node1 plugins]# cd ml2/
[root@Node1 ml2]# ls
ml2_conf_arista.ini ml2_conf.ini ml2_conf_odl.ini
ml2_conf_brocade.ini ml2_conf_mlnx.ini ml2_conf_ofa.ini
ml2_conf_cisco.ini ml2_conf_ncs.ini restproxy.ini
[root@Node1 ml2]# vi ml2_conf.ini
[root@Node1 ml2]# grep -v '^$\|^#' ml2_conf.ini
[ml2]
type_drivers = gre
tenant_network_types = gre
mechanism_drivers = openvswitch
[ml2_type_flat]
[ml2_type_vlan]
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver 配置/etc/nova/nova.conf:
[root@Node1 ml2]# vi /etc/nova/nova.conf
#network_api_class=nova.network.api.API
network_api_class=nova.network.neutronv2.api.API
#neutron_url=http://127.0.0.1:9696
neutron_url=
#neutron_auth_strategy=keystone
neutron_auth_strategy=keystone
#neutron_admin_username=<None>
neutron_admin_username=neutron
# Password for connecting to neutron in admin context (string
# value)
#neutron_admin_password=<None>
neutron_admin_password=neutron
# Tenant id for connecting to neutron in admin context (string
# value)
#neutron_admin_tenant_id=<None>
# Tenant name for connecting to neutron in admin context. This
# option is mutually exclusive with neutron_admin_tenant_id.
# Note that with Keystone V3 tenant names are only unique
# within a domain. (string value)
#neutron_admin_tenant_name=<None>
neutron_admin_tenant_name=service
# Region name for connecting to neutron in admin context
# (string value)
#neutron_region_name=<None>
# Authorization URL for connecting to neutron in admin context
# (string value)
#neutron_admin_auth_url=http://localhost:5000/v2.0
neutron_admin_auth_url=
#linuxnet_interface_driver=nova.network.linux_net.LinuxBridgeInterfaceDriver
linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver
#firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
firewall_driver=nova.virt.firewall.NoopFirewallDriver
#security_group_api=nova
security_group_api=neutron 创建链接:
[root@Node1 neutron]# ln -sv plugins/ml2/ml2_conf.ini /etc/neutron/plugins.ini
`/etc/neutron/plugins.ini' -> `plugins/ml2/ml2_conf.ini'
[root@Node1 neutron]# ls
dhcp_agent.ini lbaas_agent.ini neutron.conf.bak policy.json
fwaas_driver.ini metadata_agent.ini plugins release
l3_agent.ini neutron.conf plugins.ini rootwrap.conf 启动neutron服务: