Has anyone seen the following problem, is there a fix?

I am setting up an HA system on CentOS were a single eth0 interface will 
be trunked to
multiple VLANs by setting up eth0.<vlan-number>, and on top of these I 
will use the HA
software to add/removed IP's (eth0.<vlan-number>:<alias>). Everything 
works fine until
I need to remove the first alias IP set up on the interface ... removing 
this removes
the other entries as well!

I see the same problem whether I use 'ifconfig' or 'ip'. Here is simple 
scenario using
'ifconfig' :-

    * Add three IP's to VLAN 666 :-

        # ifconfig eth0.666:0 AAA.AAA.AAA.164 netmask 255.255.252.0 up
        # ifconfig eth0.666:1 AAA.AAA.AAA.163 netmask 255.255.252.0 up
        # ifconfig eth0.666:2 AAA.AAA.AAA.162 netmask 255.255.252.0 up

    * If I remove eth0.666:1 and/or eth0.666:2, E.G. :-

        # ifconfig eth0.666:1 down

      then all is well, the other aliases remain as expected.

    * HOWEVER, if I remove eth0.666:0 :-

        # ifconfig eth0.666:0 down

      then eth0.666:1 and eth0.666:2 ARE ALSO REMOVED!

[I do not believe this is the same problem as in the FAQ, "Every time my 
machine releases
 an IP alias, it loses the whole interface (i.e. eth0)! How do I fix 
this?" ...
 I have the most recent version of CentOS I can 'yum update' and 
adding/removing
 aliases defined as eth0:N (no vlan) works perfectly. Apologies if I 
need an even more
 recent version of net-tools.]

The same thing happens if I start at :1 rather than :0 - removing the 
first alias (:1)
removes the others.

I can not fix the problem by adding a 'dummy' IP from another network 
range as the first
alias so that I never need to remove the first alias (not that I 
actually wanted to do this,
it was just a test). E.G. :-

        # ifconfig eth0.666:0 192.168.1.1 netmask 255.255.252.0 up
        # ifconfig eth0.666:1 AAA.AAA.AAA.164 netmask 255.255.252.0 up
        # ifconfig eth0.666:2 AAA.AAA.AAA.163 netmask 255.255.252.0 up
        # ifconfig eth0.666:3 AAA.AAA.AAA.162 netmask 255.255.252.0 up

Taking down eth0.666:1 ALSO removes :2 and :3, leaving behind eth0.666:0 
! ... so, the
problem seems to be sensitive to the address ranges used - removing the 
first alias for
a range removes the others in that range, but not IP's from other ranges.

At the present time my only solution is to change the IPaddr script to 
call another
script when taking down an interface - this script checks to see if I am 
removing the
first alias in a VLAN setup, and if I am, re-creates the interface 
definitions that are
needed.

If there is a simple fix, yippee; if not, who should I contact to see if 
I can get a
fix put in place at some stage (yes, I know this is then not an issue 
for the HA group
to solve).

Finally, here is a more complete example for those interested :-

[ Basic system information ]

    server# cat /etc/redhat-release
    CentOS release 5.5 (Final)

    server# uname -a
    Linux server 2.6.18-194.17.4.el5 #1 SMP Mon Oct 25 15:51:07 EDT 2010 
i686 i686 i386 GNU/Linux

    server# yum list | grep net-tools
    net-tools.i386                           1.60-81.el5                 
installed  

[ Trunked VLAN 666 has been created on eth0. In this case eth0 has an 
address in the
  range I will be adding aliases to; but I believe I saw the same 
problem even if
  eth0 did not have an address associated with it at all. ]

    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...
    ...

[ All looks well, add 3 IP's to eth0.666 ]

    server# ifconfig eth0.666:0 AAA.AAA.AAA.164 netmask 255.255.252.0 up
    server# ifconfig eth0.666:1 AAA.AAA.AAA.163 netmask 255.255.252.0 up
    server# ifconfig eth0.666:2 AAA.AAA.AAA.162 netmask 255.255.252.0 up
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...

    eth0.666:0 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.164  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0.666:1 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.163  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0.666:2 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.162  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...

[ All OK. Remove eth0.666:0 ]

    server# ifconfig eth0.666:0 down
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...
    ...

[ *** Ugh *** eth0.666:1 and eth0.666:2 where removed along with 
eth0.666:0 !!!! ]
[             I promise that I did not just delete them from the listing 
:-) ]

[ Add the 3 IP's back to eth0.666 ]

    server# ifconfig eth0.666:0 AAA.AAA.AAA.164 netmask 255.255.252.0 up
    server# ifconfig eth0.666:1 AAA.AAA.AAA.163 netmask 255.255.252.0 up
    server# ifconfig eth0.666:2 AAA.AAA.AAA.162 netmask 255.255.252.0 up
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...

    eth0.666:0 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.164  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0.666:1 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.163  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0.666:2 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.162  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...

[ Remove eth0.666:1 rather than eth0.666:0 this time ]

    server# ifconfig eth0.666:1 down
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...

    eth0.666:0 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.164  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0.666:2 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.162  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...

[ Well look at that, eth0.666:0 and eth0.666:2 are still there - that 
works ]

[ Remove eth0.666:0 ]

    server# ifconfig eth0.666:0 down
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...
    ...

[ *** Ugh *** As before, removing eth0.666:0 has removed other entries, 
in this case eth0.666:2 ]

[ Create a 'dummy' address on tne interface to check whether having 
something else ]
[ as the first entry 
helps                                                         ]

    server# ifconfig eth0.666:0 192.168.1.1 netmask 255.255.252.0 up
    server# ifconfig eth0.666:1 AAA.AAA.AAA.164 netmask 255.255.252.0 up
    server# ifconfig eth0.666:2 AAA.AAA.AAA.163 netmask 255.255.252.0 up
    server# ifconfig eth0.666:3 AAA.AAA.AAA.162 netmask 255.255.252.0 up
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...

    eth0.666:0 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.1.1  Bcast:192.168.3.255  Mask:255.255.252.0
          ...

    eth0.666:1 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.164  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0.666:2 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.163  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0.666:3 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.162  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    server#
    server# ifconfig eth0.666:1 down
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...

    eth0.666:0 Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.1.1  Bcast:192.168.3.255  Mask:255.255.252.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    ...

[ *** No help *** The 'dummy' remained, but removing the interface with 
the first ]
[     AAA.AAA.AAA.x address removed the rest 
:-(                                  ]

[ Finally, just to prove that everything works as expected on eth0:N 
interface aliases ...]

    server#
    server# ifconfig eth0.666:0 down
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...
    ...
    server#
    server# ifconfig eth0:0 AAA.AAA.AAA.164 netmask 255.255.252.0 up
    server# ifconfig eth0:1 AAA.AAA.AAA.163 netmask 255.255.252.0 up
    server# ifconfig eth0:2 AAA.AAA.AAA.162 netmask 255.255.252.0 up
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...
    ...
    eth0:0    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.164  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0:1    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.163  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0:2    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.162  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    server#
    server# ifconfig eth0:0 down
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...
    ...
    eth0:1    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.163  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...

    eth0:2    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.162  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...

[ So removing eth0:0 did not remove eth0:1 and eth0:2 - works properly! ]

    server# ifconfig eth0:2 down
    server#
    server# ifconfig
    ...
    eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.63  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    eth0.666  Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet6 addr: ...
          ...
    ...
    eth0:1    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:AAA.AAA.AAA.163  Bcast:bbb.bbb.bbb.255  
Mask:255.255.252.0
          ...
    ...
    server#
    server# ifconfig eth0:1 down
    server#

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to