I have been studying Keepalived for High Availability purposes.
I have some fundamental questions concerning TCP/IP behavior when Keepalived is in place.
With Keepalived, clients can access the servers through its Virtual IP address. This is achieved thanks to MAC translation. But at the end of the day, the Host Server receives the packages with a different destination IP rather than its own IP. Initially I thought a host would reject a package with an IP different from its own, but thats OK.
What puzzled me is that the Host Server also responds the requests by using the Virtual IP Address, which is not present on any of its interfaces.
How can the TCP/IP stack constructs a package with a different source IP from its network interface? Do the keepalived acts on the packages constructions inside the TCP/IP Stack? I though Keepalived would act only on the Application Layer.
Thanks in advance for any clarification.