LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: RE: lvs_dr and mysql

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: RE: lvs_dr and mysql
From: "James Northcott" <jnorthcott@xxxxxxxx>
Date: Fri, 14 Sep 2001 07:39:46 -0500
> >To fix this, you need to set up your routing so that the 
> source IP will
> >be set to the RIP when contacting the MySQL server.  You can do this
> >with the iproute2 tools.  Just add a route to the MySQL 
> server on each
> >of your RS's that sets the source IP to the RIP.
> >
> >Note that for this to work, the RIP's must be public (at least to the
> >MySQL server).  Yours seem to be, judging by the IP's that 
> you've used.
> >
> Can you say a detail and give me a example? 
> Thanks a lot!!!
> (my mysql server at machine with kernel 2.4.x)
> 

You can get iproute2 from http://defiant.coinet.com/iproute2/, there is
also some documentation here.

Now for an example, say that your realserver has RIP, and your MySQL
server is at MIP, and your gateway to get to the MySQL server is GIP,
and your gateway is connected to eth1.  Then, you can do this:

ip route add MIP/32 dev eth1 via GIP src RIP

This will tell the kernel to route all traffic to MIP out eth1, and
through gateway GIP, and choose RIP as the source address.  That way,
your MySQL server will reply to the RIP.


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