LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] netmask for vip?

To: Julian Anastasov <ja@xxxxxx>
Subject: Re: [lvs-users] netmask for vip?
Cc: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: linbo liao <llbgurs@xxxxxxxxx>
Date: Thu, 22 Jun 2017 20:01:08 +0800
Thanks Julian, I  understand /32 for "lo" interface.

But my question is VIP for director, it usually configure in other
interface than "lo" , what's the difference between /32 and actual subnet
of the VIP.

In keepalived, if no netmask provide, vip will configure with /32 netmask,
for example:

virtual_ipaddress {
    192.168.0.111    ; it will use /32 netmask
    192.168.0.112/24    ; it will use /24 netmask
}

Thanks,
Linbo

2017-06-22 5:10 GMT+08:00 Julian Anastasov <ja@xxxxxx>:

>
>         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>