LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Please explain direct routing in LVS mode

To: "David D.W. Downey" <david.downey@xxxxxxxxxxxxxxxxxxxxxxxx>, <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Please explain direct routing in LVS mode
From: "Ted Pavlic" <tpavlic@xxxxxxxxxxx>
Date: Sat, 9 Sep 2000 14:53:26 -0400
> OK, I'm using NAT based LVS right now for the company website.
> Could someone explain to me how Direct routing works? (Is that for FOS
> only or can it be used in LVS mode?) If I understand DR right, it takes
> the incoming packet(s) and shunts them directly to servers on the backenbd
> which ALSO have to have real FQIPs correct? If this is true, how is it
> doing the routing BACK to the requesting client? How can one save state
> information between the client and the responding server?

Direct routing was originally an LVS thing, yep. It's still widely used with
LVS. I use it now as we speak.

Take a look at:

http://www.linuxvirtualserver.org/VS-DRouting.html

The return packets back to the end-user actually do not go back through the
LVS, they go directly to the user.

That is there is probably a router in front of both LVS and the real
servers. The LVS has a default gateway of that router. The real servers ALSO
have a default gateway of that router. As a consequence, while the packets
come in through the LVS and then are variably routed to one of the real
servers, the real servers always come back to the end-user through the
router in front of both the real server cluster AND the LVS.

The LVS has all of the VIPs on it as well as all of the real servers. The
LVS either ARPs for all of those VIPs or those VIPs are directly routed to
the LVS by the router in front of the LVS. The LVS then acts as a router in
that it retransmits the same packets to another computer (by sending them
directly to that computer's MAC address as if that computer had ARPed for
that IP). The only difference between the LVS and a router is that LVS is a
little smarter -- rather than using a one-to-one IP-to-mac table in memory
it dynamically chooses between an array of RIPs and transmits the VIP
request directly to the RIP in question by using that RIP's MAC address. It
then remembers all of the active connections and where they are going until
a FIN is received for each connection.

> I have a few more questions but would like to discuss them privately so
> the list doesn't go ballistic over alot of traffic.

Geesh -- that must be a lot of questions.

Take a look at the website and the mailing list archives:

http://www.linuxvirtualserver.org/

I'm sure SOME of your questions will have probably been answered there at
one time.

All the best --
Ted



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