[prev in list] [next in list] [prev in thread] [next in thread] 

List:       keepalived-announce
Subject:    Re: [Keepalived-announce] keepalived config is not working correctly with virtualbox vms
From:       Richard Scott <keepalived-announce () pointb ! co ! uk>
Date:       2013-04-15 11:18:13
Message-ID: 371d830de9abbf6a0cc3ff2625b7ae2d () pointb ! co ! uk
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


 

Hi, 

I don't think your priority's are far enough apart. This is in
the Man page: 

# for electing MASTER, highest priority wins.
# to be
MASTER, make 50 more than other machines.
priority 100 

Try changing
the 2nd VM to have a priority of 200? 

Rich 

On 15/04/2013 09:45, Paul
Rüder wrote: 

> Hi, 
> 
> my keepalived configuration is not working
correctly (i don't know if this is really a virtualbox issue). 
> 
> I
have two virtual testing machines (virtualbox) to try some things out
with keepalived/vrrp. Bot can ping each other flawlessly (internal
virtualbox network). 
> 
> VM 1 (MASTER): 
> 
> eth0: Management 
>
eth1: 192.168.2.1/24 [3] 
> eth2: 192.168.2.2/24 [4] 
> 
>
keepalived.conf: 
> 
> vrrp_instance test { 
> state MASTER 
> interface
eth1 
> track_interface { 
> eth2 
> } 
> virtual_router_id 1 
>
priority 101 
> advert_int 1 
> authentication { 
> auth_type PASS 
>
auth_pass 1111 
> } 
> virtual_ipaddress { 
> 192.168.3.1/24 [5] dev
eth1 
> 192.168.3.2/24 [6] dev eth2 
> } 
> } 
> 
> tcpdump on eth1: 
>

> 12:44:54.720119 IP 192.168.2.1 > vrrp.mcast.net [7]: VRRPv2,
Advertisement, vrid 1, prio 101, authtype simple, intvl 1s, length 24 
>
12:44:55.049465 IP 192.168.2.3 > vrrp.mcast.net [7]: VRRPv2,
Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24 
>

> tcpdump on eth2: 
> 
> 12:46:21.082264 IP 192.168.2.1 >
vrrp.mcast.net [7]: VRRPv2, Advertisement, vrid 1, prio 101, authtype
simple, intvl 1s, length 24 
> 12:46:21.494239 IP 192.168.2.3 >
vrrp.mcast.net [7]: VRRPv2, Advertisement, vrid 1, prio 100, authtype
simple, intvl 1s, length 24 
> 
> VM 2 (BACKUP): 
> 
> eth0: Management

> eth1: 192.168.2.3/24 [8] 
> eth2: 192.168.2.4/24 [9] 
> 
>
keepalived.conf: 
> 
> vrrp_instance test { 
> state BACKUP 
> interface
eth1 
> track_interface { 
> eth2 
> } 
> virtual_router_id 1 
>
priority 100 
> advert_int 1 
> authentication { 
> auth_type PASS 
>
auth_pass 1111 
> } 
> virtual_ipaddress { 
> 192.168.3.1/24 [5] dev
eth1 
> 192.168.3.2/24 [6] dev eth2 
> } 
> } 
> 
> tcpdump on eth1: 
>

> 12:53:12.265456 IP 192.168.2.1 > vrrp.mcast.net [7]: VRRPv2,
Advertisement, vrid 1, prio 101, authtype simple, intvl 1s, length 24 
>
12:53:12.670635 IP 192.168.2.3 > vrrp.mcast.net [7]: VRRPv2,
Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24 
>

> tcpdump on eth2: 
> 
> 12:53:34.397374 IP 192.168.2.1 >
vrrp.mcast.net [7]: VRRPv2, Advertisement, vrid 1, prio 101, authtype
simple, intvl 1s, length 24 
> 12:53:34.787327 IP 192.168.2.3 >
vrrp.mcast.net [7]: VRRPv2, Advertisement, vrid 1, prio 100, authtype
simple, intvl 1s, length 24 
> 
> After starting keepalived on VM 2, it
transits instantly to the master state, which shouldnt be. 
> 
> Why is
this happening? Any help is very appreciated! 
> 
> Regards, 
> 
> Paul
Rüder 
> 
>
------------------------------------------------------------------------------
>
Precog is a next-generation analytics platform capable of advanced
>
analytics on semi-structured data. The platform includes APIs for
building
> apps and a phenomenal toolset for data science. Developers
can use
> our toolset for easy data analysis & visualization. Get a free
account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
[1]
> 
> _______________________________________________
>
Keepalived-announce mailing list
>
Keepalived-announce@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/keepalived-announce [2]




Links:
------
[1]
http://www2.precog.com/precogplatform/slashdotnewsletter
[2]
https://lists.sourceforge.net/lists/listinfo/keepalived-announce
[3]
http://192.168.2.1/24
[4] http://192.168.2.2/24
[5]
http://192.168.3.1/24
[6] http://192.168.3.2/24
[7]
http://vrrp.mcast.net
[8] http://192.168.2.3/24
[9]
http://192.168.2.4/24

[Attachment #5 (unknown)]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hi,</p>
<p>I don't think your priority's are far enough apart. This is in the Man page:</p>
<p># for electing MASTER, highest priority wins.<br /># to be MASTER, make 50 more \
than other machines.<br />priority 100</p> <p>Try changing the 2nd VM to have a \
priority of 200?</p> <p>Rich</p>
<p>&nbsp;</p>
<p>On 15/04/2013 09:45, Paul R&uuml;der wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; \
margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta \
ignored --> <div dir="ltr">
<div>Hi,</div>
<div>&nbsp;</div>
<div>my keepalived configuration is not working correctly (i don't know if this is \
really a virtualbox issue).</div> <div>&nbsp;</div>
<div>I have two virtual testing machines (virtualbox) to try some things out with \
keepalived/vrrp. Bot can ping each other flawlessly (internal virtualbox \
network).</div> <div>&nbsp;</div>
<div>VM 1 (MASTER):</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; eth0: Management</div>
<div>&nbsp; &nbsp; eth1: <a href="http://192.168.2.1/24">192.168.2.1/24</a></div>
<div>&nbsp; &nbsp; eth2: <a href="http://192.168.2.2/24">192.168.2.2/24</a></div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; keepalived.conf:</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; vrrp_instance test {</div>
<div>&nbsp; &nbsp; state MASTER</div>
<div>&nbsp; &nbsp; interface eth1</div>
<div>&nbsp; &nbsp; track_interface {</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eth2</div>
<div>&nbsp; &nbsp; }</div>
<div>&nbsp; &nbsp; virtual_router_id 1</div>
<div>&nbsp; &nbsp; priority 101</div>
<div>&nbsp; &nbsp; advert_int 1</div>
<div>&nbsp; &nbsp; authentication {</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; auth_type PASS</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; auth_pass 1111</div>
<div>&nbsp; &nbsp; }</div>
<div>&nbsp; &nbsp; virtual_ipaddress {</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a \
href="http://192.168.3.1/24">192.168.3.1/24</a> dev eth1</div> <div>&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://192.168.3.2/24">192.168.3.2/24</a> dev \
eth2</div> <div>&nbsp; &nbsp; }</div>
<div>&nbsp; &nbsp; }</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; tcpdump on eth1:</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; 12:44:54.720119 IP 192.168.2.1 &gt; <a \
href="http://vrrp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio \
101, authtype simple, intvl 1s, length 24</div> <div>&nbsp; &nbsp; 12:44:55.049465 IP \
192.168.2.3 &gt; <a href="http://vrrp.mcast.net">vrrp.mcast.net</a>: VRRPv2, \
Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24</div> \
<div>&nbsp;</div> <div>&nbsp; &nbsp; tcpdump on eth2:</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; 12:46:21.082264 IP 192.168.2.1 &gt; <a \
href="http://vrrp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio \
101, authtype simple, intvl 1s, length 24</div> <div>&nbsp; &nbsp; 12:46:21.494239 IP \
192.168.2.3 &gt; <a href="http://vrrp.mcast.net">vrrp.mcast.net</a>: VRRPv2, \
Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24</div> \
<div>&nbsp;</div> <div>&nbsp;</div>
<div>VM 2 (BACKUP):</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; eth0: Management</div>
<div>&nbsp; &nbsp; eth1: <a href="http://192.168.2.3/24">192.168.2.3/24</a></div>
<div>&nbsp; &nbsp; eth2: <a href="http://192.168.2.4/24">192.168.2.4/24</a></div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; keepalived.conf:</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; vrrp_instance test {</div>
<div>&nbsp; &nbsp; state BACKUP</div>
<div>&nbsp; &nbsp; interface eth1</div>
<div>&nbsp; &nbsp; track_interface {</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eth2</div>
<div>&nbsp; &nbsp; }</div>
<div>&nbsp; &nbsp; virtual_router_id 1</div>
<div>&nbsp; &nbsp; priority 100</div>
<div>&nbsp; &nbsp; advert_int 1</div>
<div>&nbsp; &nbsp; authentication {</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; auth_type PASS</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; auth_pass 1111</div>
<div>&nbsp; &nbsp; }</div>
<div>&nbsp; &nbsp; virtual_ipaddress {</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a \
href="http://192.168.3.1/24">192.168.3.1/24</a> dev eth1</div> <div>&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://192.168.3.2/24">192.168.3.2/24</a> dev \
eth2</div> <div>&nbsp; &nbsp; }</div>
<div>&nbsp; &nbsp; }</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; tcpdump on eth1:</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; 12:53:12.265456 IP 192.168.2.1 &gt; <a \
href="http://vrrp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio \
101, authtype simple, intvl 1s, length 24</div> <div>&nbsp; &nbsp; 12:53:12.670635 IP \
192.168.2.3 &gt; <a href="http://vrrp.mcast.net">vrrp.mcast.net</a>: VRRPv2, \
Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24</div> \
<div>&nbsp;</div> <div>&nbsp; &nbsp; tcpdump on eth2:</div>
<div>&nbsp;</div>
<div>&nbsp; &nbsp; 12:53:34.397374 IP 192.168.2.1 &gt; <a \
href="http://vrrp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio \
101, authtype simple, intvl 1s, length 24</div> <div>&nbsp; &nbsp; 12:53:34.787327 IP \
192.168.2.3 &gt; <a href="http://vrrp.mcast.net">vrrp.mcast.net</a>: VRRPv2, \
Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24</div> \
<div>&nbsp;</div> <div>After starting keepalived on VM 2, it transits instantly to \
the master state, which shouldnt be.&nbsp;</div> <div>&nbsp;</div>
<div>Why is this happening? Any help is very appreciated!</div>
<div>&nbsp;</div>
<div>Regards,</div>
<div>&nbsp;</div>
<div>Paul R&uuml;der</div>
</div>
<br />
<pre>------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis &amp; visualization. Get a free account!
<a href="http://www2.precog.com/precogplatform/slashdotnewsletter">http://www2.precog.com/precogplatform/slashdotnewsletter</a>
 </pre>
<br />
<pre>_______________________________________________
Keepalived-announce mailing list
<a href="mailto:Keepalived-announce@lists.sourceforge.net">Keepalived-announce@lists.sourceforge.net</a>
 <a href="https://lists.sourceforge.net/lists/listinfo/keepalived-announce">https://lists.sourceforge.net/lists/listinfo/keepalived-announce</a>
 </pre>
</blockquote>
<p>&nbsp;</p>
</body></html>



------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

_______________________________________________
Keepalived-announce mailing list
Keepalived-announce@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/keepalived-announce


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic