Hello everybody,
I've noticed a strange behavior on a debian box (with kernel 3.2.58) and I'd like to ask networking experts for an answer...
Let's create the following configuration (you can use "ip addr", it doesn't matter)
Code:
# ifconfig eth0 192.168.150.32 netmask 255.255.255.0
# ifconfig eth0:1 192.168.150.7 netmask 255.255.255.0
Then, try to change the netmaking mask :
Code:
# ifconfig eth0 192.168.150.32 netmask 255.255.255.128
The ip alias (eth0:1) will be dropped..
Here is the "ip monitor" trace :
Code:
3: eth0 inet 192.168.150.7/24 brd 192.168.150.255 scope global secondary eth0:1
local 192.168.150.7 dev eth0 table local proto kernel scope host src 192.168.150.32
192.168.150.34 dev eth0 lladdr 08:00:27:b1:36:e0 STALE
192.168.150.33 dev eth0 lladdr 08:00:27:b1:36:e0 STALE
Deleted 3: eth0 inet 192.168.150.7/24 brd 192.168.150.255 scope global secondary eth0:1
Deleted local 192.168.150.7 dev eth0 table local proto kernel scope host src 192.168.150.32
Deleted 3: eth0 inet 192.168.150.32/24 brd 192.168.150.255 scope global eth0
Deleted 192.168.150.0/24 dev eth0 proto kernel scope link src 192.168.150.32
Deleted broadcast 192.168.150.255 dev eth0 table local proto kernel scope link src 192.168.150.32
Deleted broadcast 192.168.150.0 dev eth0 table local proto kernel scope link src 192.168.150.32
Deleted local 192.168.150.32 dev eth0 table local proto kernel scope host src 192.168.150.32
192.168.150.1 dev eth0 lladdr 84:2b:2b:fd:28:bb NOARP
192.168.150.33 dev eth0 lladdr 08:00:27:b1:36:e0 NOARP
224.0.0.22 dev eth0 lladdr 01:00:5e:00:00:16 NOARP
192.168.150.34 dev eth0 lladdr 08:00:27:b1:36:e0 NOARP
3: eth0 inet 192.168.150.32/25 brd 192.168.150.127 scope global eth0
local 192.168.150.32 dev eth0 table local proto kernel scope host src 192.168.150.32
broadcast 192.168.150.127 dev eth0 table local proto kernel scope link src 192.168.150.32
192.168.150.0/25 dev eth0 proto kernel scope link src 192.168.150.32
broadcast 192.168.150.0 dev eth0 table local proto kernel scope link src 192.168.150.32
I'm not an expert but it seems that the ip alias (eth0:1) is dropped. Note that this behavior doesn't appear with ip configured on two separated subnets.
Can you tell me if this behavior is normal and if there is a way to prevent it ?
Thanks !
Best regards
julien