Warning: Array to string conversion in /home/wwwroot/myf5/wp-content/plugins/wpjam-basic/public/wpjam-utils.php on line 496
受限于实体网络以及主机网卡,利用em2接口作为vm的流量接口,该接口所在网络以vxlan 网络运行,同时compute主机的另一个接口em1配置为支持openstack flat网络,这样可以在openstack内部起一个flat类型网络,该网络还可以顺便作为L3 agent的external 网络。
flat 网络是openstack中非vlan方式的可以与外部物理网络直接通的一种provider网络。
compute节点添加一个br-ex接口,将地址分配到该br-ex接口上
root@compute:/var/log/upstart# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto em1
iface em1 inet manual
up ifconfig $IFACE 0.0.0.0 up
up ip link set $IFACE promisc on
down ip link set $IFACE promisc off
down ifconfig $IFACE down
# Used for openstack flat and hypervisor mgmt
auto br-ex
iface br-ex inet static
address 9.9.9.6
netmask 255.255.255.0
network 9.9.9.0
broadcast 9.9.9.255
gateway 9.9.9.253
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
auto em2
iface em2 inet static
address 10.1.1.6
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
然后添加 br-ex 桥以及将em1接口加入br-ex桥
ovs-vsctl add-br br-ex
ovs-vsctl add-port br-ex em1
reboot 机器
network节点以及计算节点ml2文件配置如下:
root@compute:/var/log/upstart# egrep -v "^$|^#" /etc/neutron/plugins/ml2/ml2_conf.ini [ml2] type_drivers = flat,vxlan,vlan,gre tenant_network_types = vxlan,vlan mechanism_drivers = openvswitch [ml2_type_flat] flat_networks = phyflat9 [ml2_type_vlan] [ml2_type_gre] tunnel_id_ranges = 1:1000 [ml2_type_vxlan] vni_ranges = 65537:69999 [ovs] local_ip = 10.1.1.6 tunnel_type = vxlan tunnel_bridge = br-tun integration_bridge = br-int tunnel_id_ranges = 65537:69999 tenant_network_type = vxlan enable_tunneling = true network_vlan_ranges = phyflat9 bridge_mappings = phyflat9:br-ex [agent] root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf tunnel_types = vxlan vxlan_udp_port = 4789 l2_population = False [securitygroup] enable_security_group = True firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
配置完毕后,可以创建一个flat 网络
keystone tenant-list
neutron net-create --tenant-id 496355a769d94241afbbdc76adbe1fb5 sharedflat9 --shared --router:external=True --provider:network_type flat --provider:physical_network phyflat9
neutron net-create --tenant-id 496355a769d94241afbbdc76adbe1fb5 sharedflat9 --shared --provider:network_type flat --provider:physical_network phyflat9
可以将该网络分配给L3 agent router作为external网络使用,这样L3 agent就可以通过该网络连接到internet处的F5设备。
Array
![FT$]38NH)8F433}N9VWRD_K](http://www.cnadn.net/upload/2015/05/FT38NH8F433N9VWRD_K.png)
文章评论