前言:
当前大家对“centos610配置ip地址”大体比较珍视,同学们都想要知道一些“centos610配置ip地址”的相关内容。那么小编也在网上收集了一些关于“centos610配置ip地址””的相关内容,希望大家能喜欢,你们快快来了解一下吧!一、创库授权
1.1.、(控制节点)配置数据库
mysql -u root -pADMIN_PASS
1.2、创建数据库并配置权限
CREATE DATABASE neutron;GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'ADMIN_PASS';GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'ADMIN_PASS';
1.3、控制节点)创建认证信息
openstack user create --domain default --password ADMIN_PASS neutronopenstack role add --project service --user neutron adminopenstack service create --name neutron --description "OpenStack Networking" networkopenstack endpoint create --region RegionOne network public endpoint create --region RegionOne network internal endpoint create --region RegionOne network admin
二、安装服务
1.1、(控制节点)安装软件包并配置配置文件
yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables -y
1.2、编辑/etc/neutron/neutron.conf文件并配置如下项
/etc/neutron/neutron.confcp /etc/neutron/neutron.conf{,.bak}grep '^[a-z\[]' /etc/neutron/neutron.conf.bak >/etc/neutron/neutron.conf[database]connection = mysql+pymysql://neutron:ADMIN_PASS@controller/neutron...[DEFAULT]core_plugin = ml2service_plugins = routerallow_overlapping_ips = truetransport_url = rabbit://openstack:ADMIN_PASS@controllerauth_strategy = keystonenotify_nova_on_port_status_changes = truenotify_nova_on_port_data_changes = true...[keystone_authtoken]auth_uri = = = controller:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = neutronpassword = ADMIN_PASS...[nova]auth_url = = passwordproject_domain_name = defaultuser_domain_name = defaultregion_name = RegionOneproject_name = serviceusername = novapassword = ADMIN_PASS...[oslo_concurrency]lock_path = /var/lib/neutron/tmp
1.3、编辑/etc/neutron/plugins/ml2/ml2_conf.ini文件配置二层插件
cp /etc/neutron/plugins/ml2/ml2_conf.ini{,.bak}grep '^[a-z\[]' /etc/neutron/plugins/ml2/ml2_conf.ini.bak >/etc/neutron/plugins/ml2/ml2_conf.ini[ml2]type_drivers = flat,vlan,vxlantenant_network_types = vxlanmechanism_drivers = linuxbridge,l2populationextension_drivers = port_security...[ml2_type_flat]flat_networks = provider...[ml2_type_vxlan]vni_ranges = 1:1000...[securitygroup]enable_ipset = true
1.4、编辑/etc/neutron/plugins/ml2/linuxbridge_agent.ini文件配置linux bridge插件
cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini{,.bak}grep '^[a-z\[]' /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak >/etc/neutron/plugins/ml2/linuxbridge_agent.ini[linux_bridge]physical_interface_mappings = provider:ens34 #第二张网卡网卡名...[vxlan]enable_vxlan = truelocal_ip = 172.16.1.11l2_population = true...[securitygroup]enable_security_group = truefirewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
1.5、确认内核支持网桥filters并作如下设置,编辑/etc/sysctl.conf增加以下内容
/etc/sysctl.confnet.bridge.bridge-nf-call-iptables=1net.bridge.bridge-nf-call-ip6tables=1
1.6、载入br_netfilter模块
modprobe br_netfilter
从配置文件加载内核参数
sysctl -p
1.7、编辑/etc/neutron/l3_agent.ini配置三层插件
/etc/neutron/l3_agent.ini[DEFAULT]interface_driver = linuxbridge
1.8、编辑/etc/neutron/dhcp_agent.ini配置dhcp插件
/etc/neutron/dhcp_agent.ini[DEFAULT]interface_driver = linuxbridgedhcp_driver = neutron.agent.linux.dhcp.Dnsmasqenable_isolated_metadata = true
1.9、编辑/etc/neutron/metadata_agent.ini文件配置metadata插件
/etc/neutron/metadata_agent.ini[DEFAULT]nova_metadata_host = controllermetadata_proxy_shared_secret = ADMIN_PASS
2.0、编辑文件/etc/nova/nova.conf配置计算服务使用网络服务
/etc/nova/nova.conf[neutron]url = = = passwordproject_domain_name = defaultuser_domain_name = defaultregion_name = RegionOneproject_name = serviceusername = neutronpassword = ADMIN_PASSservice_metadata_proxy = truemetadata_proxy_shared_secret = ADMIN_PASS
三、(控制节点)完成安装,导入数据库表,并启动服务
1.1、创建链接文件
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
1.2、导入数据库结构
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
1.3、重启计算服务,设置网络服务的开机自启动,并启动网络服务
systemctl restart openstack-nova-api.servicesystemctl enable neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.servicesystemctl start neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.servicesystemctl enable neutron-l3-agent.servicesystemctl start neutron-l3-agent.service
四、(计算节点)计算节点安装网络服务
1.1、安装软件包
yum install openstack-neutron-linuxbridge ebtables ipset -y
1.2、编辑/etc/neutron/neutron.conf文件完成如下项
cp /etc/neutron/neutron.conf{,.bak}grep '^[a-z\[]' /etc/neutron/neutron.conf.bak >/etc/neutron/neutron.conf[DEFAULT]transport_url = rabbit://openstack:ADMIN_PASS@controllerauth_strategy = keystone...[keystone_authtoken]auth_uri = = = controller:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = neutronpassword = ADMIN_PASS...[oslo_concurrency]lock_path = /var/lib/neutron/tmp
1.3、配置linux bridge插件,编辑/etc/neutron/plugins/ml2/linuxbridge_agent.ini完成如下项
cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini{,.bak}grep '^[a-z\[]' /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak >/etc/neutron/plugins/ml2/linuxbridge_agent.ini[linux_bridge]physical_interface_mappings = provider:ens34 #第二张网卡名...[vxlan]enable_vxlan = truelocal_ip = 172.16.1.31l2_population = true...[securitygroup]enable_security_group = truefirewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
1.4、确认内核支持网桥filters并作如下设置,编辑/etc/sysctl.conf增加以下内容
net.bridge.bridge-nf-call-iptables=1net.bridge.bridge-nf-call-ip6tables=1
1.5、载入br_netfilter模块
modprobe br_netfilter
1.6、从配置文件加载内核参数
sysctl -p
1.7、配置计算服务使用网络服务/etc/nova/nova.conf
[neutron]url = = = passwordproject_domain_name = defaultuser_domain_name = defaultregion_name = RegionOneproject_name = serviceusername = neutronpassword = ADMIN_PASS
1.8、完成安装,设置服务
systemctl restart openstack-nova-compute.servicesystemctl enable neutron-linuxbridge-agent.servicesystemctl start neutron-linuxbridge-agent.service
五、(控制节点)验证操作
1.1、执行命令验证是否成功启动
neutron-serveropenstack extension list --network
1.2、执行命令列出插件,验证网络插件是否成功启动
openstack network agent list
六、打通第二张网卡(用于vxaln隧道的)网络
1、修改控制节点第二张网卡
TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens34UUID=c7fc6c96-2cf4-4e4e-b0e9-c3d6103c0a02DEVICE=ens34ONBOOT=yesIPADDR="172.16.1.11"NETMASK="255.255.255.0"
2、启动单张网卡
ifup ens34ifconfig eth1 172.16.1.11 netmask 255.255.255.0
3、修改计算节点第二张网卡
TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens34UUID=6346da53-51b2-4bf7-bd01-244df80590dcDEVICE=ens34ONBOOT=yesIPADDR="172.16.1.31"NETMASK="255.255.255.0"
4、启动单张网卡
ifup ens34
5、验证操作
标签: #centos610配置ip地址