CentOS 7 - Cannot change subnet mask

I just noticed that this CentOS 7 server's subnet mask is 255.255.255.0. It should be 255.255.255.240.

# ip a show ens32 | grep ens32
3: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet 216.1.2.5/24 brd 216.1.2.255 scope global ens32
    inet 216.1.2.4/24 brd 216.1.2.255 scope global secondary ens32
    inet 216.1.2.6/24 brd 216.1.2.255 scope global secondary ens32
    inet 216.1.2.7/24 brd 216.1.2.255 scope global secondary ens32
    inet 216.1.2.8/24 brd 216.1.2.255 scope global secondary ens32
    inet 216.1.2.9/24 brd 216.1.2.255 scope global secondary ens32

I've tried unsuccessfully to change the subnet mask. The ifcfg-ens32 file has the correct prefix (/28). Even after restarting the network and rebooting the server the subnet mask is still 255.255.255.0.

# cat /etc/sysconfig/network-scripts/ifcfg-ens32
TYPE=Ethernet
BOOTPROTO=none
IPV4_FAILURE_FATAL=yes
DEVICE=ens32
ONBOOT=yes
PREFIX=28
GATEWAY=216.1.2.3
IPADDR0=216.1.2.5
IPADDR1=216.1.2.4
IPADDR2=216.1.2.6
IPADDR3=216.1.2.7
IPADDR4=216.1.2.8
IPADDR5=216.1.2.9
DNS1=127.0.0.1
NM_CONTROLLED=no

The IP addresses are static and the NetworkManager is not installed.

How do I fix the subnet mask?


You need to specify the CIDR prefix for each IP address. Right now none of them have it specified.

PREFIX0=28
PREFIX1=28
PREFIX2=28
PREFIX3=28
PREFIX4=28
PREFIX5=28