Setting an static IP address in RHEL (the old way)

In RHEL8, you use NetworkManager or NMCLI to configure the networking, but in RHEL7 and before, you had to do it a different way. In this post I show you which files you need to configure to be able set a static IP in REHL7. 1) Edit the network card configuration file, which will be something like the following /etc/sysconfig/network-scripts/ifcfg-ens33 2) Add the network mask, and IP address. Remove any reference to DHCP that may or may not be in there. Like this: IPADDR= NETMASK= 3) Edit the network configuration file /etc/sysconfig/network 4) Add a line configuring the gateway, like this GATEWAY= 5) restart the network systemctl restart network.service NOTE : This assumes that the NetworkManager.service has been stopped and disabled.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer