On Fri, 19 Jun 2020 07:44:03 -0400
Daniel Ouellet <[email protected]> wrote:

> On 6/19/20 7:15 AM, Robert wrote:
> > Hi,
> >
> > I want to configure multiple alias IPs on the same interface and in the 
> > same subnet.
> > (reason: hosting services with dedicated DNS names and IPs)
> >
> > inet 10.0.0.1 255.255.255.0
> > inet alias 10.0.0.2 255.255.255.0
> > inet alias 10.0.0.3 255.255.255.255
> > ...
> >
> > What is the correct subnet mask for those alias IPs?
>
> If you have multiple IP's in the same subnet you enter then as /32
>
> If you have two different subnet NOT in the same range, the first one of
> the new subnet you enter it as it's full subnet and any additional one
> in that second subnet you enter them as /32.
>
> Example:
>
> inet 10.0.0.1 255.255.255.0
> inet alias 10.0.0.2 255.255.255.255
> inet alias 10.0.0.3 255.255.255.255
> inet 10.1.0.1 255.255.255.0
> inet alias 10.1.0.2 255.255.255.255
> inet alias 10.1.0.3 255.255.255.255
> inet 10.2.0.1 255.255.255.0
> inet alias 10.2.0.2 255.255.255.255
> inet alias 10.2.0.3 255.255.255.255
>
> It's always how I did it. If I am doing it wrong, then I never
> understood it properly. May be the man page might benefit from
> clarifying it.
>
> Hope this help you.
>
> Daniel
>

I have used both methods, and I have not seen any immediate issue.
Which is why I am curious now if there are any technical or protocol reasons 
for one or the other. I am not worried about potential duplicate broadcasts in 
regard to bandwidth usage or similar. But are there any negative effects in the 
network stack or other states due to not using /32?

/Robert

Reply via email to