do we support non contiguous netmasks ?

Tony Finch dot at dotat.at
Wed Apr 7 03:11:31 PDT 2004


Anders Lowinger <anders.lowinger at packetfront.com> wrote:
>Luigi Rizzo wrote:
>>
>> i was wondering if anyone knows what kind of support we have
>> in FreeBSD networking code, for non contiguous netmasks.
>> While it is trivial to support them for interface addresses,
>> managing them in the routing table is probably far from trivial
>> and I believe also mostly useless... and anyways, i have no
>> idea how our kernel code deals with them
>
>Not sure why you wonder? Do you need it?

I played around with non-contiguous netmasks when working on Demon's
NETALIAS patch (see http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/12071).
I didn't actually put it into production that way, though -- I stuck
with standard netmasks to reduce confusion.

At that time we had IIRC two /18s and a /16 assigned to a web vhosting
service (because it dated from before widespread support for HTTP Host:
headers). These addresses were allocated sequentially, so the simple
approach of splitting the /16s into /18s and routing them to the various
servers gave an uneven distribution of load. Splitting the /16s by the
mask 0xFFFF0003 did a better job. (Each server could serve any site,
but was more efficient if it served a subset of the sites, and it was
easiest to configure this distribution on the (NetBSD) last hop router.)

Tony.
-- 
f.a.n.finch  <dot at dotat.at>  http://dotat.at/
LYME REGIS TO LANDS END INCLUDING THE ISLES OF SCILLY: NORTHWEST 4 OR 5
GRADUALLY VEERING NORTH 4 OR 5. SOME SHOWERS. MAINLY GOOD. SLIGHT IN EAST,
MODERATE IN WEST.


More information about the freebsd-net mailing list