用ml2 plugin配置OpenStack Neutron flat 网络

OS:RHEL6.4

OpenStack version:Havana

Controller node : 一台KVM

Compute node :一台ESXI


创建flat 网络

参考http://blog.csdn.net/starean/article/details/16801949

比较全的网络配置

1. Edit conf files in Controller node:
/etc/neutron/neutron.conf

[DEFAULT]
core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin

# 如果需要neutron l3 agent work(router/NAT) 此处需要制定L3 plugin
service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin

[database]
connection = mysql://neutron:neutron@xianghui-10-9-1-141.sce.cn.ibm.com/ovs_neutron

/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = flat
tenant_network_types = flat
mechanism_drivers = openvswitch
[ml2_type_flat]
flat_networks = physnet1


/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
[ovs]
bridge_mappings = physnet1:br-eth0

2. 用openvswitch创建虚拟桥, 并绑定物理网卡(此处选择eth1, eth0作为management 网络)

前期部署的时候最好有两个网卡,如果只有一个网卡,在绑定物理网卡的过程中网络会被断开

ovs-vsctl add-br br-eth0

ovs-vsctl add-port br-eth0 eth1

# 目前无法用service neutron-server restart来load ml2配置,暂时用下面命令替代重启neutron-server

/usr/bin/python /usr/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --log-file /var/log/neutron/server.log &

service neutron-openvswitch-agent restart

service neutron-dhcp-agent restart


[root@xianghui-10-9-1-141 SDK]# ovs-vsctl show
c68671ea-d3d2-4f04-b806-7be10e65936e
    Bridge "br-eth0"
        Port "phy-br-eth0"
            Interface "phy-br-eth0"
        Port "eth1"
            Interface "eth1"
        Port "br-eth0"
            Interface "br-eth0"
                type: internal
    Bridge br-int
        Port "tap922fa636-15"
            tag: 4095
            Interface "tap922fa636-15"
                type: internal
        Port br-int
            Interface br-int
                type: internal
        Port "tapc6ae5432-66"
            tag: 4095
            Interface "tapc6ae5432-66"
                type: internal
        Port "tap909c5f0b-61"
            tag

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值