Re: [CentOS] netmask on aliases overriden by netmask on interface

2019-02-08 Thread Leroy Tennison
Just a cautionary note, if you use snmpd you may start seeing regular "ia_addr 
insert" errors using this approach depending on your version of snmpd and how 
reporting is configured.


Leroy Tennison
Network Information/Cyber Security Specialist
E: le...@datavoiceint.com
2220 Bush Dr
McKinney, Texas
75070
www.datavoiceint.com
This message has been sent on behalf
of a company that is part of the Harris Operating Group of
Constellation Software Inc. These companies are listed
here
.
If you prefer not to be contacted by Harris
Operating Group
please notify us
.
This message is intended exclusively for the
individual or entity to which it is addressed. This communication
may contain information that is proprietary, privileged or
confidential or otherwise legally exempt from disclosure. If you are
not the named addressee, you are not authorized to read, print,
retain, copy or disseminate this message or any part of it. If you
have received this message in error, please notify the sender
immediately by e-mail and delete all copies of the
message.


From: CentOS  on behalf of Ulf Volmer 

Sent: Friday, February 8, 2019 11:48 AM
To: centos@centos.org
Subject: [EXTERNAL] Re: [CentOS] netmask on aliases overriden by netmask on 
interface

On 08.02.19 15:08, James B. Byrne via CentOS wrote:

> # 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:feae-feb0
>
> 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?

Interface aliases are evil from my point of view. I recommend to
configure the ip directly to the interface.

#ifcfg-eth2
[...]
IPADDR=192.168.200.1
NETMASK=255.255.255.0
IPADDR2=192.168.201.1
NETMASK2=255.255.255.192

ip addr show dev eth2
4: eth2:  mtu 1500 qdisc pfifo_fast
state UP qlen 1000
link/ether 08:00:27:b0:c5:7c brd ff:ff:ff:ff:ff:ff
inet 192.168.200.1/24 brd 192.168.200.255 scope global eth2
inet 192.168.201.1/26 brd 192.168.201.63 scope global eth2
inet6 fe80::a00:27ff:feb0:c57c/64 scope link
   valid_lft forever preferred_lft forever

Best regards
Ulf
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] netmask on aliases overriden by netmask on interface

2019-02-08 Thread Ulf Volmer
On 08.02.19 15:08, James B. Byrne via CentOS wrote:

> # 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:feae-feb0
>
> 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?

Interface aliases are evil from my point of view. I recommend to
configure the ip directly to the interface.

#ifcfg-eth2
[...]
IPADDR=192.168.200.1
NETMASK=255.255.255.0
IPADDR2=192.168.201.1
NETMASK2=255.255.255.192

ip addr show dev eth2
4: eth2:  mtu 1500 qdisc pfifo_fast
state UP qlen 1000
link/ether 08:00:27:b0:c5:7c brd ff:ff:ff:ff:ff:ff
inet 192.168.200.1/24 brd 192.168.200.255 scope global eth2
inet 192.168.201.1/26 brd 192.168.201.63 scope global eth2
inet6 fe80::a00:27ff:feb0:c57c/64 scope link
   valid_lft forever preferred_lft forever

Best regards
Ulf
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] netmask on aliases overriden by netmask on interface

2019-02-08 Thread James B. Byrne via CentOS
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:feae-feb0

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. Byrnemailto:byrn...@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

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos