restart network RHEL 8/Almalinux 8

You can restart the network on RHEL 8 as follows:

nmcli networking off; nmcli networking on

To restart NetworkManager service

sudo systemctl restart NetworkManager

To restart an individual network interface, you can use the following (where eth0 is the interface name)

ifdown eth0; ifup eth0