Neutron 搭建 基础

版权声明:@抛物线 https://blog.csdn.net/qq_28513801/article/details/83512093

Neutron 搭建

  1. 根据平台安装步骤安装至 neutron 网络服务,在控制节点和计算节点通过 提供的 neutron 脚本,完成 neutron 服务在控制节点和计算节点的安装,并配置 为 GRE 网络。

[root@controller bin]# iaas-install-neutron-controller.sh
[root@compute bin]# iaas-install-neutron-compute.sh
[root@controller bin]# iaas-install-neutron-controller-gre.sh
[root@compute bin]# iaas-install-neutron-compute-gre.sh

  1. 根据平台安装步骤安装至 neutron 网络服务,在控制节点和计算节点通过 提供的 neutron 脚本,完成 neutron 服务在控制节点和计算节点的安装,并配置 为 VLAN 网络

[root@controller bin]# iaas-install-neutron-controller.sh
[root@compute bin]# iaas-install-neutron-compute.sh
[root@controller bin]# iaas-install-neutron-controller-vlan.sh
[root@compute bin]# iaas-install-neutron-compute-vlan.sh

3.使用 neutron 相关命令查询网络服务的列表信息,并以下图的形式打印出 来,将操作命令和返回结果以文本形式提交到答题框

[root@controller html]# neutron agent-list | cut -d"|" -f3,8,6
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
 agent_type         | alive | binary                    
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
 DHCP agent         | :-)   | neutron-dhcp-agent        
 Open vSwitch agent | :-)   | neutron-openvswitch-agent 
 Metadata agent     | :-)   | neutron-metadata-agent    
 Open vSwitch agent | :-)   | neutron-openvswitch-agent 
 Loadbalancer agent | :-)   | neutron-lbaas-agent       
 Metadata agent     | :-)   | neutron-metadata-agent    
 L3 agent           | :-)   | neutron-l3-agent          

4.使用 neutron 相关命令查询网络服务的列表信息中的“binary”一列,将操作 命令和返回结果以文本形式提交到答题框
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

----+---------------------------+
[root@controller html]# neutron agent-list | cut -d"|" -f8
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
 binary                    
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
 neutron-dhcp-agent        
 neutron-openvswitch-agent 
 neutron-metadata-agent    
 neutron-openvswitch-agent 
 neutron-lbaas-agent       
 neutron-metadata-agent    
 neutron-l3-agent          
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+

5.使用 neutron 相关命令查询网络服务 DHCP agent 的详细信息,将操作命令和返回结果以文本形式提交到答题框。
在这里插入图片描述

6.使用 ovs-vswitchd 管理工具的相关命令查询计算节点的网桥列表信息,将 操作命令和返回结果以文本形式提交到答题框。

[root@controller /]# ovs-vsctl list-br
br-ex
br-int
br-tun

7.使用 ovs-vswitchd 管理工具的相关命令查询控制节点的网桥 br-ex 的端口 列表信息,将操作命令和返回结果以文本形式提交到答题框。

[root@controller /]# ovs-vsctl list-ports br-ex
enp0s8
phy-br-ex
qg-f61345f8-2a

8.创建云主机外部网络 ext-net,子网为 ext-subnet,云主机浮动 IP 可用网段 为 192.168.200.100 ~ 192.168.200.200,网关为 192.168.200.1。创建云主机内部网 络 int-net1,子网为 int-subnet1,云主机子网 IP 可用网段为 10.0.0.100 ~ 10.0.0.200, 网关为 10.0.0.1;创建云主机内部网络 int-net2,子网为 int-subnet2,云主机子网 IP 可用网段为 10.0.1.100 ~ 10.0.1.200,网关为 10.0.1.1。添加名为 ext-router 的路 由器,添加网关在 ext-net 网络,添加内部端口到 int-net1 网络,完成内部网络 int-net1 和外部网络的连通。

[root@controller /]# neutron net-create --router:external=true ext-net
Created a new network:
+---------------------------+---------------------------+
| Field                     | Value                     |
+---------------------------+---------------------------+
| admin_state_up            | True                      |
| availability_zone_hints   |                           |
| availability_zones        |                           |
| created_at                | 2018-10-25T09:14:54       |
| description               |                           |
| id                        | b4d22aa2-3bb4-4032-b19e-  |
|                           | 8e5ce9f964d7              |
| ipv4_address_scope        |                           |
| ipv6_address_scope        |                           |
| is_default                | False                     |
| mtu                       | 1458                      |
| name                      | ext-net                   |
| port_security_enabled     | True                      |
| provider:network_type     | gre                       |
| provider:physical_network |                           |
| provider:segmentation_id  | 29                        |
| router:external           | True                      |
| shared                    | False                     |
| status                    | ACTIVE                    |
| subnets                   |                           |
| tags                      |                           |
| tenant_id                 | 104bfea725504210919af3d3a |
|                           | 6633fbb                   |
| updated_at                | 2018-10-25T09:14:54       |
+---------------------------+---------------------------+
![在这里插入图片描述](https://img-blog.csdnimg.cn/20181029194826215.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTEzODAx,size_16,color_FFFFFF,t_70)
 
[root@controller /]# neutron   subnet-create --name ext-subnet --allocation-pool start=192.168.200.100,end=192.168.200.200 --gateway 192.168.200.1 --enable-dhcp --ip-version 4 ext-net 192.168.200.0/24
Created a new subnet:
+-------------------+--------------------------------------------------------+
| Field             | Value                                                  |
+-------------------+--------------------------------------------------------+
| allocation_pools  | {"start": "192.168.200.100", "end": "192.168.200.200"} |
| cidr              | 192.168.200.0/24                                       |
| created_at        | 2018-10-25T09:25:25                                    |
| description       |                                                        |
| dns_nameservers   |                                                        |
| enable_dhcp       | True                                                   |
| gateway_ip        | 192.168.200.1                                          |
| host_routes       |                                                        |
| id                | a94ae69a-6907-4e19-a7dc-c22fd4252a1e                   |
| ip_version        | 4                                                      |
| ipv6_address_mode |                                                        |
| ipv6_ra_mode      |                                                        |
| name              | ext-subnet                                             |
| network_id        | b4d22aa2-3bb4-4032-b19e-8e5ce9f964d7                   |
| subnetpool_id     |                                                        |
| tenant_id         | 104bfea725504210919af3d3a6633fbb                       |
| updated_at        | 2018-10-25T09:25:25                                    |
+-------------------+--------------------------------------------------------+
 
![在这里插入图片描述](https://img-blog.csdnimg.cn/2018102919483664.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTEzODAx,size_16,color_FFFFFF,t_70)
 
[root@controller /]# neutron  subnet-create --name int-subnet1 --allocation-pool start=10.0.0.100,end=10.0.0.200 --gateway 10.0.0.1  --ip-version 4 int-net1 10.0.0.0/24 
Created a new subnet:
+-------------------+----------------------------------------------+
| Field             | Value                                        |
+-------------------+----------------------------------------------+
| allocation_pools  | {"start": "10.0.0.100", "end": "10.0.0.200"} |
| cidr              | 10.0.0.0/24                                  |
| created_at        | 2018-10-25T09:47:15                          |
| description       |                                              |
| dns_nameservers   |                                              |
| enable_dhcp       | True                                         |
| gateway_ip        | 10.0.0.1                                     |
| host_routes       |                                              |
| id                | 1b3fd942-2074-4087-acd0-f20e72ba6f70         |
| ip_version        | 4                                            |
| ipv6_address_mode |                                              |
| ipv6_ra_mode      |                                              |
| name              | int-subnet1                                  |
| network_id        | eb1642c5-1616-4ba9-b463-be3cc0b2941f         |
| subnetpool_id     |                                              |
| tenant_id         | 104bfea725504210919af3d3a6633fbb             |
| updated_at        | 2018-10-25T09:47:15                          |
+-------------------+----------------------------------------------+

[root@controller /]# neutron net-create int-net2
Created a new network:
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| availability_zone_hints   |                                      |
| availability_zones        |                                      |
| created_at                | 2018-10-25T09:48:43                  |
| description               |                                      |
| id                        | 572cdb98-c4a9-4be0-ac6a-301e034a1fcb |
| ipv4_address_scope        |                                      |
| ipv6_address_scope        |                                      |
| mtu                       | 1458                                 |
| name                      | int-net2                             |
| port_security_enabled     | True                                 |
| provider:network_type     | gre                                  |
| provider:physical_network |                                      |
| provider:segmentation_id  | 91                                   |
| router:external           | False                                |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tags                      |                                      |
| tenant_id                 | 104bfea725504210919af3d3a6633fbb     |
| updated_at                | 2018-10-25T09:48:43                  |
+---------------------------+--------------------------------------+

[root@controller /]# neutron  subnet-create --name int-subnet2 --allocation-pool start=10.0.1.100,end=10.0.1.200 --gateway 10.0.1.1 --ip-version 4 int-net2 10.0.1.0/24
Created a new subnet:
+-------------------+----------------------------------------------+
| Field             | Value                                        |
+-------------------+----------------------------------------------+
| allocation_pools  | {"start": "10.0.1.100", "end": "10.0.1.200"} |
| cidr              | 10.0.1.0/24                                  |
| created_at        | 2018-10-25T09:52:42                          |
| description       |                                              |
| dns_nameservers   |                                              |
| enable_dhcp       | True                                         |
| gateway_ip        | 10.0.1.1                                     |
| host_routes       |                                              |
| id                | b735fc77-f389-4665-bb3d-5932546f62bb         |
| ip_version        | 4                                            |
| ipv6_address_mode |                                              |
| ipv6_ra_mode      |                                              |
| name              | int-subnet2                                  |
| network_id        | 572cdb98-c4a9-4be0-ac6a-301e034a1fcb         |
| subnetpool_id     |                                              |
| tenant_id         | 104bfea725504210919af3d3a6633fbb             |
| updated_at        | 2018-10-25T09:52:42                          |
+-------------------+----------------------------------------------+

 ![在这里插入图片描述](https://img-blog.csdnimg.cn/20181029194848214.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTEzODAx,size_16,color_FFFFFF,t_70)

[root@controller /]# neutron   router-create ext-router 
Created a new router:
+-------------------------+--------------------------------------+
| Field                   | Value                                |
+-------------------------+--------------------------------------+
| admin_state_up          | True                                 |
| availability_zone_hints |                                      |
| availability_zones      |                                      |
| description             |                                      |
| distributed             | False                                |
| external_gateway_info   |                                      |
| ha                      | False                                |
| id                      | fbfb7792-85ab-48b7-badd-d135c741f2a0 |
| name                    | ext-router                           |
| routes                  |                                      |
| status                  | ACTIVE                               |
| tenant_id               | 104bfea725504210919af3d3a6633fbb     |
+-------------------------+--------------------------------------+
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/20181029194859375.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTEzODAx,size_16,color_FFFFFF,t_70)

[root@controller /]# neutron router-gateway-set  fbfb7792-85ab-48b7-badd-d135c741f2a0   b4d22aa2-3bb4-4032-b19e-8e5ce9f964d7
Set gateway for router fbfb7792-85ab-48b7-badd-d135c741f2a0
 

 ![在这里插入图片描述](https://img-blog.csdnimg.cn/20181029194908790.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTEzODAx,size_16,color_FFFFFF,t_70)

 
[root@controller /]# neutron router-interface-add fbfb7792-85ab-48b7-badd-d135c741f2a0 1b3fd942-2074-4087-acd0-f20e72ba6f70
Added interface f699e9a1-4bcc-4122-8059-0348a0377009 to router fbfb7792-85ab-48b7-badd-d135c741f2a0.
![在这里插入图片描述](https://img-blog.csdnimg.cn/20181029194920843.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTEzODAx,size_16,color_FFFFFF,t_70)
![在这里插入图片描述](https://img-blog.csdnimg.cn/20181029194930969.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTEzODAx,size_16,color_FFFFFF,t_70)

![在这里插入图片描述](https://img-blog.csdnimg.cn/20181029194942820.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTEzODAx,size_16,color_FFFFFF,t_70)

9.使用 neutron 相关命令查询所创建路由器的详细信息,将操作命令和返回 结果以文本形式提交到答题框。
在这里插入图片描述
在这里插入图片描述

10.使用 neutron 相关命令查询所创建子网的列表信息,并查看内网子网的详 细信息,将操作命令和返回结果以文本形式提交到答题框。
在这里插入图片描述

11.使用 neutron 相关命令查询所创建网络的列表信息,将操作命令和返回结 果以文本形式提交到答题框。

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_28513801/article/details/83512093
今日推荐