A brief knowledge of Network Management in RHEL8

In RHEL8, Network is managed by NetworkManager daemon. We can 
use it to configure and manage networks in system.

NetworkManager package is preinstalled in RHEL8.

nmcli tool can be used to configure networks using command line.
nmtui is text-based user interface for NetworkManager.

You can still use ifcfg files to configure network
configurations. 

Service “NetworkManager” is used for starting/stopping
NetworkManager. You can see status using below command as
well:
# systemctl is-active NetworkManager
# systemctl is-enabled NetworkManager
# systemctl status NetworkManager
# systemctl list-unit-files | grep NetworkManager
Network Manager configurations file is 
“/etc/NetworkManager/NetworkManager.conf” and some more
configurations can be found at

“/etc/NetworkManager/”.

NetworkManager makes Network Management easy.

Network Scripts are disabled in RHEL8 if you want you can still
use by installing “network-scripts” packages.
nmcli: nmcli is command line tool for managing Network Manager. 
You can manage network configurations using this tool like
configuring IP Address,
route details, etc.
# nmcli –version			(To check version)
# nmcli general			(To get general status)
# nmcli -t  -f RUNNING  general		(It will give you current status of NetworkManager)
# nmcli dev status			(It will show all device status)
# nmcli device show			(It will show all device in details)
# nmcli connection			(It will show all available connections)
Or
# nmcli connection show
# nmcli connection show ens192		(It will show all configured values to ens192 interface)
# nmcli general hostname	(It will print current hostname of server)
# nmcli general hostname training-vm		(It will change hostname to new name)
# nmcli -t device			(It will show you details in small details)
# nmcli con add con-name eth2 type ethernet ifname eth2 ipv4.method auto	(It will add new interface named ens193, you can check with “con” command)
More Network related commands:
# ifconfig 				(It will print current IP address configurations)
# ifconfig –a			(It will show you all network interfaace)
# ifconfig eth1 10.81.68.160 netmask 255.255.255.0	(It will configure IP address on interface eth1)
# ifup eth0				(It will up the interface)
# ip a				    (It will show current IP details)
Or	
# ip addr show
# ip addr add 10.81.68.160 dev eth1		(It will configure IP address on interface eth1)
# ip addr del 10.81.68.160/24 dev eth1	(It will delete IP address on interface eth1)
# ip neigh				(It will show current network table in kernel)
# ifup eth0				(It will up the network)
# ifdown eth0			(It will down the network)
# ethtool ens192		(It will show you network interface controller parameters, you can use ethtool to change those as well)
# route				    (It will show you route details)
# route add default gw <gateway-ip>		(It will add default gateway)
# route add -net <network ip/cidr> gw <gateway ip> <interface>	(Add route to routing table)
# route del -net <network ip/cidr>		(It will delete route)
# netstat –r			(It will show you routing table)

Leave a Reply

Your email address will not be published. Required fields are marked *