吉佳 发表于 2017-6-27 13:14:16

openstack-flat 网络问题

  使用packstack安装,版本为M,默认为vxlan网络, 操作系统为centos7.
  由于学习的需要修改为flat网络。
  首先修改配置文件:
  /etc/neutron/plugins/ml2/ml2_conf.ini
  type_drivers = flat
  tenant_network_types =flat
  mechanism_drivers =openvswitch
  flat_networks = physnet1
  然后修改/etc/neutron/plugins/ml2/openvswitch_agent.ini
  bridge_mappings = physnet1:br-phy
  增加ovs br-phy,并且绑定对外端口:



# ovs-vsctl show
73bdadc0-287a-4c0f-9c54-6ad6fb575347
Bridge br-ex
Port "qg-2ccfa701-cd"
Interface "qg-2ccfa701-cd"
type: internal
Port br-ex
Interface br-ex
type: internal
Bridge br-phy
Port "enp0s3"
Interface "enp0s3"
Port phy-br-phy
Interface phy-br-phy
type: patch
options: {peer=int-br-phy}
Port br-phy
Interface br-phy
type: internal

  然后重启service:    neutron-serverneutron-dhcp-agent neutron-openvswitch-agent
  创建网络:

  创建一个instance,使用这个网络。

  但是instance创建完成后,不能够与外界通信。
  自己尝试分析原因:
  # brctl show
bridge name   bridge id               STP enabled   interfaces
qbr187d132b-9d          8000.ce4f9fccba4d       no            qvb187d132b-9d
                                                                        tap187d132b-9d
  instance创建一个linux bridge, 端口为qvb187d132b-9d。



# ovs-vsctl show
73bdadc0-287a-4c0f-9c54-6ad6fb575347
Bridge br-ex
Port "qg-2ccfa701-cd"
Interface "qg-2ccfa701-cd"
type: internal
Port br-ex
Interface br-ex
type: internal
Bridge br-phy
Port "enp0s3"
Interface "enp0s3"
Port phy-br-phy
Interface phy-br-phy
type: patch
options: {peer=int-br-phy}
Port br-phy
Interface br-phy
type: internal
Bridge br-tun
fail_mode: secure
Port br-tun
Interface br-tun
type: internal
Port patch-int
Interface patch-int
type: patch
options: {peer=patch-tun}
Bridge br-flat
Port br-flat
Interface br-flat
type: internal
Port phy-br-flat
Interface phy-br-flat
type: patch
options: {peer=int-br-flat}
Bridge br-int
fail_mode: secure
Port int-br-phy
Interface int-br-phy
type: patch
options: {peer=phy-br-phy}
Port "int-br-eth0"
Interface "int-br-eth0"
type: patch
options: {peer="phy-br-eth0"}
Port br-int
Interface br-int
type: internal
Port "tap239b2780-1b"
tag: 2
Interface "tap239b2780-1b"
type: internal
Port int-br-flat
Interface int-br-flat
type: patch
options: {peer=phy-br-flat}
      Port "qvo187d132b-9d"
tag: 1
Interface "qvo187d132b-9d"
Port "qr-9e110b6b-5d"
tag: 2
Interface "qr-9e110b6b-5d"
type: internal
Port "tap2b05a39d-da"
tag: 1
Interface "tap2b05a39d-da"
type: internal
Port patch-tun
Interface patch-tun
type: patch
options: {peer=patch-int}
ovs_version: "2.5.0"

  linux bridge 连接到bridage br-int 而不是预期的 bridge br-phy.
  谁能帮忙看看这个问题的原因何在?
  非常感谢。
页: [1]
查看完整版本: openstack-flat 网络问题