Openstack-Neutron Local网络配置
local 网络与其他网络和节点隔离。local 网络中的 instance 只能与位于同一节点上同一网络的 instance 通信,local 网络主要用于单机测试。
查看neutron配置,确保local模式在里面
[root@controller ~]# vim /etc/neutron/plugins/ml2/ml2_conf
[ml2]
type_drivers = flat,vlan,gre,vxlan,local
tenant_network_types =local
#把租户默认创建网络模式改为了local,也可用管理员直接创建local
mechanism_drivers = openvswitch,l2population
extension_drivers = port_security
重启neutron服务
[root@controller ~]# openstack-service restart neutron
在dashboard配置创建网络,网络类型选择local
继续添加子网
创建实例,选择网络,
创建完已经获取到IP地址
在系统上可以查看linuxbridge
[root@controller ml2]# brctl show
bridge name bridge id STP enabled interfaces
qbra4eeaf3a-d1 8000.c62e5201b6c9 no qvba4eeaf3a-d1
tapa4eeaf3a-d1
qbra83823d0-d5 8000.f20d1d7017ae no qvba83823d0-d5
tapa83823d0-d5
qbrfe00afc9-c7 8000.f68cc7a3518c no qvbfe00afc9-c7
tapfe00afc9-c7
[root@controller ml2]# virsh list
Id 名称 状态
----------------------------------------------------
4 instance-00000026 running
5 instance-00000025 running
6 instance-00000027 running
配置完成
Local配置网络拓扑
测试:
在实例机上可以与实例相互连通,却无法连接到外部