Install OpenStack – network settings (part.1)

Install OpenStack – network settings (part.1)

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:

-VxLAN Network

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

-VLAN Network

The VLAN Network can connect existing VLANs and other services in the environment

-Flat Network

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 configurations

DEVICE=eth0
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=br-ex
ONBOOT=yes

After you have finished modifying it, you can use :wq or :x 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

ONBOOT=yes
IPADDR=192.168.122.31
PREFIX=24
GATEWAY=192.168.122.1
DNS1=8.8.8.8
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static

Once you are done modifying, you can use :wq or :x 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
………..
Bridge br-ex
Controller “tcp:127.0.0.1:6633”
is_connected: true
fail_mode: secure
Port br-ex
Interface br-ex
type: internal
Port phy-br-ex
Interface phy-br-ex
type: patch
options: {peer=int-br-ex}
Port “eth0”
Interface “eth0”
………..

[root@controller ~]# ovs-vsctl list-ports br-ex
eth0
phy-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.

撰文: 陳彥勝 迎棧科技資深解決方案架構師

EDM

Select list(s)*

 

Loading