We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

20
2.897.878,86

Cart

Quantity 2.700,00
Quantity 1.700,00
Quantity 335.936,16

Learn how to – Install OpenStack on Rocky Linux 8 – Host Networking (Step 2)

Learn how to – Install OpenStack on Rocky Linux 8 – Host Networking (Step 2).

In our previous article we discussed about setting up pre-requisites for running OpenStack on Rocky Linux 8 server. In this subsequent step we dive into the network configurations before bootstrapping other OpenStack Network services. When performing networking setup on the host you’ve two configuration options for management network / bridge.

  • Setup Host Networking using Linux Bridge
  • Setup Host Networking using Open vSwitch (OVS)

In this guide we are biased towards OVS as our virtual switch choice for a couple of reasons not stated in this article. If you do a Google search on OVS and Linux Bridge comparison you’ll find good content that can enlighten you. Open vSwitch (OVS) is an open source multilayer virtual switch designed to enable effective network automation via programmatic extensions.

OVS Overview

In a nutshell OVS is similar to proprietary virtual switching solutions such as VMware vSphere Distributed Switch (vDS).

1. Install Open vSwitch (OVS)

The Open vSwitch (OVS) packages are not available in your OS default repositories. Before installation can be done, ensure OpenStack repositories are set correctly as captured in Step 1. This can be validated by running the following command:

sudo dnf repolist

With the repos configured install Open vSwitch package by executing the commands below.

sudo dnf -y install openvswitch

Start and enable the service to start at system bootup.

sudo systemctl enable --now openvswitch

Confirm if the service is started and in running state.

systemctl status openvswitch

Install Network Scripts package

sudo dnf -y install network-scripts

2. Configure host management bridge

I’m performing this setup on a host with a single network interface card eno1 as seen in the output of ip ad command.

$ ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 1c:69:7a:61:da:e9 brd ff:ff:ff:ff:ff:ff

If in your setup you have a dedicated management network for OpenStack API and Management services creation of Linux bridge at this point can be ignored. Linux or OVS bridge is then performed at Neutron Network configuration step that comes later.

Configure Bridge without VLAN (Flat Network)

Sample configurations on primary interface (eno1)

$ sudo vim /etc/sysconfig/network-scripts/ifcfg-eno1
DEVICE=eno1
ONBOOT=yes
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=br-ex

Bridge configuration of br-ex bridge.

$ sudo vim /etc/sysconfig/network-scripts/ifcfg-br-ex
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=172.20.20.3
NETMASK=255.255.255.0
GATEWAY=172.20.20.1
DNS1=172.20.20.1
ONBOOT=yes

Configure Bridge with VLAN (VLAN ID of 30 )

A sub-VLAN interface configuration with VLAN ID of 30.

$ sudo vim /etc/sysconfig/network-scripts/ifcfg-vlan30
DEVICE=vlan30
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSIntPort
BOOTPROTO=static
IPADDR=172.20.30.3
NETMASK=255.255.255.0
GATEWAY=172.20.30.1
DNS1=172.20.30.1
OVS_BRIDGE=br-ex
OVS_OPTIONS="tag=30"
OVS_EXTRA="set Interface $DEVICE external-ids:iface-id=$(hostname -s)-$DEVICE-vif"
HOTPLUG=no

Primary interface eno1 network configuration.

$ sudo vim /etc/sysconfig/network-scripts/ifcfg-eno1
DEVICE=eno1
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=br-ex
BOOTPROTO=none
HOTPLUG=no

Bridge configuration of br-ex bridge.

$ sudo vim /etc/sysconfig/network-scripts/ifcfg-br-ex
DEVICE=br-ex
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=none

3. Disable NetworkManager & start network service

Ensure network-scrips package.

sudo dnf install network-scripts -y

Disable NetworkManager and network service.

systemctl disable NetworkManager
systemctl enable network

Reboot the system to confirm if your network configurations were done right.

sudo shutdown -r now

Check network configs after the system is rebooted.

# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs-system state UP group default qlen 1000
    link/ether 1c:69:7a:61:da:e9 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::1e69:7aff:fe61:dae9/64 scope link
       valid_lft forever preferred_lft forever
3: wlp0s20f3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 08:71:90:27:5b:be brd ff:ff:ff:ff:ff:ff
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 82:c5:75:7c:7a:61 brd ff:ff:ff:ff:ff:ff
5: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 1c:69:7a:61:da:e9 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::b045:abff:fe47:aa48/64 scope link
       valid_lft forever preferred_lft forever
6: vlan30: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 26:54:c4:5c:3d:8b brd ff:ff:ff:ff:ff:ff
    inet 172.20.30.3/24 brd 172.20.30.255 scope global vlan30
       valid_lft forever preferred_lft forever
    inet6 fe80::2454:c4ff:fe5c:3d8b/64 scope link
       valid_lft forever preferred_lft forever

You can also run ovs-vsctl to show Open vSwitch bridge configurations.

# ovs-vsctl show
cdbbfa8b-3c73-4c04-ab45-76e02f38209f
    Bridge br-ex
        Port eno1
            Interface eno1
        Port br-ex
            Interface br-ex
                type: internal
        Port vlan30
            tag: 30
            Interface vlan30
                type: internal
    ovs_version: "2.17.4"

Conclusion

In this guide we only covered configuration of management bridge using OVS. If you’ll like to use Linux Bridge instead, check out the guide available on our website on bridge configurations.

The next article to read is:

Similar articles to check out:

20
2.897.878,86

Cart

Quantity 2.700,00
Quantity 1.700,00
Quantity 335.936,16