After installing Openstack, we will need to adjust the network card settings so that the virtual machine can connect to the external network, and vice versa.
When using the OpenStack network, the network is divided into a private network and an external network. The private network can be set by the user, while the external network is set by the administrator. The user can only use the administrator to provide floating IPs.
Openstack provides a variety of network modes that can be used:
The VxLAN (Virtual extensible LAN) network is simulate by the open v Switch, which is convenient for users to set the same network segment without interfering with each other
The VLAN Network can connect existing VLANs and other services in the environment
The Flat Network can let the virtual machine obtain the actual IP directly, which we can use as the floating IP resource of the external network.
Adjust the Bridge in the Controller to connect the virtual machine’s network to the outside world.
The following settings are only available in the Controller, they are not required by the other hosts.
[root@controller ~]# cd /etc/sysconfig/network-scripts/
[root@controller network-scripts]# cp ifcfg-eth0 ifcfg-br-ex
[root@controller network-scripts]#vim ifcfg-eth0
If the content is not the same, please delete the extra configurationsDEVICE=eth0
After you have finished modifying it, you can use :wq or 😡 to back out. Next, we will need to create a new Bridge.
[root@controller network-scripts]# vim ifcfg-br-ex
If the content is not the same, please delete the extra configurations
Once you are done modifying, you can use :wq or 😡 to exit, then you will need to restart the network.
[root@controller network-scripts]# systemctl restart network
After you finish setting up the Bridge, we can check if eth0 exists with the following instructions.[root@controller ~]# ovs-vsctl show
[root@controller ~]# ovs-vsctl list-ports br-ex
Congratulations, you have finished setting the basic network configuration of OpenStack, but this is only setting up the network card. Next we will need to enter the OpenStack environment to set up the external network and private network.
To be continued.