Mailing List Archive

[lvs-users] a question about interface vip lo:0 in realserver in lvs dr mode
I have a question about interface vip lo:0 in realserver in lvs dr mode


most people used the command below to handle route to the interface VIP


/sbin/route add -host $VIP dev lo:0


I wonder what the command is used for ? if i did't configure it, what is the influence for the packets back to client from realserver ?
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] a question about interface vip lo:0 in realserver in lvs dr mode [ In reply to ]
寇善军 <fierceman@163.com> writes:

> I have a question about interface vip lo:0 in realserver in lvs dr mode
>
> most people used the command below to handle route to the interface VIP
>
> /sbin/route add -host $VIP dev lo:0
>
> I wonder what the command is used for?

If makes $VIP a local address without actually having it configured on
any interface.

> if i did't configure it, what is the influence for the packets back to
> client from realserver ?

Nothing. But the packets from the director to the real server are not
processed by the latter unless their destination address (the VIP) is a
local address on the real server. Either you configure it on some
interface and handle the "ARP problem", or you make the VIP(s) local via
routing.

Actually, you can add whole IPv4 subnets to your loopback interface with
equivalent effect: "ip addr add XXX.YYY.ZZZ.0/24 dev lo", which adds the
corresponding local route. You can't do this with IPv6 ranges, but you
can directly "ip route add local aaaa:bbb:cc:d::/64 dev lo" (on modern
Linux kernels).
--
Regards,
Feri.

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users