Hi
On Sat, 2006-01-07 at 15:12 +0530, Paresh wrote:
> I wanted to know that in VS/TUN and VS/DR when reply goes back directly
> from real server to client then what is source IP and port used?
Well, logically it _must_ be the VIP and the port being load balanced,
mustn't it?
> If it uses VIP as source IP, then from where real server get state of
> connection that is present between client and VIP host?
>From the packets it is processing.
> State may include VIP, corr. port on VIP host, various sequence numbers,
> time values like RTT, etc. which are required to send response back
> client on already existing connection (between client and VIP host).
>
> I guess real server can not respond back to client using its own IP,
> that wont be acceptable by normal TCP symantics.
Correct.
Remember that the director is simply acting as a router in TUN or DR
mode. The packet flow is:
Client IP / Client Port on client
to
VIP / VIP port on director
to
VIP / VIP port on realserver
to
Client IP / Client port on client
The only difference between a directly connected, non-LVS server and an
LVS is the additional work done by the director to route packets to the
realservers. They are unaware of the director (as are the clients,
effectively), they simply process packets as you would expect - so the
connection state is created, tracked, processed and closed in the same
way as it would normally be.
Or have I misunderstood your question?
Graeme
|