LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Ldirector and swtich caching

To: "'LinuxVirtualServer.org users mailing list.'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Ldirector and swtich caching
From: "Kit Gerrits" <kitgerrits@xxxxxxxxx>
Date: Fri, 16 Jan 2009 09:38:23 +0100
For what it is worth, this approach should work.
Because you have 2 separate Network Cards with 2 separate MAC addresses,
sharing 1 IP alternately.

Switches are only Layer 2 devices, they don't usually care that IP is
associated with what MAC address.
They just want to know what port that MAC address is connected to.
They also don't need to be -told- where a MAC address is, they tend to
figure it out for themselves.
Simply sending a ping (which contains the MAC of the sender), shows the
switch the location of the MAC address and 

Routers, on the other hand, look up (and save) the MAC address for the
destination IP for an incoming packet.
It's the router you need to inform of the MAC address change.

You can either inform the router of the new MAC address (by pinging it), 
  or you can try 'spoofing' the MAC address of the primary machine,
In which case the ping will update the MAC table of the switch.


Just my 2c,

Kit

-----Original Message-----
From: lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Graeme Fowler
Sent: donderdag 15 januari 2009 17:50
To: LinuxVirtualServer.org users mailing list.
Subject: Re: [lvs-users] Ldirector and swtich caching

Hi

On Thu, 2009-01-15 at 11:37 -0500, Brandon Hilkert wrote:
> Well, we haven't gotten to the heartbeat point yet. Right now, we have a
dedicated "backup" machine with exact same configuration both from a network
standpoint and ldirectord config that's in a powered off state. The hope for
the time being if something were to happen to the main Ldirector, was to
turn it off and power on the "backup" machine. In this case, I can see how
ARP issues would arise. Any thoughts on this situation?

When the machine brings up the VIP, you have to tell the router
*somehow* that the VIP has changed to a new MAC address. The easiest way to
do this is to use ping:

ping -n -w 10 -I $VIP $router_ip

In other words:
  -n : don't resolve names
  -w : run for no more than this many seconds regardless of results
  -I : bind to this interface

That *should*, ideally, tell the router that the MAC has changed. Note
however that you should only use this for a gateway on the same LAN; if
you;re doing anything clever (ie. with multiple routers) it may not work at
all. Also if you've got more than one upstream router (such as an HSRP
setup) then you'll need to ping all participating devices.

HTH

Graeme

PS It's easier to use heartbeat or keepalived for this, trust me!


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx Send
requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

<Prev in Thread] Current Thread [Next in Thread>