MariaDB [(none)]> create database neutron; Query OK, 1 row affected (0.04 sec) MariaDB [(none)]> grant all privileges on neutron.* to 'neutron'@'localhost' identified by 'neutron'; Query OK, 0 rows affected (0.24 sec) MariaDB [(none)]> grant all privileges on neutron.* to 'neutron'@'%' identified by 'neutron'; Query OK, 0 rows affected (0.00 sec)
[opst@controller ~]$ source admin-openrc.sh [root@controller opst]# openstack user create --domain default --password neutron neutron +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | default | | enabled | True | | id | 24a20abcf4324cfca09484959244aaf7 | | name | neutron | +-----------+------------------------------------+ [root@controller opst]# openstack role add --project service --user neutron admin [root@controller opst]# openstack service create --name neutron --description 'The Networking Service' network [root@controller opst]# openstack endpoint create --region RegionOne neutron public http://controller:9696 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | a7aae0431e2948ce8070ddf0a14bbdf8 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | ec4391191490440787799e973b54c816 | | service_name | neutron | | service_type | network | | url | http://controller:9696 | +--------------+------------------------------------+ [root@controller opst]# openstack endpoint create --region RegionOne neutron internal http://controller:9696 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 8599ab44484b4c3dbc12f8c945490cef | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | ec4391191490440787799e973b54c816 | | service_name | neutron | | service_type | network | | url | http://controller:9696 | +--------------+-----------------------------------+ [root@controller opst]# openstack endpoint create --region RegionOne neutron admin http://controller:9696 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 66ef114548e84911873e83949ef76307 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | ec4391191490440787799e973b54c816 | | service_name | neutron | | service_type | network | | url | http://controller:9696 | +--------------+-------------------------------------+
[root@controller opst]# yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge python-neutronclient ebtables ipset
[DEFAULT] verbose = True core_plugin = ml2 service_plugins = router allow_overlapping_ips = True rpc_backend=rabbit auth_strategy = keystone notify_nova_on_port_status_changes = True notify_nova_on_port_data_changes = True nova_url = http://controller:8774/v2 [database] connection = mysql://neutron:neutron@controller/neutron [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = opst [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = neutron [nova] auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default region_name = RegionOne project_name = service username = nova password = nova [oslo_concurrency] lock_path = /var/lib/tmp/neutron
[ml2] type_drivers = flat,vlan,vxlan tenant_network_types = vxlan mechanism_drivers = linuxbridge,l2population extension_drivers = port_security [ml2_type_flat] flat_networks = public [ml2_type_vxlan] vni_ranges = 1:1000 [securitygroup] enable_ipset = True
[linux_bridge] physical_interface_mappings = public:eno1 [vxlan] enable_vxlan = True local_ip = 192.168.81.66 l2_population = True [agent] prevent_arp_spoofing = True [securitygroup] enable_security_group = True firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDrive
[DEFAULT] interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver external_network_bridge = verbose = True
[DEFAULT] interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq enable_isolated_metadata = True verbose = True dnsmasq_config_file = /etc/neutron/dnsmasq-neutron.conf
dhcp-option-force=26,1450
[DEFAULT] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_region = RegionOne auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = neutron nova_metadata_ip = controller metadata_proxy_shared_secret = Test(与nova.conf中[neutron]metadata_proxy_shared_secret的值相同) verbose = True
[neutron] url = http://controller:9696 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default region_name = RegionOne project_name = service username = neutron password = neutron service_metadata_proxy = True metadata_proxy_shared_secret = METADATA_SECRET
[root@controller opst]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
[root@controller opst]#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
[root@controller opst]# systemctl restart openstack-nova-api.service
[root@controller opst]# systemctl enable neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
[root@controller opst]# systemctl start neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
[root@controller opst]# systemctl enable neutron-l3-agent.service [root@controller opst]# systemctl start neutron-l3-agent.service
[root@controller opst]# systemctl enable neutron-l3-agent.service [root@controller opst]# systemctl start neutron-l3-agent.service
[linux_bridge] physical_interface_mappings = public:eno1 [vxlan] enable_vxlan = True local_ip = 192.168.81.65(compute IP地址) l2_population = True [agent] prevent_arp_spoofing = True [securitygroup] enable_security_group = True firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDrive
[neutron] url = http://controller:9696 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default region_name = RegionOne project_name = service username = neutron password = neutron
[neutron] url = http://controller:9696 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default region_name = RegionOne project_name = service username = neutron password = neutron
[root@compute opst]# systemctl enable neutron-linuxbridge-agent.service [root@compute opst]# systemctl start neutron-linuxbridge-agent.service
[opst@controller ~]$ neutron ext-list +-----------------------+-----------------------------------------------+ | alias | name | +-----------------------+-----------------------------------------------+ | dns-integration | DNS Integration | | ext-gw-mode | Neutron L3 Configurable external gateway mode | | binding | Port Binding | | agent | agent | | subnet_allocation | Subnet Allocation | | l3_agent_scheduler | L3 Agent Scheduler | | external-net | Neutron external network | | flavors | Neutron Service Flavors | | net-mtu | Network MTU | | quotas | Quota management support | | l3-ha | HA Router extension | | provider | Provider Network | | multi-provider | Multi Provider Network | | extraroute | Neutron Extra Route | | router | Neutron L3 Router | | extra_dhcp_opt | Neutron Extra DHCP opts | | security-group | security-group | | dhcp_agent_scheduler | DHCP Agent Scheduler | | rbac-policies | RBAC Policies | | port-security | Port Security | | allowed-address-pairs | Allowed Address Pairs | | dvr | Distributed Virtual Router | +-----------------------+--------------------------------------------------+
[opst@controller ~]$ neutron agent-list +--------------------------------------+--------------------+------------+-------+----------------+---------------------------+ | id | agent_type | host | alive | admin_state_up | binary | +--------------------------------------+--------------------+------------+-------+----------------+---------------------------+ | 111e36b2-a1d6-4c86-90c3-e4e4725fa560 | L3 agent | controller | :-) | True | neutron-l3-agent | | 7aaa5eca-0436-423f-af2f-fbae0ebc6fa1 | Linux bridge agent | compute | :-) | True | neutron-linuxbridge-agent | | 7e394c14-ce7e-45e0-9ac6-3f9250c04984 | Linux bridge agent | controller | :-) | True | neutron-linuxbridge-agent | | a6ec9a47-e8f1-4948-9d9b-b172fd6757d6 | Metadata agent | controller | :-) | True | neutron-metadata-agent | | f99f491b-79e1-4d5d-8c3f-9ecdcf11452c | DHCP agent | controller | :-) | True | neutron-dhcp-agent | +--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
[opst@controller ~]$ neutron net-create public --shared --router:external --provider:physical_network public --provider:network_type flat Created a new network: +---------------------------+--------------------------------------+ | Field | Value | +---------------------------+--------------------------------------+ | admin_state_up | True | | id | a4b483a8-8331-4fd4-bfec-431e4df8b7ff | | mtu | 0 | | name | public | | port_security_enabled | True | | provider:network_type | flat | | provider:physical_network | public | | provider:segmentation_id | | | router:external | True | | shared | True | | status | ACTIVE | | subnets | | | tenant_id | a242aca931bb49e08a49e5e942c8129d | +---------------------------+----------------------------------------+
[opst@controller ~]$ neutron subnet-create public 192.168.81.0/24 --name public --allocation-pool start=192.168.81.100,end=192.168.81.200 --dns-nameserver 192.168.85.253 --gateway 192.168.81.254
Created a new subnet:
+-------------------+------------------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------------------+
| allocation_pools | {"start": "192.168.81.100", "end": "192.168.81.200"} |
| cidr | 192.168.81.0/24 |
| dns_nameservers | 192.168.85.253 |
| enable_dhcp | True |
| gateway_ip | 192.168.81.254 |
| host_routes | |
| id | da0ff1d1-35e5-4adb-90d6-9c45bc7864c8 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | public |
| network_id | a4b483a8-8331-4fd4-bfec-431e4df8b7ff |
| subnetpool_id | |
| tenant_id | a242aca931bb49e08a49e5e942c8129d |
+-------------------+----------------------------------------------------------+
[root@controller opst]# neutron net-create private Created a new network: +-----------------------+--------------------------------------+ | Field | Value | +-----------------------+--------------------------------------+ | admin_state_up | True | | id | 23ec30de-c5dc-49b2-923c-3b7b83e1d9d1 | | mtu | 0 | | name | private | | port_security_enabled | True | | router:external | False | | shared | False | | status | ACTIVE | | subnets | | | tenant_id | 25b21a1cd9aa474e95a8cfd8e175714c | +-----------------------+---------------------------------------+
[root@controller opst]# neutron subnet-create private 172.16.1.0/24 --name private --dns-nameserver 192.168.85.253 --gateway 172.16.1.1
Created a new subnet:
+-------------------+------------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------------+
| allocation_pools | {"start": "172.16.1.2", "end": "172.16.1.254"} |
| cidr | 172.16.1.0/24 |
| dns_nameservers | 192.168.85.253 |
| enable_dhcp | True |
| gateway_ip | 172.16.1.1 |
| host_routes | |
| id | dd9ee06a-fd00-41f5-93ba-82f3c0c1e052 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | private |
| network_id | 23ec30de-c5dc-49b2-923c-3b7b83e1d9d1 |
| subnetpool_id | |
| tenant_id | 25b21a1cd9aa474e95a8cfd8e175714c |
+-------------------+-------------------------------------------------+
[opst@controller ~]$ neutron router-create router Created a new router: +-----------------------+--------------------------------------+ | Field | Value | +-----------------------+---------------------------------------+ | admin_state_up | True | | external_gateway_info | | | id | 27512806-cac3-47f8-acff-b7bd847e2866 | | name | router | | routes | | | status | ACTIVE | | tenant_id | 25b21a1cd9aa474e95a8cfd8e175714c | +-----------------------+--------------------------------------+
[opst@controller ~]$ neutron router-interface-add router private Added interface f8979659-e714-4298-90cb-57d2b156166c to router router
[opst@controller ~]$ neutron router-gateway-set router public Set gateway for router router
[opst@controller ~]$ neutron router-port-list router
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------+
| 653e03b9-8e4a-41c7-97c9-f0a1fa4f086f | | fa:16:3e:34:b6:5c | {"subnet_id": "da0ff1d1-35e5-4adb-90d6-9c45bc7864c8", "ip_address": "192.168.81.101"} |
| f8979659-e714-4298-90cb-57d2b156166c | | fa:16:3e:9f:fb:83 | {"subnet_id": "dd9ee06a-fd00-41f5-93ba-82f3c0c1e052", "ip_address": "172.16.1.1"} |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------+
[opst@controller ~]$ ip netns qrouter-27512806-cac3-47f8-acff-b7bd847e2866 (id: 2) qdhcp-a4b483a8-8331-4fd4-bfec-431e4df8b7ff (id: 1) qdhcp-23ec30de-c5dc-49b2-923c-3b7b83e1d9d1 (id: 0)
ip netns exec qrouter-27512806-cac3-47f8-acff-b7bd847e2866 ping 172.16.1.1
[root@controller opst]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@controller opst]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
[root@controller opst]# yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml -y
[root@controller opst]# awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
CentOS Linux (4.5.0-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-327.10.1.el7.x86_64) 7 (Core)
[root@controller opst]# grub2-set-default 0
reboot
2016-04-06 17:12:51.605 3136 ERROR neutron.plugins.ml2.managers [req-0dc4b947-ebbe-47a9-823c-a4f9ead7df74 - - - - -] Failed to bind port 24191168-b2c0-47d8-aa81-c46ad9bcf7b6 on host controller 2016-04-06 17:12:51.605 3136 ERROR neutron.plugins.ml2.managers [req-0dc4b947-ebbe-47a9-823c-a4f9ead7df74 - - - - -] Failed to bind port 24191168-b2c0-47d8-aa81-c46ad9bcf7b6 on host controller 2016-04-06 17:12:51.623 3136 INFO neutron.plugins.ml2.plugin [req-0dc4b947-ebbe-47a9-823c-a4f9ead7df74 - - - - -] Attempt 2 to bind port 24191168-b2c0-47d8-aa81-c46ad9bcf7b6 2016-04-06 17:12:52.218 3136 WARNING neutron.plugins.ml2.rpc [req-8c5de5e4-288f-4f1a-a377-3b348c3ee13b - - - - -] Device tap24191168-b2 requested by agent lb0010c6b0ae66 on network 521f09b9-791e-482f-9403-5ddac2d047b4 not bound, vif_type: binding_failed
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有