duplicate routes after switching keepalived nodes

Alexey Litvinenko <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <CAKydpoaDYNwhzQitdYfdW3bNOtY4VBuT1vbZbEZU-nE91M70eQ@mail.gmail.com>
Hello.

I've installed two nodes with keepalived under ubuntu 14.04
There is a pair of network interfaces switching (because it's gate) on each
of this nodes and "use_vmac" is used.

The problem is that when node switches to the master state and sets shared
IPs for vrrp.1 and vrrp.2, this IPs are still not available for packaging
exchange. And there are some routes through vrrp.1 and vrrp.2, which
exactly duplicate already existing routes through real ethX,  added on the
Master.
Here is a keepalived config and output "route -n" of one of the nodes in
Backup state and after switching to the Master

First node
192.168.160.25 - eth0
1.2.3.4 - eth1

Second node
192.168.160.26 - eth0
1.2.3.5 - eth1

Shared IPs
192.168.160.27 - shared IP for interface vrrp.1 on eth0
1.2.3.6 - shared IP for vrrp.2 on eth1

Keepalived config (the same on both nodes):

global_defs {
   notification_email {
     [email protected]
     [email protected]
   }
   notification_email_from [email protected]
   smtp_server 192.168.160.5
   smtp_connect_timeout 30
   router_id LVS_DEVEL
}
vrrp_sync_group VG1 {
        group {
            VI_INTERNAL
            VI_PROVIDER
        }
}

vrrp_script check_prov_gate {
        script "/bin/ping -c 1 -w 1 -I eth1 1.2.3.3"
        interval 5
        fall 1
}

vrrp_instance VI_INTERNAL {
        state BACKUP
        interface eth0
        virtual_router_id 1
        use_vmac
        vmac_xmit_base
        priority 100
        advert_int 1
        nopreempt
        authentication {
            auth_type PASS
            auth_pass 123456
        }
        track_script {
            check_prov_gate
        }
        virtual_ipaddress {
                192.168.160.27/24
        }
        notify_master "/usr/local/bin/vmac_tweak.sh 1"
}

vrrp_instance VI_PROVIDER {
        state BACKUP
        interface eth1
        virtual_router_id 2
        use_vmac
        vmac_xmit_base
        priority 100
        advert_int 1
        nopreempt
        authentication {
            auth_type PASS
            auth_pass 123456
        }
        track_script {
            check_prov_gate
        }
        virtual_ipaddress {
                1.2.3.6/29
        }
        notify_master "/usr/local/bin/vmac_tweak.sh 2"
}

virtual_server 192.168.160.27 {
    delay_loop 5
    lb_algo wrr
    lb_kind DR
    persistence_timeout 50
    protocol TCP

    real_server 192.168.160.25 {
        inhibit_on_failure
        weight 1
    }

    real_server 192.168.160.26 {
        inhibit_on_failure
        weight 11111
    }
}

Output "route -n" on first node in Backup state:
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
0.0.0.0             1.2.3.3         0.0.0.0                 UG    0
0        0 eth1
1.2.3.0             0.0.0.0         255.255.255.248   U      0
0        0 eth1
192.168.160.0   0.0.0.0         255.255.255.0      U      0      0        0
eth0


And after switching to Master state:
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
0.0.0.0            1.2.3.3             0.0.0.0            UG     0
0        0 eth1
1.2.3.0             0.0.0.0         255.255.255.248 U       0      0
0 eth1
*1.2.3.0             0.0.0.0         255.255.255.248 U       0
0        0 vrrp.2*
192.168.160.0   0.0.0.0         255.255.255.0    U       0      0        0
eth0
*192.168.160.0   0.0.0.0         255.255.255.0    U       0      0        0
vrrp.1*

All changes to sysctl from NOTE_vrrp_vmac.txt
<https://github.com/acassen/keepalived/blob/master/doc/NOTE_vrrp_vmac.txt>
have been made.

Have any idea, why it's going on and how to set up it correctly?

When i switch off "use_vmac", all works fine.

Thanks
--
Best regards,
Alexey

-- 


CONFIDENTIALITY NOTICE: This email and files attached to it are 
confidential. If you are not the intended recipient you are hereby notified 
that using, copying, distributing or taking any action in reliance on the 
contents of this information is strictly prohibited. If you have received 
this email in error please notify the sender and delete this email.

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.