Monday, October 23, 2017

Network Manager

This should be the third last topic that I'd like to share related to my RHCE course, but my brain just hang there without any progress. So I proceed with SELinux and firewall first.

I am still trying to understand the networking terms, teaming and bridge are 2 new words that I learned from RH Admin III course. Actually, I still don't quite understand what is the usage for these. When I setup VirtualBox for this series of sharings, I started to understand more for bridge... Anyway, let me stay focus on the topic (how-to).

The Network Manager commands (nmcli) are rather easy to use, if you know what you are trying to do.

Network teaming

I did some hacks to make 2 available interfaces, enp0s8 and enp0s10.

Next, create a team master. This team master will configured to activebackup setting, i.e. one port/link is used while other reserved as backup.

Now create the team slaves (team ports).

Use teamdctl to see the status of the teaming. This is provided in teamd package.

Currently, enp0s8 is the active port. Let's bring down this port and check the status again. It is automatically switch to the other port.

If we bring up enp0s8 again, the enp0s12 will remain as the active port, and the "new port" will be the backup port in this settings.

Network bridging

Let me bring down enp0s8 for this demo purpose. Then create bridge, and a bridge-slave.

You can use brctl to view the bridge details. This is provided in bridge-utils package.

Note that, the connections that we created earlier have its configuration saved in the file in /etc/sysconfig/network-scripts/

Link aggregation

NetworkManager does not support link aggregations. If you need to combine the bridge and team together, you must stop NetworkManager. Modify the connection config files manually, and restart network.

Say we want to have the team0 is linked to bridge0. Do the necessary modification in /etc/sysconfig/network-scritps/ifcfg-team0. In this case is just add the highlighted in red box line as shown in the image below.

I stopped and disabled NetworkManager, then restarted the network service. But I am facing failure. However, I rebooted my VM and check the network service again, all bridge and team connections are running fine. I tried to restart it again, it's also running fine. I wonder why...

With this, I conclude my notes on this topic. Frankly, I am still don't understand the network setup well, but what I concern more is, it works. :D

The hack that I applied to gain these 2 interfaces in my VM is, I created 2 additional network adapters (bridge adapter), and delete the associated connection via nmcli command.

No comments:

Post a Comment