继OpenStack安装部署四
六、添加NETWORK(网络)服务
配置控制节点
# openstack-config --set /etc/nova/nova.conf DEFAULT network_api_class nova.network.api.API # openstack-config --set /etc/nova/nova.conf DEFAULT security_group_api nova
重启 服务
# service openstack-nova-api restart # service openstack-nova-scheduler restart # service openstack-nova-conductor restart
配置计算节点
# yum install openstack-nova-network openstack-nova-api
修改配置文件,INTERFACE_NAME修改为eth1
# openstack-config --set /etc/nova/nova.conf DEFAULT network_api_class nova.network.api.API # openstack-config --set /etc/nova/nova.conf DEFAULT security_group_api nova # openstack-config --set /etc/nova/nova.conf DEFAULT network_manager nova.network.manager.FlatDHCPManager # openstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.libvirt.firewall.IptablesFirewallDriver # openstack-config --set /etc/nova/nova.conf DEFAULT network_size 254 # openstack-config --set /etc/nova/nova.conf DEFAULT allow_same_net_traffic False # openstack-config --set /etc/nova/nova.conf DEFAULT multi_host True # openstack-config --set /etc/nova/nova.conf DEFAULT send_arp_for_ha True # openstack-config --set /etc/nova/nova.conf DEFAULT share_dhcp_address True # openstack-config --set /etc/nova/nova.conf DEFAULT force_dhcp_release True # openstack-config --set /etc/nova/nova.conf DEFAULT flat_network_bridge br100 # openstack-config --set /etc/nova/nova.conf DEFAULT flat_interface INTERFACE_NAME # openstack-config --set /etc/nova/nova.conf DEFAULT public_interface INTERFACE_NAME
配置文件中 flat网络桥接到br100上,所以我们需要将br100桥接到eth1上
安装桥接工具
yum install bridge-utils
添加桥接接口
brctl addbr br100 eth1
查看桥接状态
# brctl show bridge name bridge id STP enabled interfaces br100 8000.000c29da52c1 no eth1 virbr0 8000.525400b8f71e yes virbr0-nic
设置网卡eth1混杂模式
# ip link set eth1 promisc on
查看eth1模式
ip link show eth1
启动相关服务并加入启动列表
# service openstack-nova-network start # service openstack-nova-metadata-api start # chkconfig openstack-nova-network on # chkconfig openstack-nova-metadata-api on
创建初始网络(控制节点)
nova network-create demo-net --bridge br100 --multi-host T --fixed-range-v4 10.0.0.32/29
查看网络
# nova net-list +--------------------------------------+----------+--------------+ | ID | Label | CIDR | +--------------------------------------+----------+--------------+ | 5ec9d9f9-87cd-4089-8b84-2ddc24e0171b | demo-net | 10.0.0.32/29 | +--------------------------------------+----------+--------------+
至此网络服务添加完成。加油!
时间: 2024-12-23 22:12:24