[英]How to set up flat network in openstack?
I deployed openstack via openstack-ansible and I'm trying to set up an openstack network so that the instances are accessible from the physical network (192.168.10.0/20):我通过 openstack-ansible 部署了 openstack,我正在尝试设置一个 openstack 网络,以便可以从物理网络(192.168.10.0/20)访问实例:
openstack network create --share --external \
--provider-physical-network flat \
--provider-network-type flat public
openstack subnet create --network public \
--allocation-pool start=192.168.14.241,end=192.168.14.249 \
--dns-nameserver 192.168.10.144 --gateway 192.168.10.1 \
--subnet-range 192.168.10.0/20 public-subnet
but instances do not receive ip addresses and do not ping anything.但实例没有收到 ip 地址,也没有 ping 任何东西。
This is my ml2_conf.ini:这是我的 ml2_conf.ini:
cat /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = flat,vlan,vxlan,local
tenant_network_types = vxlan,flat,vlan
mechanism_drivers = linuxbridge
extension_drivers = port_security
# ML2 flat networks
[ml2_type_flat]
flat_networks = flat
# ML2 VLAN networks
[ml2_type_vlan]
network_vlan_ranges = vlan:101:200,vlan:301:400
# ML2 VXLAN networks
[ml2_type_vxlan]
vxlan_group = 239.1.1.1
vni_ranges = 1:1000
[ml2_type_geneve]
vni_ranges =
max_header_size = 38
# Security groups
[securitygroup]
enable_security_group = True
enable_ipset = True
Have any ideas how to fix this?有任何想法如何解决这个问题?
network:dhcp
port exist or not, it should exist and show that there is one or more ports which has the ip
at the head of the range within start=192.168.14.241,end=192.168.14.249
. network:dhcp
端口是否存在,应该存在并表明在start=192.168.14.241,end=192.168.14.249
范围内有一个或多个端口以ip
开头。 Like this:# openstack port list --device-owner network:dhcp
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
| ID | Name | MAC Address | Fixed IP Addresses | Status |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
| 08db769d-7500-41c0-bc3a-086fdb75c65d | | fa:16:3e:4f:76:75 | ip_address='192.168.1.2', subnet_id='83e0dea2-cee3-437b-94c7-d5650d94d921' | ACTIVE |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
tapXXX
for port which should attach to the instance), like this: tapXXX
应该附加到实例),如下所示:# openstack subnet list
+--------------------------------------+-----------+--------------------------------------+----------------+
| ID | Name | Network | Subnet |
+--------------------------------------+-----------+--------------------------------------+----------------+
| 83e0dea2-cee3-437b-94c7-d5650d94d921 | flat_snet | f775913d-8f9d-4f46-9fe7-2a1bce710ec6 | 192.168.1.0/24 |
+--------------------------------------+-----------+--------------------------------------+----------------+
# brctl show
bridge name bridge id STP enabled interfaces
brqf775913d-8f 8000.000ec6ade4f2 no enx000ec6ade4f2
tap08db769d-75
tapd4d2a5e3-fd
docker0 8000.0242e6da798c no
3, check the instance has configured with the correct ip info ( ip a
and ip r s
or others to check the network traffic like traceroute
) by login the instance console. 3, check the instance has configured with the correct ip info (
ip a
and ip r s
or others to check the network traffic like traceroute
) by login the instance console.
4, in my situation, we should set the pvid
's value as the only one flat
network's vlanID
in the switch ports which connect to the hypervisors, because we have other vlan
networks which configured as vlan
type in openstack cluster. 4,在我的情况下,我们应该将
pvid
的值设置为连接到管理程序的交换机端口中唯一一个flat
网络的vlanID
,因为我们在 openstack 集群中还有其他vlan
网络配置为vlan
类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.