3

I have a networking issue that I eventually tracked down to an incorrect network prefix setting.

ip addr is reporting that the current prefix is /8 when it should be /24.

However, when I look in /etc/sysconfig/network-scripts/ifcfg-eth0, I see NETMASK correctly set to 255.255.255.0:

[root@ultravps ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Generated by SolusVM
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=xxx.xxx.xx.xxx
GATEWAY=xxx.xxx.xx.x
NETMASK=255.255.255.0

There is no PREFIX setting, and when I add PREFIX, it fixes the issue. Unfortunately, this is inconvenient because whenever SolusVM reconfigures networking, it reverts back to the above config, dropping the PREFIX value.

However, from what I've read, I shouldn't need to specify PREFIX when NETMASK is set.

Why is CentOS 7 ignoring the NETMASK value?

Jeff Widman
  • 2,285
  • 3
  • 22
  • 20

0 Answers0