How does the VIP loopback aliase work?

3.3k views Asked by At

I want to know how does the loopback alias work,lets say i have the following nodes:

n[1-10] on a load balancer, all under the following VIPs : xx.xx.xx.xx yy.yy.yy.yy on the nodes we have the following:

lo:0 Link encap:Local Loopback
inet addr:xx.xx.xx.xx Mask:255.255.255.255 UP LOOPBACK RUNNING MTU:16436 Metric:1

lo:1 Link encap:Local Loopback
inet addr:yy.yy.yy.yy Mask:255.255.255.255 UP LOOPBACK RUNNING MTU:16436 Metric:1

Can some one explain me what is the concept of the loopback,or giving me a link to read about this concept

sorry , i don't have a deep background about, this ,and i don't want just to know HOW to do it (and this is the most thing i found while i'am searching for),but i want to know why i'am doing this loopback alias

Can some one explain to me what is the life cycle of a client request ,including the load balancer rule,and how the loopback server in this game :) ?

Thanks all

1

There are 1 answers

0
Remi Gacogne On

In order for services on the nodes to be able to listen for incoming connections for the VIPS, you need to configure the VIPs on an interface, physical or loopback.

The thing is, you don't want the nodes to answer to ARP requests regarding VIPs, because you only want the load balancer to do that, in order for all connections to go to the load balancer.

In order to do that, you need to do ARP filtering on the nodes one way or another, allowing them to respond to ARP requests for their real IPs, but not for VIPs. On Linux, one really simple way to do that is to configure the system to respond only to ARP requests coming into the interface owning the IP address, using arp_ignore and arp_announce sysctls. Loopback interfaces being local by design, there will be no ARP requests coming into the loopback.

If you want to learn more about that, you can read the "ARP Problem" part of the LVS Howto : http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.arp_problem.html