Openstack 网络类型 vxlan -> vlan
Controller节点:
# vi /etc/neutron/plugins/ml2/ml2_conf.ini
修改前(vxlan):
[ml2] type_drivers = flat,vlan,vxlan tenant_network_types = vxlan mechanism_drivers = openvswitch,l2population extension_drivers = port_security [ml2_type_flat] flat_networks = provider [ml2_type_vlan] #network_vlan_ranges = provider:1:1000 [ml2_type_vxlan] vni_ranges = 1:1000 [securitygroup] enable_ipset = true
修改后(vlan):
[ml2] type_drivers = flat,vlan,vxlan tenant_network_types = vlan mechanism_drivers = openvswitch,l2population extension_drivers = port_security external_network_type = flat [ml2_type_flat] flat_networks = public [ml2_type_vlan] network_vlan_ranges = default:1:3000 [ml2_type_vxlan] # vni_ranges = 1:1000 [securitygroup] enable_ipset = true
# vi /etc/neutron/plugins/ml2/openvswitch_agent.ini
[agent] tunnel_types = l2_population = True [ovs] bridge_mappings = public:br-provider,default:br-em2 local_ip = 10.0.0.11 [securitygroup] firewall_driver = iptables_hybrid
新增网桥br-em2:
# ovs-vsctl add-br br-em2
将网卡1加入br-em2网桥:
# ovs-vsctl add-port br-em2 eth1
配置网桥IP地址:
# ifconfig eth1 0.0.0.0 # ifconfig br-em2 up # ifconfig br-em2 10.0.0.11/24
重启计算及网络:
# systemctl restart openstack-nova-api.service # systemctl restart neutron-*
Compute节点:
# vi /etc/neutron/plugins/ml2/openvswitch_agent.ini
[ovs] local_ip = 10.0.0.21 bridge_mappings = default:br-em2 [agent] tunnel_types = l2_population = True
新增网桥br-em2:
# ovs-vsctl add-br br-em2
将网卡1加入br-em2网桥:
# ovs-vsctl add-port br-em2 eth1
配置网桥IP地址:
# ifconfig eth1 0.0.0.0 # ifconfig br-em2 up # ifconfig br-em2 10.0.0.21/24
重启计算及网络:
# systemctl restart openstack-nova-compute.service # systemctl restart neutron-openvswitch-agent.service
*rc.local文件:
# vi /etc/rc.local
Controller: # ifconfig eth0 0.0.0.0 # ifconfig eth1 0.0.0.0 # ifconfig br-provider 管理口IP # ifconfig br-em2 10.0.0.11/24 # route add default gw 管理口网关 Compute: # ifconfig eth1 0.0.0.0 # ifconfig br-em2 10.0.0.21/24 授权: # chmod +x /etc/rc.local
注意:
以上步骤,先修改配置文件,再创建网桥(创建网桥之前先启ovs服务,否则会导致网桥不可用)配置网桥,最后重启网络和计算服务,
相关推荐
ruancw 2020-11-10
WenFY的CSDN 2020-02-12
cloudinyachao 2019-12-27
wangjunsheng 2019-11-19
SsJackX 2019-11-03
hubanbei00的家园 2019-10-31
hhphhp 2019-10-26
JeremyLiu 2019-10-19
xiaoqiang 2019-09-07
GrubLinux 2019-03-30
DavidXJFeng 2019-09-05
hyneriahope 2016-04-08
yuyezhulan 2015-06-28
岳英豪 2019-06-27
BLACK 2016-02-16
芮祥麟 2019-02-22
bitan 2015-01-04
crazyyangrong 2013-12-03
Kayven数据 2018-03-24