openstack-9:安装neutron网络服务

neutron网络服务

注册neutroon账号
openstack user create --domain default --password=neutron neutron
openstack role add --project service --user neutron admin
注册服务
openstack service create --name neutron \
--description "OpenStack Networking" network

openstack endpoint create --region RegionOne \
network public http://192.168.56.11:9696

openstack endpoint create --region RegionOne \
network internal http://192.168.56.11:9696

openstack endpoint create --region RegionOne \
network admin http://192.168.56.11:9696

安装
yum install openstack-neutron openstack-neutron-ml2 \
openstack-neutron-linuxbridge ebtables
修改配置文件
vi /etc/neutron/neutron.conf
[default]
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
transport_url = rabbit://openstack:openstack@192.168.56.11
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
auth_strategy = keystone

[nova]
auth_url = http://192.168.56.11: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

[database]
connection = mysql+pymysql://neutron:neutron@192.168.56.11/neutron

[keystone_authtoken]
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron

vim /etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security

[ml2_type_flat]
flat_networks = provider

[ml2_type_vxlan]
vni_ranges = 1:1000

[securitygroup]
enable_ipset = True

vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[linux_bridge]
physical_interface_mappings = provider:eth0

[vxlan]
enable_vxlan = True
local_ip = 192.168.56.11
l2_population = True

[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

vi /etc/neutron/l3_agent.ini
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver

配置dhcp
vi /etc/neutron/dhcp_agent.ini
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True

vi /etc/neutron/metadata_agent.ini
[DEFAULT]
nova_metadata_ip = 192.168.56.11
metadata_proxy_shared_secret = neutron

vi /etc/nova/nova.conf
[neutron]

url = http://192.168.56.11:9696
auth_url = http://192.168.56.11: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 = neutron

创建软链接
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
同步数据库
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

重启nova api
systemctl restart openstack-nova-api.service
开机启动
systemctl enable neutron-server.service \
neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service
启动服务
systemctl start neutron-server.service \
neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service

第三层服务

systemctl enable neutron-l3-agent.service
systemctl start neutron-l3-agent.service

查看状态
neutron ext-list
openstack network agent list

=====================================================
在计算节点192.168.56.12安装neutron
yum install openstack-neutron-linuxbridge ebtables ipset
在192.168.56.11同步
scp /etc/neutron/neutron.conf 192.168.56.12:/etc/neutron/
在192.168.56.12
vi etc/neutron/neutron.conf
local_ip = 192.168.56.11

vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:eth0

[vxlan]
enable_vxlan = True
local_ip = 192.168.56.12
l2_population = True

[securitygroup]
...
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

vim /etc/neutron/metadata_agent.ini
[DEFAULT]
nova_metadata_ip = 192.168.56.11
metadata_proxy_shared_secret = neutron

在192.168.56.12
vi /etc/nova/nova.conf
url = http://192.168.56.11:9696
auth_url = http://192.168.56.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron

ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

重启nova
systemctl restart openstack-nova-compute.service

启动
systemctl enable neutron-linuxbridge-agent.service
systemctl start neutron-linuxbridge-agent.service

验证
openstack network agent list

转载于:https://blog.51cto.com/13491150/2056605

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值