LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: revserse lvs?

To: "James O'Kane" <jo2y@xxxxxxxxxxxxxxxxx>
Subject: Re: revserse lvs?
Cc: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Fri, 24 Aug 2001 00:30:27 +0000 (GMT)
        Hello,

On Thu, 23 Aug 2001, James O'Kane wrote:

> I'm not sure if LVS can do this, but I was presented with a problem, where
> our office will be away on a planning retreat, but they will still want
> internet access. I'm wondering if I could setup lvs to do load balancing
> over 4 modem lines? It will be LVS-NAT of course, but can you set things
> up so that you have a 0.0.0.0/0 address and send that to the machine at
> the other end of a ppp connection? I'm still thinking out the idea, but
> I'm curious if anyone knows a reason why this will not work at all.

        You can try these steps (the bad case: you have different subnets
on each device, with different ISPs):

- create your basic routes: send the in->out traffic according to the
src address to the right link:

ip rule add prio 100 from MODEM1_NET table modem1
ip rule add prio 100 from MODEM2_NET table modem2
ip rule add prio 100 from MODEM3_NET table modem3
ip rule add prio 100 from MODEM4_NET table modem4

ip route add table modem1 default dev ppp0 src modem1_ip
ip route add table modem2 default dev ppp1 src modem2_ip
ip route add table modem3 default dev ppp2 src modem3_ip
ip route add table modem4 default dev ppp3 src modem4_ip

- load balancing for the masqueraded hosts: they can select any link

# your masqueraded hosts use all lines:
ip rule add prio 200 from 192.168.0.0/24 table masq
ip route add table masq default nexthop dev ppp0 nexthop dev ppp1 \
        nexthop dev ppp2 nexthop dev ppp3

# and finally the routes used from the masquerading to select the masqueraded
# address. Of course, these routes are used from internal spoofers too.

ip rule add prio 300 table 300
ip route add table 300 default dev ppp0 src modem1_ip

ip rule add prio 301 table 301
ip route add table 301 default dev ppp1 src modem2_ip

ip rule add prio 302 table 302
ip route add table 302 default dev ppp2 src modem3_ip

ip rule add prio 303 table 303
ip route add table 303 default dev ppp3 src modem4_ip

After some playing with these commands your internal host will try
to use all your modem lines. This will not be possible for the
masq box itself.

> -james


Regards

--
Julian Anastasov <ja@xxxxxx>



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