[CentOS] netmask on aliases overriden by netmask on interface

Fri Feb 8 14:08:11 UTC 2019
James B. Byrne <byrnejb at harte-lyne.ca>

CentOS-6.10

We have a host with the following ifcfg file contents:

BOOTPROTO=none
BROADCAST=""
DEFROUTE=yes
DEVICE=eth1
. . .
GATEWAY=X.Y.Z.234
IPADDR=A.B.C.2
IPV4_FAILURE_FATAL=yes
NAME="LAN Link - eth1"
NETMASK="255.255.255.128"
NETWORK="A.B.C.0"
NM_CONTROLLED=no
ONBOOT=yes
PREFIX=25
TYPE=Ethernet
USERCTL=no

And an aliased ifcfg containing this:

BOOTPROTO="none"
BROADCAST="192.168.8.255"
DEVICE="eth1:192008001"
IPADDR="192.168.8.1"
IPV6INIT="no"
NETMASK="255.255.255.0"
NETWORK="192.168.8.0"
ONPARENT="yes"

However, ifconfig shows this:

# ifconfig eth1:192008001
eth1:192008001 Link encap:Ethernet  HWaddr 00:25:90:61:74:C1
          inet addr:192.168.8.1  Bcast:192.168.8.255 
Mask:255.255.255.128
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:17 Memory:feae0000-feb00000

Which shows that the network mask is determined by the interface mask
and is not overridden by the alias definition.

Is this expected behaviour?  Does this mean that a particular physical
interface cannot belong to more than one network, or at least not to
networks having differing cidr masks?

-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3