其他分享
首页 > 其他分享> > A16. openstack架构实战-添加一个flat网络

A16. openstack架构实战-添加一个flat网络

作者:互联网

 

1:给所有的节点都添加一个物理网卡:

 

 

 

 2:给添加的网卡进行配置ip

 

 

 3:测试ip是否正常可以ping通

 

 

 

修改网络配置:

控制节点修改:

增加flat网段类型:net203

[root@controller01 ~]# vim /etc/neutron/plugins/ml2/ml2_conf.ini

 

 

配置flat网络对应真实的物理网卡:

[root@controller01 ~]# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini

 

重启服务:

[root@controller01 ~]# systemctl restart neutron-server.service neutron-linuxbridge-agent.service

 

计算节点修改:

[root@compute01 ~]# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini

 

重启服务:

[root@compute01 ~]# systemctl restart neutron-linuxbridge-agent
[root@compute01 ~]# systemctl status  neutron-linuxbridge-agent

测试:创建网络:

[root@controller01 ~]# openstack network create   --external --share  --provider-physical-network net203 --provider-network-type flat  net203
[root@controller01 ~]# openstack network list
+--------------------------------------+----------+--------------------------------------+
| ID                                   | Name     | Subnets                              |
+--------------------------------------+----------+--------------------------------------+
| 71a073b3-c2f9-491b-b8d9-2d8b3c544681 | net203   | b7522a79-a0d9-469c-bf87-93d19a638663 |
| b9b0e4bf-ef13-47fb-8608-b0cb49d13010 | provider | fe427e08-7d4f-46ec-bebd-1a2d277fbef2 |
+--------------------------------------+----------+--------------------------------------+


 

创建子网:

[root@controller01 ~]# openstack subnet create --network net203 --allocation-pool start=10.100.203.100,end=10.100.203.200 --dns-nameserver 114.114.114.114 --gateway 10.100.203.254 --subnet-range 10.100.203.0/24 net203-subnet

[root@controller01 ~]# openstack subnet  list
+--------------------------------------+---------------+--------------------------------------+-----------------+
| ID                                   | Name          | Network                              | Subnet          |
+--------------------------------------+---------------+--------------------------------------+-----------------+
| b7522a79-a0d9-469c-bf87-93d19a638663 | net203-subnet | 71a073b3-c2f9-491b-b8d9-2d8b3c544681 | 10.100.203.0/24 |
| fe427e08-7d4f-46ec-bebd-1a2d277fbef2 | provider214   | b9b0e4bf-ef13-47fb-8608-b0cb49d13010 | 10.100.214.0/24 |
+--------------------------------------+---------------+--------------------------------------+-----------------+

 

 

 

 

 

 

 

 

 

 

 

 

 

 





 

标签:flat,10.100,A16,net203,network,controller01,openstack,root,neutron
来源: https://www.cnblogs.com/zhaopei123/p/13042786.html