OpenStack Juno系列之网络节点搭建

OpenStack Juno系列之网络节点搭建

neutron节点搭建

------------------

添加转发

vi  /etc/sysctl.conf

net.ipv4.ip_forward=1

net.ipv4.conf.all.rp_filter=0

net.ipv4.conf.default.rp_filter=0

刷新下

sysctl -p

安装neutron各模块服务

apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent \

  neutron-l3-agent neutron-dhcp-agent

编辑配置文件

vi  /etc/neutron/neutron.conf

[DEFAULT]

verbose = True

rpc_backend = rabbit

rabbit_host = controller

rabbit_password = RABBIT_PASS

 

core_plugin = ml2

service_plugins = router

allow_overlapping_ips = True

 

auth_strategy = keystone

 

[keystone_authtoken]

 

auth_uri = http://controller:5000/v2.0

identity_uri = http://controller:35357

admin_tenant_name = service

admin_user = neutron

admin_password = NEUTRON_PASS

 

编辑ml2配置文件

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

[ml2]

type_drivers = flat,gre

tenant_network_types = gre

mechanism_drivers = openvswitch

 

[ml2_type_flat]

flat_networks = external

 

[ml2_type_gre]

tunnel_id_ranges = 1:1000

 

[securitygroup]

enable_security_group = True

enable_ipset = True

firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver

 

[ovs]

local_ip = INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS

tunnel_type = gre

enable_tunneling = True

bridge_mappings = external:br-ex

 

To configure the Layer-3 (L3) agent:

 vi /etc/neutron/l3_agent.ini

[DEFAULT]

verbose = True

interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver

use_namespaces = True

external_network_bridge = br-ex

 

To configure the DHCP agent:

vi  /etc/neutron/dhcp_agent.ini

[DEFAULT]

verbose = True

interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver

dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq

use_namespaces = True

dnsmasq_config_file = /etc/neutron/dnsmasq-neutron.conf

 

vi /etc/neutron/dnsmasq-neutron.conf

dhcp-option-force=26,1454

# pkill dnsmasq

 

To configure the metadata agent:

vi /etc/neutron/metadata_agent.ini

[DEFAULT]

verbose = True

nova_metadata_ip = controller

 

auth_url = http://controller:5000/v2.0

auth_region = regionOne

admin_tenant_name = service

admin_user = neutron

admin_password = NEUTRON_PASS

 

metadata_proxy_shared_secret = METADATA_SECRET

到控制节点上编辑

vi  /etc/nova/nova.conf

[neutron]

service_metadata_proxy = True

metadata_proxy_shared_secret = METADATA_SECRET

重启服务

service nova-api restart

 

回到neutron节点上:

配置OVS,重启服务

service openvswitch-switch restart

ovs-vsctl add-br br-ex

ovs-vsctl add-port br-ex INTERFACE_NAME

ethtool -K INTERFACE_NAME gro off

 

重启服务

service neutron-plugin-openvswitch-agent restart

service neutron-l3-agent restart

service neutron-dhcp-agent restart

service neutron-metadata-agent restart


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值