LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] netmask for vip?

To: linbo liao <llbgurs@xxxxxxxxx>
Subject: Re: [lvs-users] netmask for vip?
Cc: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Thu, 22 Jun 2017 00:10:46 +0300 (EEST)
        Hello,

On Sun, 18 Jun 2017, linbo liao wrote:

> If vip 192.168.0.111 from subnet 192.168.0.0/24, and no netmask support in
> configuration, the default netmask is 255.255.255.255. I test default
> netmask, looks everything works fine.
> 
> So what's the proper netmask for vip, 255.255.255.255 or 255.255.255.0?

        The "lo" interface is special in Linux, if you
add IP/24 on lo, what is added actually is a range of local
addresses, i.e. 256 local addresses in the case for /24.
As result, for the 127.0.0.1/8 case, we actually have
16,777,216 local addresses, i.e. you can use 127.0.0.1 but
also 127.0.0.2 ... 127.255.255.255.

        In the common case with IPVS, we add single VIP, so
only 255.255.255.255 should be used. And I don't think
255.255.255.255 is a default mask, it should be specified in
all commands.

Regards

--
Julian Anastasov <ja@xxxxxx>

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

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

<Prev in Thread] Current Thread [Next in Thread>