[CentOS] Keepalived vrrp problem

Wed Sep 30 18:00:40 UTC 2015
Tim Dunphy <bluethundr at gmail.com>

Guys,

 I actually found a solution to this. After much googling I was able to
come up with this:

vrrp_instance VI_1 {
interface eth1
state MASTER
virtual_router_id 51
priority 101                   # 101 on master, 100 on backup
*dont_track_primary*
vrrp_unicast_bind 10.40.116.30   # Internal IP of this machine
vrrp_unicast_peer 10.40.116.31   # Internal IP of peer
virtual_ipaddress {
 10.40.116.34
 }

The key to getting this to work was to add the entry you see in bold above
to the config. dont_track_primary. I'm not sure if that's the best way to
solve this problem. But I know that adding that line allowed me to do what
I needed to do.  After that I could ping the virtual address.

Thanks for all the suggestions.

Tim

On Tue, Sep 29, 2015 at 4:24 PM, Marcelo Ricardo Leitner <
marcelo.leitner at gmail.com> wrote:

> Em 29-09-2015 15:03, Gordon Messmer escreveu:
>
>> On 09/29/2015 09:14 AM, Tim Dunphy wrote:
>>
>>> And if I do an ifconfig command I see no evidence of an eth1 existing.
>>>
>>
>> "ifconfig -a" will show you all of your interfaces.
>>
>
> Maybe there is a confusion here. Sounds like Tim thought keepalived would
> create that eth1, like a tunnel interface, but it won't. You have to
> specify an interface that actually exists so that the VIP address will be
> added as a secondary address to ip to that interface.
>
> HTH
>
>   Marcelo
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B