LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] LVS-DR vs. LVS-NAT

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] LVS-DR vs. LVS-NAT
From: Andreas Altenburg <andreas@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Feb 2008 11:36:58 +0100
OK, again, my config. 1.2.3.4 is the VIP (external IP such as  
83.134.81.12)

# The loopback network interface
auto lo
iface lo inet loopback
         address 213.203.208.20
         netmask 255.255.255.255
         broadcast 213.203.208.20
         up sysctl -p

auto eth1
iface eth1 inet static
         address 172.16.10.5
         netmask 255.255.255.0
         network 172.16.10.0
         broadcast 172.16.10.255
         gateway 172.16.10.21


With this config, the real-server uses the director as a gateway  
(would bei LVS-NAT, right?). Now I would like the real server not to  
use LVS-NAT but answer the requests directly to the clients. So I  
guess this would be correct:

# The loopback network interface
auto lo
iface lo inet loopback
         address 213.203.208.20
         netmask 255.255.255.255
         broadcast 213.203.208.20
         gateway 213.203.208.2 # the public IP of the director
         up sysctl -p

auto eth1
iface eth1 inet static
         address 172.16.10.5
         netmask 255.255.255.0
         network 172.16.10.0
         broadcast 172.16.10.255

But this config won't work. Only if I add auto eth0 with a public IP  
(but this is exactly the situation that I do not want).


Am 06.02.2008 um 11:27 schrieb Graeme Fowler:

> On Wed, 2008-02-06 at 11:19 +0100, Andreas Altenburg wrote:
>> Yes, i understand. But another question: I have problems configuring
>> the realserver with one internal (real) IP and the VIP on the lo
>> interface (with the director as the gateway of the lo):
>
> OK, step-by-step:
>
>> ifconfig eth1 192.168.0.2 netmask 255.255.255.0 broadcast
>> 192.168.0.255 up
>
> Fine.
>
>> route add -net 192.168.0.0 netmask 255.255.255.0 dev eth1
>
> Fine.
>
>> ifconfig lo:0 <VIP> netmask 255.255.255.255 broadcast <VIP> up
>
> Fine.
>
>> route add -host <VIP> dev lo:0
>
> You don't need this. If the VIP is already local, no route needs
> configuring.
>
> However, I don't see any errors, so I don't understand the problem.
>
>> Where is my mistake? I do not want the real server to have a public  
>> IP
>> in the same subnet as the VIP on eth0. My VIP is a public IP. Hope,
>> you will understand my problem ;-)
>
> I'm not sure I do, no.
>
> For -DR, the realserver _needs_ to have the VIP on a loopback (or  
> other)
> alias or it won't be able to create response packets.
>
> Graeme
>
>
> _______________________________________________
> 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>