Skip to contentSkip to conversation

A question regarding Load Balancer in LVS and the ARP problem

DISCUSSION David Shwatrz 2 participants 4 messages Dec 23, 2007 – Dec 24, 2007 IPVS

lore
Share & tools
lore
#0 lore raw

Hello,
It is suggested to configure the VIP on the real servers , when using DR (Direct Routing), using the loopback device
(lo:0).

I saw it in a couple of places (including LVS wiki).

My question is : suppose I have 2 NICs on each real server. Is there any advantage of
configuring the VIP on the loopback device against configuring it on eth1 ? should configuring the VIP on eth1 work ?

Best,
David S.

#1 lore raw
Quoted 1 line · David Shwatrz

My question is : suppose I have 2 NICs on each real server. Is there any advantage of configuring the VIP on the loopback device against configuring it on eth1 ? should configuring the VIP on eth1 work ?

In the early days (<=2.2) any device on the realserver was OK for the VIP (eg dummy0, eth1). I haven't checked since then, but all you're looking for is an address that will deliver packets locally. Since then the linux kernel has gotten a lot more anal/precise about such things and much that we used to be able to do in 2.0.x doesn't work anymore and I can't see any reason why the old behaviour was wrong. So it's reasonable to think that eth1 should work, but I haven't checked it for recent kernels

Joe

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
#2 lore raw

Joseph,
Thanks for your answer !

Quoted 2 lines

but all you're looking for is an address that will deliver packets locally.

I just want to verify that I understand correctly; suppose the real server is a web server. Suppose we configure its lo:0 as the VIP address. Does it mean that it will get requests on the VIP address and will send Responses from the real device (say eth0) with the IP on eth0 as source IP ? (since the loopback lo:0 we configured as the VIP is only in order to deliver packets locally, as you said)?

Regards,
DS

Regards,

Quoted 26 lines · On Dec 24, 2007 4:42 AM, Joseph Mack NA3T <[email protected]> wrote:
Quoted 4 lines · David Shwatrz

My question is : suppose I have 2 NICs on each real server. Is there any advantage of configuring the VIP on the loopback device against configuring it on eth1 ? should configuring the VIP on eth1 work ?

In the early days (<=2.2) any device on the realserver was OK for the VIP (eg dummy0, eth1). I haven't checked since then, but all you're looking for is an address that will deliver packets locally. Since then the linux kernel has gotten a lot more anal/precise about such things and much that we used to be able to do in 2.0.x doesn't work anymore and I can't see any reason why the old behaviour was wrong. So it's reasonable to think that eth1 should work, but I haven't checked it for recent kernels

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina jmack (at) wm7d (dot) net - azimuthal equidistant map generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

#3 lore raw
Quoted 5 lines · David Shwatrz

Joseph,
Thanks for your answer !

Quoted 2 lines

but all you're looking for is an address that will deliver packets locally.

Quoted 7 lines

I just want to verify that I understand correctly; suppose the real server is a web server. Suppose we configure its lo:0 as the VIP address. Does it mean that it will get requests on the VIP address and will send Responses from the real device (say eth0) with the IP on eth0 as source IP ? (since the loopback lo:0 we configured as the VIP is only in order to deliver packets locally, as you said)?

the replies will be routed through the real device.

Joe

Quoted 36 lines

Regards,
DS

Regards,

Quoted 26 lines · On Dec 24, 2007 4:42 AM, Joseph Mack NA3T <[email protected]> wrote:
Quoted 4 lines · David Shwatrz

My question is : suppose I have 2 NICs on each real server. Is there any advantage of configuring the VIP on the loopback device against configuring it on eth1 ? should configuring the VIP on eth1 work ?

In the early days (<=2.2) any device on the realserver was OK for the VIP (eg dummy0, eth1). I haven't checked since then, but all you're looking for is an address that will deliver packets locally. Since then the linux kernel has gotten a lot more anal/precise about such things and much that we used to be able to do in 2.0.x doesn't work anymore and I can't see any reason why the old behaviour was wrong. So it's reasonable to think that eth1 should work, but I haven't checked it for recent kernels

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina jmack (at) wm7d (dot) net - azimuthal equidistant map generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!