This article is dedicated to RHEL8/9 - AlmaLinux 8/9.
After you make changes to the network interface configuration, it's crucial to restart the network, or in our case, the configured interface, for the changes to take effect.
Prerequisites
- Server root access is required.
- We'll use NetworkManager
nmcli
tool (included by default)
Note: cPanel servers on Almalinux 8 don't have access to NetworkManager. - Assuming your interface name is eno1. Replace eno1 with your interface name.
You should follow the steps below:
- Reload the connection
nmcli connection reload
- Restart the interface eno1
nmcli connection up ifname eno1
Replace eno1 with your interface name.
- OR -
nmcli device down eno1;nmcli device up eno1
Replace eno1 with your interface name. - Review the updated changes.
How to know the network interface/device name?
The interface name is different on each server, but you can easily know your interface name with NetworkManager cli tool.
To show active connections:
nmcli connection show
You'll find the Device name and connection UUID in the output.
You can bring a connection Up/Down using the UUID not only the device or interface name.
You can do so with the following command:
nmcli connection up {UUID}
nmcli connection down {UUID}
Replace {UUID}
with the actual connection UUID.
To show configured interfaces with detailed information:
nmcli device show
This will show detailed information about the active devices/interfaces with assigned IPs.
To show the device/interface status
nmcli device status