Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2007 11:43:21 +0400
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        freebsd-net@freebsd.org, Andrei Manescu <andrei.manescu@clicknet.ro>
Cc:        alex.wilkinson@dsto.defence.gov.au
Subject:   Re: two public ip addresses on one interface
Message-ID:  <20070528074321.GF35160@void.codelabs.ru>
In-Reply-To: <20070527110741.GC78927@obelix.dsto.defence.gov.au>
References:  <000e01c79f03$b2cfce70$5501a8c0@ivorde> <08556012-CA57-4B2A-A142-F5C1BC8D9009@mac.com> <20070527110741.GC78927@obelix.dsto.defence.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Alex, good day.

Sun, May 27, 2007 at 07:07:41PM +0800, Wilkinson, Alex wrote:
>     > If your aliases are part of the same subnet as the "primary" or first configured IP, then you want to 
>     > use the all-1's netmask.  In your case, however, the second IP is part of a completely different subnet, 
>     > and you can (and should) use a /24 netmask....
> 
> I have always wondered why we need to use the "all-1's" netmask. Why is this ?

Because if you're stuffing two addresses from the same subnet to
one interface it will not work: there can be only one route to the
specified network in the FreeBSD routing table.  And adding IP to
the interface creates the entry in the routing table.  So you should
specify the different mask and most probably 0xffffffff will be the
best choice, but your mileage may vary with your routing needs.
-- 
Eygene



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070528074321.GF35160>