在本章介绍的体系结构中,Neutron API 服务在控制器节点上运行。
/etc/neutron/neutron.conf
[DEFAULT] host=$CONTROLLER_ADMIN_NODE [keystone_authtoken] auth_uri = http://$CONTROLLER_ADMIN_NODE:5000/v2.0 identity_uri = http://$CONTROLLER_ADMIN_NODE:35357 admin_user = neutron admin_password = service-password admin_tenant_name = service [database] connection = mysql://neutron:service-password@$CONTROLLER_ADMIN_NODE/neutron [oslo_messaging_rabbit] rabbit_host=$CONTROLLER_ADMIN_NODE
/etc/neutron/plugins/evs/evs_plugin.ini
[EVS] evs_controller = ssh://evsuser@$CONTROLLER_ADMIN_NODE
/etc/neutron/dhcp_agent.ini
[DEFAULT] evs_controller = ssh://evsuser@$CONTROLLER_ADMIN_NODE
/etc/neutron/l3_agent.ini
evs_controller = ssh://evsuser@$CONTROLLER_ADMIN_NODE
allow_forwarding_between_networks = true
controller# su - evsuser -c "ssh-keygen -N '' \ -f /var/user/evsuser/.ssh/id_rsa -t rsa" controller# su - neutron -c "ssh-keygen -N '' -f /var/lib/neutron/.ssh/id_rsa -t rsa" controller# ssh-keygen -N '' -f /root/.ssh/id_rsa -t rsa
controller# cat /var/user/evsuser/.ssh/id_rsa.pub \ /var/lib/neutron/.ssh/id_rsa.pub /root/.ssh/id_rsa.pub >> \ /var/user/evsuser/.ssh/authorized_keys
在配置的每个提示符处指定 Yes。
controller# su - evsuser -c "ssh evsuser@$CONTROLLER_ADMIN_NODE true" controller# su - neutron -c "ssh evsuser@$CONTROLLER_ADMIN_NODE true" controller# ssh evsuser@$CONTROLLER_ADMIN_NODE true
要配置基于 VXLAN 的网络,请转至 Operating Systems Documentation(操作系统文档)中您 Oracle Solaris 版本相应库中的《在 Oracle Solaris 中管理网络虚拟化和网络资源》。在该书中,请特别参阅“用例:为租户配置弹性虚拟交换机”。
有关如何配置平面网络的示例,请参见 https://blogs.oracle.com/openstack/entry/configuring_the_neutron_l3_agent。
controller# evsadm set-prop -p controller=ssh://evsuser@$CONTROLLER_ADMIN_NODE
controller# evsadm set-controlprop -p property=value
如图 1 中所示,通常有多个网络接口来服务不同的子网。在设置 uplink-port 属性时,您可以将 VLAN 拆分到为子网提供服务的多个网络端口中。
以下示例说明如何设置 EVS 属性,包括拆分 VLAN。(可选)使用最后的命令显示所有 EVS 属性。
controller# evsadm set-controlprop -p l2-type=vlan controller# evsadm set-controlprop -p vlan-range=1,200-300 controller# evsadm set-controlprop -p uplink-port=net0,vlan-range=1 controller# evsadm set-controlprop -p uplink-port=net1,vlan-range=200-250 controller# evsadm set-controlprop -p uplink-port=net2,vlan-range=251-300 controller# evsadm show-controlprop -o all
controller# ipadm set-prop -p forwarding=on ipv4 controller# ipadm set-prop -p forwarding=on ipv6
controller# svcadm enable -rs ipfilter
controller# svcadm enable -rs neutron-server neutron-dhcp-agent