Static IP address on CentOS 7

centos7ipstatic-ip

I just installed CentOS minimal and now I am struggling to give my machine a fixed IP address. This is my ifcfg-ens32 file:

DEVICE="ens32"
TYPE="Ethernet"
BOOTPROTO=static
IP_ADDR="192.168.0.243"
NETMASK="255.255.252.0"
NM_CONTROLLED="no"
ONBOOT="yes"
NAME="System ens32"
GATEWAY="192.168.0.1"
HWADDR="00:0C:29:7B:28:24"

when I systemctl restart network.service, I do get to see it enables the interface, but when I run ip a, that interface does not have an IP address.

What am I doing wrong?

Best Answer

Just write IPADDR instead of IP_ADDR in your config file