; mitaka版本openstack网络之open vSwitch | Linux运维部落

mitaka版本openstack网络之open vSwitch

作者:【吴业亮】

博客:http://blog.csdn.net/wylfengyujiancheng

一、硬件配置及服务拓扑
1. controller节点:一块网卡
2. 网络节点:四块网卡。
3. 计算节点:三块网卡
这里写图片描述
这里写图片描述

controller节点
1. 运行 neutron数据库
2. 运行消息队列服务
3. 运行认证。
4. 运行OpenStack计算nova相关网络,需配置nova.conf文件。
5. 运行插件ML2 。
网络节点
1. Neutron认证相关信息需配置neutron.conf文件。
2. Open vSwitch服务,Open vSwitch代理,L3代理,DHCP代理,元数据代理,一些依赖项。
计算节点
1. 运行OpenStack身份与合适的配置服务 需配置neutron.conf文件。
2. 运行OpenStack计算nova相关网络,需配置nova.conf文件。
3. Open vSwitch服务,Open vSwitch代理,一些依赖项。
二、各个节点服务关系及说明
这里写图片描述
网络节点网络包含以下组件:
1. open vswitch-agent
2. l3-agent
3. dhcp-aent
4. Metadata-agent
这里写图片描述
这里写图片描述
计算节点网络包含以下组件:
1. Open vSwitch-agent。
2. 网桥。
这里写图片描述
这里写图片描述
三、场景举例
Note请注意
南北网络:虚拟机内部数据到外部网络
东西网络:虚拟机之间通信
案例1:南北网络、实例对应一个固定的IP地址
这里写图片描述
案例2:南北网络,实例对应一个浮动IP地址
这里写图片描述
案例3:东西网络,实例在不同的网络上
这里写图片描述
案例4:东西网络、实例在同一网络
这里写图片描述
四、安装配置
(一)controller节点
1、安装组件


1
<span class="hljs-preprocessor"># yum install openstack-neutron openstack-neutron-ml2 python-neutronclient which </span>

2、配置服务器组件
编辑 /etc/neutron/neutron.conf文件,并完成以下动作:
在[数据库]节中,配置数据库访问:


1
2
<span class="hljs-title">[database]</span>
<span class="hljs-setting">connection = <span class="hljs-value">mysql+pymysql://neutron:NEUTRON_DBPASS@controller/neutron</span></span>

替换 NEUTRON_DBPASS为你的密码
在[默认的]部分


1
2
3
4
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">core_plugin = <span class="hljs-value">ml2</span></span>
<span class="hljs-setting">service_plugins = <span class="hljs-value">router</span></span>
<span class="hljs-setting">allow_overlapping_ips = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>

在[默认的]和[oslo_messaging_rabbit]部分,配置RabbitMQ消息队列访问:


1
2
3
4
5
6
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">rpc_backend = <span class="hljs-value">rabbit</span></span>
<span class="hljs-title">[oslo_messaging_rabbit]</span>
<span class="hljs-setting">rabbit_host = <span class="hljs-value">controller</span></span>
<span class="hljs-setting">rabbit_userid = <span class="hljs-value">openstack</span></span>
<span class="hljs-setting">rabbit_password = <span class="hljs-value">RABBIT_PASS</span></span>

替换 RABBIT_PASS为你的密码
在[默认的]和[keystone_authtoken]部分,配置身份服务访问:


1
2
3
4
5
6
7
8
9
10
11
12
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">auth_strategy = <span class="hljs-value">keystone</span></span>
<span class="hljs-title">[keystone_authtoken]</span>
<span class="hljs-setting">auth_uri = <span class="hljs-value">http://controller:<span class="hljs-number">5000</span></span></span>
<span class="hljs-setting">auth_url = <span class="hljs-value">http://controller:<span class="hljs-number">35357</span></span></span>
<span class="hljs-setting">memcached_servers = <span class="hljs-value">controller:<span class="hljs-number">11211</span></span></span>
<span class="hljs-setting">auth_type = <span class="hljs-value">password</span></span>
<span class="hljs-setting">project_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">user_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">project_name = <span class="hljs-value">service</span></span>
<span class="hljs-setting">username = <span class="hljs-value">neutron</span></span>
<span class="hljs-setting">password = <span class="hljs-value">NEUTRON_PASS</span></span>

替换NEUTRON_PASS为你的密码
Note请注意
注释掉或删除任何其他选项 [keystone_authtoken]部分。
在[默认的]和[nova]部分,配置网络通知计算网络拓扑变化:


1
2
3
4
5
6
7
8
9
10
11
12
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">notify_nova_on_port_status_changes = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>
<span class="hljs-setting">notify_nova_on_port_data_changes = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>
<span class="hljs-title">[nova]</span>
<span class="hljs-setting">auth_url = <span class="hljs-value">http://controller:<span class="hljs-number">35357</span></span></span>
<span class="hljs-setting">auth_type = <span class="hljs-value">password</span></span>
<span class="hljs-setting">project_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">user_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">region_name = <span class="hljs-value">RegionOne</span></span>
<span class="hljs-setting">project_name = <span class="hljs-value">service</span></span>
<span class="hljs-setting">username = <span class="hljs-value">nova</span></span>
<span class="hljs-setting">password = <span class="hljs-value">NOVA_PASS</span></span>

替换 NOVA_PASS 为你的密码
在[oslo_concurrency]节中,配置锁路径:


1
2
[oslo_concurrency]
lock_path = <span class="hljs-regexp">/var/lib</span><span class="hljs-regexp">/neutron/tmp</span>

3、编辑/etc/neutron/plugins/ml2/ml2_conf.ini文件
在[ml2]部分,使平、VLAN和VXLAN网络:


1
2
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">type_drivers = <span class="hljs-value">flat,vlan,vxlan</span></span>

在[ml2]部分,使VXLAN自助服务网络:


1
2
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">tenant_network_types = <span class="hljs-value">vxlan</span></span>

在[ml2]部分


1
2
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">mechanism_drivers = <span class="hljs-value">openvswitch,l2population</span></span>

在[ml2]部分,启用端口安全


1
2
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">extension_drivers = <span class="hljs-value">port_security</span></span>

在[ml2_type_flat]部分,虚拟网络配置提供者平面网络:


1
2
<span class="hljs-title">[ml2_type_flat]</span>
<span class="hljs-setting">flat_networks = <span class="hljs-value">provider</span></span>

在[ml2_type_vxlan]部分,配置VXLAN网络标识符范围自助服务网络:


1
2
<span class="hljs-title">[ml2_type_vxlan]</span>
<span class="hljs-setting">vni_ranges = <span class="hljs-value"><span class="hljs-number">1</span>:<span class="hljs-number">1000</span></span></span>

在[securitygroup]部分,使ipset提高效率的安全组规则:


1
2
<span class="hljs-title">[securitygroup]</span>
<span class="hljs-setting">enable_ipset = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>

编辑/etc/nova/nova.conf文件和执行以下操作:
在[nova]节中,配置访问参数,使元数据代理


1
2
3
4
5
6
7
8
9
10
11
<span class="hljs-title">[neutron]</span>
<span class="hljs-setting">url = <span class="hljs-value">http://controller:<span class="hljs-number">9696</span></span></span>
<span class="hljs-setting">auth_url = <span class="hljs-value">http://controller:<span class="hljs-number">35357</span></span></span>
<span class="hljs-setting">auth_type = <span class="hljs-value">password</span></span>
<span class="hljs-setting">project_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">user_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">region_name = <span class="hljs-value">RegionOne</span></span>
<span class="hljs-setting">project_name = <span class="hljs-value">service</span></span>
<span class="hljs-setting">username = <span class="hljs-value">neutron</span></span>
<span class="hljs-setting">password = <span class="hljs-value">NEUTRON_PASS</span></span>
<span class="hljs-setting">service_metadata_proxy = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>

4、创建链接


1
ln -s /etc/neutron/plugins/ml2/ml2_conf<span class="hljs-preprocessor">.ini</span> /etc/neutron/plugin<span class="hljs-preprocessor">.ini</span>

5、同步数据库


1
su <span class="hljs-attribute">-s</span> /bin/sh <span class="hljs-attribute">-c</span> <span class="hljs-string">"neutron-db-manage --config-file /etc/neutron/neutron.conf   --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head"</span> neutron

6、重启nova服务


1
systemctl restart openstack<span class="hljs-attribute">-nova</span><span class="hljs-attribute">-api</span><span class="hljs-built_in">.</span>service

7、启动neutron服务


1
2
<span class="hljs-preprocessor"># systemctl enable neutron-server.service</span>
<span class="hljs-preprocessor"># systemctl start neutron-server.service</span>

(二)网络节点
1. 编辑 /etc/sysctl.conf


1
2
net<span class="hljs-preprocessor">.ipv</span>4<span class="hljs-preprocessor">.conf</span><span class="hljs-preprocessor">.all</span><span class="hljs-preprocessor">.rp</span>_filter=<span class="hljs-number">0</span>
net<span class="hljs-preprocessor">.ipv</span>4<span class="hljs-preprocessor">.conf</span><span class="hljs-preprocessor">.default</span><span class="hljs-preprocessor">.rp</span>_filter=<span class="hljs-number">0</span>

2.执行下列命令,立即生效


1
<span class="hljs-preprocessor"># sysctl -p</span>

3.安装软件包


1
<span class="hljs-preprocessor"># yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch</span>

4.配置组件
编辑/etc/neutron/neutron.conf文件,并完成以下动作:
在[数据库]节中,删除配置数据库访问:
在[默认的]部分,使模块化层2)中打开(名为ML2插件,路由器的服务,和重叠的IP地址:


1
2
3
4
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">core_plugin = <span class="hljs-value">ml2</span></span>
<span class="hljs-setting">service_plugins = <span class="hljs-value">router</span></span>
<span class="hljs-setting">allow_overlapping_ips = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>

在[默认的]和[oslo_messaging_rabbit]部分,配置RabbitMQ消息队列访问:


1
2
3
4
5
6
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">rpc_backend = <span class="hljs-value">rabbit</span></span>
<span class="hljs-title">[oslo_messaging_rabbit]</span>
<span class="hljs-setting">rabbit_host = <span class="hljs-value">controller</span></span>
<span class="hljs-setting">rabbit_userid = <span class="hljs-value">openstack</span></span>
<span class="hljs-setting">rabbit_password = <span class="hljs-value">RABBIT_PASS</span></span>

替换 RABBIT_PASS 为你的密码
在[默认的]和[keystone_authtoken]部分,配置身份服务访问:


1
2
3
4
5
6
7
8
9
10
11
12
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">auth_strategy = <span class="hljs-value">keystone</span></span>
<span class="hljs-title">[keystone_authtoken]</span>
<span class="hljs-setting">auth_uri = <span class="hljs-value">http://controller:<span class="hljs-number">5000</span></span></span>
<span class="hljs-setting">auth_url = <span class="hljs-value">http://controller:<span class="hljs-number">35357</span></span></span>
<span class="hljs-setting">memcached_servers = <span class="hljs-value">controller:<span class="hljs-number">11211</span></span></span>
<span class="hljs-setting">auth_type = <span class="hljs-value">password</span></span>
<span class="hljs-setting">project_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">user_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">project_name = <span class="hljs-value">service</span></span>
<span class="hljs-setting">username = <span class="hljs-value">neutron</span></span>
<span class="hljs-setting">password = <span class="hljs-value">NEUTRON_PASS</span></span>

替换 NEUTRON_PASS为你的密码
Note请注意
注释掉或删除任何其他选项 [keystone_authtoken]部分。
在[oslo_concurrency]节中,配置锁路径:


1
2
[oslo_concurrency]
lock_path = <span class="hljs-regexp">/var/lib</span><span class="hljs-regexp">/neutron/tmp</span>

5、编辑/etc/neutron/plugins/ml2/ml2_conf.ini文件
在[ml2]部分,使平、VLAN和VXLAN网络:


1
2
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">type_drivers = <span class="hljs-value">flat,vlan,vxlan</span></span>

在[ml2]部分,使VXLAN自助服务网络:


1
2
3
4
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">tenant_network_types = <span class="hljs-value">vxlan</span></span>
<span class="hljs-setting">mechanism_drivers = <span class="hljs-value">openvswitch,l2population</span></span>
<span class="hljs-setting">extension_drivers = <span class="hljs-value">port_security</span></span>

在[ml2_type_flat]部分,虚拟网络配置提供者平面网络:


1
2
<span class="hljs-title">[ml2_type_flat]</span>
<span class="hljs-setting">flat_networks = <span class="hljs-value">provider</span></span>

在[ml2_type_vxlan]部分,配置VXLAN网络标识符范围自助服务网络:


1
2
<span class="hljs-title">[ml2_type_vxlan]</span>
<span class="hljs-setting">vni_ranges = <span class="hljs-value"><span class="hljs-number">1</span>:<span class="hljs-number">1000</span></span></span>

在[securitygroup]部分,使ipset提高效率的安全组规则:


1
2
<span class="hljs-title">[securitygroup]</span>
<span class="hljs-setting">enable_ipset = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>

6、编辑 /etc/neutron/plugins/ml2/openvswitch_agent.ini文件:


1
2
3
4
5
6
7
8
9
10
<span class="hljs-title">[ovs]</span>
<span class="hljs-setting">local_ip=<span class="hljs-value">TUNNEL_INTERFACE_IP_ADDRESS</span></span>
<span class="hljs-setting">bridge_mappings=<span class="hljs-value">vlan:br-vlan,external:br-ex</span></span>
<span class="hljs-title">[agent]</span>
<span class="hljs-setting">tunnel_types=<span class="hljs-value">gre,vxlan</span></span>
<span class="hljs-setting">l2_population=<span class="hljs-value"><span class="hljs-keyword">True</span></span></span>
<span class="hljs-setting">prevent_arp_spoofing=<span class="hljs-value"><span class="hljs-keyword">True</span></span></span>
<span class="hljs-title">[securitygroup]</span>
<span class="hljs-setting">firewall_driver=<span class="hljs-value">neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver</span></span>
<span class="hljs-setting">enable_security_group=<span class="hljs-value"><span class="hljs-keyword">True</span></span></span>

取代 TUNNEL_INTERFACE_IP_ADDRESS与接口的IP地址处理GRE / VXLAN项目网络。
1. 配置L3代理。编辑 /etc/neutron/l3_agent.ini文件:


1
2
3
[DEFAULT]
interface_driver=neutron<span class="hljs-preprocessor">.agent</span><span class="hljs-preprocessor">.linux</span><span class="hljs-preprocessor">.interface</span><span class="hljs-preprocessor">.OVSInterfaceDriver</span>
external_network_bridge=

Note请注意
的 external_network_bridge选择故意不包含值。
2. 配置DHCP代理。编辑 /etc/neutron/dhcp_agent.ini文件:


1
2
3
4
[DEFAULT]
interface_driver=neutron<span class="hljs-preprocessor">.agent</span><span class="hljs-preprocessor">.linux</span><span class="hljs-preprocessor">.interface</span><span class="hljs-preprocessor">.OVSInterfaceDriver</span>
dhcp_driver=neutron<span class="hljs-preprocessor">.agent</span><span class="hljs-preprocessor">.linux</span><span class="hljs-preprocessor">.dhcp</span><span class="hljs-preprocessor">.Dnsmasq</span>
enable_isolated_metadata=True
  1. 配置元数据代理。编辑 /etc/neutron/metadata_agent.ini文件:

1
2
3
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">nova_metadata_ip=<span class="hljs-value">controller</span></span>
<span class="hljs-setting">metadata_proxy_shared_secret=<span class="hljs-value">METADATA_SECRET</span></span>

6、创建链接


1
<span class="hljs-preprocessor"># ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini</span>

7、启动服务
创建网桥


1
<span class="hljs-preprocessor"># ovs-vsctl add-br br-ex</span>

将网卡加入到网桥中


1
<span class="hljs-preprocessor"># ovs-vsctl add-port br-ex INTERFACE_NAME</span>

1
2
3
4
5
<span class="hljs-preprocessor"># systemctl restart openstack-nova-api.service</span>
<span class="hljs-preprocessor"># systemctl start neutron-openvswitch-agent.service neutron-l3-agent.</span>
service neutron-dhcp-agent<span class="hljs-preprocessor">.service</span> neutron-metadata-agent<span class="hljs-preprocessor">.service</span>
<span class="hljs-preprocessor"># systemctl enable neutron-openvswitch-agent.service neutron-l3-agent.</span>
service neutron-dhcp-agent<span class="hljs-preprocessor">.service</span> neutron-metadata-agent<span class="hljs-preprocessor">.service</span>

(三)计算节点
1. 编辑 /etc/sysctl.conf


1
2
3
4
net<span class="hljs-preprocessor">.ipv</span>4<span class="hljs-preprocessor">.conf</span><span class="hljs-preprocessor">.all</span><span class="hljs-preprocessor">.rp</span>_filter=<span class="hljs-number">0</span>
net<span class="hljs-preprocessor">.ipv</span>4<span class="hljs-preprocessor">.conf</span><span class="hljs-preprocessor">.default</span><span class="hljs-preprocessor">.rp</span>_filter=<span class="hljs-number">0</span>
net<span class="hljs-preprocessor">.bridge</span><span class="hljs-preprocessor">.bridge</span>-nf-<span class="hljs-keyword">call</span>-iptables=<span class="hljs-number">1</span>
net<span class="hljs-preprocessor">.bridge</span><span class="hljs-preprocessor">.bridge</span>-nf-<span class="hljs-keyword">call</span>-ip6tables=<span class="hljs-number">1</span>

2.执行下列命令,立即生效


1
<span class="hljs-preprocessor"># sysctl -p</span>

3.安装软件包


1
<span class="hljs-preprocessor"># yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch</span>

4.编辑 /etc/neutron/neutron.conf文件,并完成以下动作:
• 在 [数据库]节中,注释掉 连接选项,因为计算节点不直接访问数据库。
• 在 [默认的]和 [oslo_messaging_rabbit]部分,配置RabbitMQ消息队列访问:


1
2
3
4
5
6
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">rpc_backend = <span class="hljs-value">rabbit</span></span>
<span class="hljs-title">[oslo_messaging_rabbit]</span>
<span class="hljs-setting">rabbit_host = <span class="hljs-value">controller</span></span>
<span class="hljs-setting">rabbit_userid = <span class="hljs-value">openstack</span></span>
<span class="hljs-setting">rabbit_password = <span class="hljs-value">RABBIT_PASS</span></span>

1

替换 RABBIT_PASS为你的密码
• 在 [默认的]和 [keystone_authtoken]部分,配置身份服务访问:


1
2
3
4
5
6
7
8
9
10
11
12
<span class="hljs-title">[DEFAULT]</span>
<span class="hljs-setting">auth_strategy = <span class="hljs-value">keystone</span></span>
<span class="hljs-title">[keystone_authtoken]</span>
<span class="hljs-setting">auth_uri = <span class="hljs-value">http://controller:<span class="hljs-number">5000</span></span></span>
<span class="hljs-setting">auth_url = <span class="hljs-value">http://controller:<span class="hljs-number">35357</span></span></span>
<span class="hljs-setting">memcached_servers = <span class="hljs-value">controller:<span class="hljs-number">11211</span></span></span>
<span class="hljs-setting">auth_type = <span class="hljs-value">password</span></span>
<span class="hljs-setting">project_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">user_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">project_name = <span class="hljs-value">service</span></span>
<span class="hljs-setting">username = <span class="hljs-value">neutron</span></span>
<span class="hljs-setting">password = <span class="hljs-value">NEUTRON_PASS</span></span>

替换 NEUTRON_PASS为你的密码
Note请注意
注释掉或删除任何其他选项 [keystone_authtoken]部分。
• 在 [oslo_concurrency]节中,配置锁路径:


1
2
[oslo_concurrency]
lock_path = <span class="hljs-regexp">/var/lib</span><span class="hljs-regexp">/neutron/tmp</span>

5.编辑 /etc/neutron/plugins/ml2/openvswitch_agent.ini


1
2
3
4
5
6
7
<span class="hljs-title">[ovs]</span>
<span class="hljs-setting">local_ip = <span class="hljs-value">TUNNEL_INTERFACE_IP_ADDRESS</span></span>
<span class="hljs-setting">bridge_mappings = <span class="hljs-value">vlan:br-vlan</span></span>
<span class="hljs-title">[agent]</span>
<span class="hljs-setting">tunnel_types = <span class="hljs-value">gre,vxlan</span></span>
<span class="hljs-setting">l2_population = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>
<span class="hljs-setting">prevent_arp_spoofing = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>

1
2
3
<span class="hljs-title">[securitygroup]</span>
<span class="hljs-setting">firewall_driver = <span class="hljs-value">neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver</span></span>
<span class="hljs-setting">enable_security_group = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>

6.编辑/etc/neutron/plugins/ml2/ml2_conf.ini文件
在[ml2]部分,使平、VLAN和VXLAN网络:


1
2
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">type_drivers = <span class="hljs-value">flat,vlan,vxlan</span></span>

在[ml2]部分,使VXLAN自助服务网络:


1
2
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">tenant_network_types = <span class="hljs-value">vxlan</span></span>

在[ml2]部分,使Linux桥和2层人口机制:


1
2
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">mechanism_drivers = <span class="hljs-value">openvswitch,l2population</span></span>

在[ml2]部分,启用端口安全扩展司机:


1
2
<span class="hljs-title">[ml2]</span>
<span class="hljs-setting">extension_drivers = <span class="hljs-value">port_security</span></span>

在[ml2_type_flat]部分,虚拟网络配置提供者平面网络:


1
2
<span class="hljs-title">[ml2_type_flat]</span>
<span class="hljs-setting">flat_networks = <span class="hljs-value">provider</span></span>

在[ml2_type_vxlan]部分,配置VXLAN网络标识符范围自助服务网络:


1
2
<span class="hljs-title">[ml2_type_vxlan]</span>
<span class="hljs-setting">vni_ranges = <span class="hljs-value"><span class="hljs-number">1</span>:<span class="hljs-number">1000</span></span></span>

在[securitygroup]部分,使ipset提高效率的安全组规则:


1
2
<span class="hljs-title">[securitygroup]</span>
<span class="hljs-setting">enable_ipset = <span class="hljs-value"><span class="hljs-keyword">True</span></span></span>

配置nova配置文件
•7编辑 /etc/nova/nova.conf文件,并完成以下动作:
o 在 [neutron]节中,配置访问参数:


1
2
3
4
5
6
7
8
9
10
<span class="hljs-title">[neutron]</span>
<span class="hljs-setting">url = <span class="hljs-value">http://controller:<span class="hljs-number">9696</span></span></span>
<span class="hljs-setting">auth_url = <span class="hljs-value">http://controller:<span class="hljs-number">35357</span></span></span>
<span class="hljs-setting">auth_type = <span class="hljs-value">password</span></span>
<span class="hljs-setting">project_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">user_domain_name = <span class="hljs-value">default</span></span>
<span class="hljs-setting">region_name = <span class="hljs-value">RegionOne</span></span>
<span class="hljs-setting">project_name = <span class="hljs-value">service</span></span>
<span class="hljs-setting">username = <span class="hljs-value">neutron</span></span>
<span class="hljs-setting">password = <span class="hljs-value">NEUTRON_PASS</span></span>

替换 NEUTRON_PASS为你的密码
8.启动服务


1
2
3
<span class="hljs-preprocessor"># systemctl enable neutron-openvswitch-agent.service</span>
<span class="hljs-preprocessor"># systemctl start neutron-openvswitch-agent.service</span>
<span class="hljs-preprocessor"># systemctl restart openstack-nova-compute.service</span>

本文来自投稿,不代表Linux运维部落立场,如若转载,请注明出处:http://www.178linux.com/91212

发表评论

电子邮件地址不会被公开。 必填项已用*标注

联系我们

400-080-6560

在线咨询:点击这里给我发消息

邮件:1660809109@qq.com

工作时间:周一至周五,9:30-18:30,节假日同时也值班