部署 Option 1: Provider網(wǎng)絡(luò)

Option 1: Provider 網(wǎng)絡(luò)

controller node控制節(jié)點(diǎn)安裝、配置網(wǎng)絡(luò)組件

安裝組件

$ yum install openstack-neutron openstack-neutron-ml2 \
openstack-neutron-linuxbridge ebtables 

配置服務(wù)器組件

網(wǎng)絡(luò)服務(wù)器組件配置包括數(shù)據(jù)庫、認(rèn)證機(jī)制、消息隊(duì)列、網(wǎng)絡(luò)拓?fù)渥兏嵝选⒁约安寮?/p>

默認(rèn)的配置文件因發(fā)行版本不同而變化,你可能需要添加下列條目或選項(xiàng),而不是修改現(xiàn)有的。

  • 編輯 /etc/neutron/neutron.conf,完成如下內(nèi)容:
[database]
...
connection = mysql+pymysql://neutron:123456@controller/neutron
#注釋或刪除[database]條目中其他的connection
[DEFAULT]
...
core_plugin = ml2      #使用modular layer 2(ML2)插件
service_plugins =      #禁用其他插件
transport_url = rabbit://openstack:123456@controller  #使用rabbitMQ
auth_strategy = keystone   #使用keystone認(rèn)證
notify_nova_on_port_status_changes = True  
notify_nova_on_port_data_changes = True
[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_rul = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = neutron
password = 123456
#注釋或刪除[keystone_authtoken]條目中其他選項(xiàng)
[nova]
...
auth_url = http://controller:35357
auth_type = password
project_domain_name = Default
user_domain_name = Default
region_name = RegionOne
project_name = service
username = nova
password = 123456
[oslo_concurrency]
...
lock_path = /var/lib/neutron/tmp

配置 Modular Layer 2 (ML2)插件

ML2插件使用Linux bridge機(jī)制建立layer-2虛擬網(wǎng)絡(luò)架構(gòu)供虛擬機(jī)使用

  • 編輯 /etc/neutron/plugins/ml2/ml2_conf.ini,添加如下內(nèi)容:
[ml2]
...
type_drivers = flat,vlan  #啟用flat和vlan網(wǎng)絡(luò)
tenant_network_types =    #禁用self-service網(wǎng)絡(luò)
mechanism_drivers = linuxbridge   #啟用linux bridge
extension_drivers = port_security   #啟用port安全擴(kuò)展驅(qū)動(dòng)
[ml2_type_flat]
...
flat_networks = provider   #配置provider虛擬網(wǎng)絡(luò)為flat
[securitygroup]
...
enable_ipset = True   #啟用ipset增加安全組規(guī)則的效率

配置Linux bridge代理

Linux bridge代理會(huì)建立layer-2(bridge和swiching)虛擬網(wǎng)絡(luò)架構(gòu),并處理安全組

  • 編輯/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:enp0s8
[vxlan]
enable_vxlan = False
[securitygroup]
enable_security_group = True      #啟用安全組
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
#配置Linuxbridge iptables firewall driver

配置 DHCP

  • 編輯`/etc/neutron/dhcp_agent.ini
[DEFAULT]
...
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容