From nobody@FreeBSD.org  Wed Jul  7 01:27:16 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 58F0416A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  7 Jul 2004 01:27:16 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4E16E43D1D
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  7 Jul 2004 01:27:16 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i671RGup090348
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 7 Jul 2004 01:27:16 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i671RGas090347;
	Wed, 7 Jul 2004 01:27:16 GMT
	(envelope-from nobody)
Message-Id: <200407070127.i671RGas090347@www.freebsd.org>
Date: Wed, 7 Jul 2004 01:27:16 GMT
From: Dave Duchscher <daved@tamu.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Virtual hosts documentaion doesn't make clear issues with netmask on adding aliases.
X-Send-Pr-Version: www-2.3

>Number:         68746
>Category:       docs
>Synopsis:       Virtual hosts documentaion doesn't make clear issues with netmask on adding aliases.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 07 01:30:19 GMT 2004
>Closed-Date:    Mon Aug 09 12:01:22 GMT 2004
>Last-Modified:  Mon Aug 09 12:01:22 GMT 2004
>Originator:     Dave Duchscher
>Release:        FreeBSD 5.2.1p8
>Organization:
Texas A&M University
>Environment:
>Description:
      http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-virtual-hosts.html

      IMHO, this document does make clear the subtle issues with netmasks when setting up aliases.  As you know, aliases on the same network as the primary interface need a netmask of  255.255.255.255.  The first alias on a different network needs the correct netmask.  Additional aliases need to have 255.255.255.255.  IMHO, I think this document should cover these subtle issues with netmasks in more detail.

       This PR was prompted by helping other system administrators on IRC.

>How-To-Repeat:
      
>Fix:

>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@ringlet.net>
To: Dave Duchscher <daved@tamu.edu>
Cc: bug-followup@FreeBSD.org
Subject: Re: docs/68746: Virtual hosts documentaion doesn't make clear issues with netmask on adding aliases.
Date: Fri, 6 Aug 2004 15:46:38 +0300

 On Wed, Jul 07, 2004 at 01:27:16AM +0000, Dave Duchscher wrote:
 > 
 > >Number:         68746
 > >Category:       docs
 > >Synopsis:       Virtual hosts documentaion doesn't make clear issues with netmask on adding aliases.
 [snip]
 > >Description:
 > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-virtual-hosts.html
 > 
 > IMHO, this document does make clear the subtle issues with netmasks when
 > setting up aliases.  As you know, aliases on the same network as the
 > primary interface need a netmask of  255.255.255.255.  The first alias on
 > a different network needs the correct netmask.  Additional aliases need to
 > have 255.255.255.255.  IMHO, I think this document should cover these
 > subtle issues with netmasks in more detail.
 
 What do people think about the following patch?
 
 G'luck,
 Peter
 
 Index: doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml
 ===================================================================
 RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml,v
 retrieving revision 1.163
 diff -u -r1.163 chapter.sgml
 --- doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml	5 Aug 2004 10:04:29 -0000	1.163
 +++ doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml	6 Aug 2004 12:29:18 -0000
 @@ -1137,7 +1137,9 @@
        fortunately quite simple.  For a given interface, there must be
        one address which correctly represents the network's netmask.
        Any other addresses which fall within this network must have a
 -      netmask of all <literal>1</literal>s.</para>
 +      netmask of all <literal>1</literal>s (expressed as either
 +      <literal>255.255.255.255</literal> or <literal>0xffffffff</literal>).
 +      </para>
  
      <para>For example, consider the case where the
        <devicename>fxp0</devicename> interface is
 @@ -1148,7 +1150,15 @@
        We want the system to appear at <hostid role="ipaddr">10.1.1.1</hostid>
        through <hostid role="ipaddr">10.1.1.5</hostid> and at
        <hostid role="ipaddr">202.0.75.17</hostid> through
 -      <hostid role="ipaddr">202.0.75.20</hostid>.</para>
 +      <hostid role="ipaddr">202.0.75.20</hostid>.  As noted above, only the
 +      first address in a given network range (in this case,
 +      <hostid role="ipaddr">10.0.1.1</hostid> and
 +      <hostid role="ipaddr">202.0.75.17</hostid>) should have a real
 +      netmask; all the rest (<hostid role="ipaddr">10.1.1.2</hostid>
 +      through <hostid role="ipaddr">10.1.1.5</hostid> and
 +      <hostid role="ipaddr">202.0.75.18</hostid> through
 +      <hostid role="ipaddr">202.0.75.20</hostid>) must be configured with a
 +      netmask of <literal>255.255.255.255</literal>.</para>
  
      <para>The following entries configure the adapter correctly for
        this arrangement:</para>
 
 -- 
 Peter Pentchev	roam@ringlet.net    roam@cnsys.bg    roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 .siht ekil ti gnidaer eb d'uoy ,werbeH ni erew ecnetnes siht fI
State-Changed-From-To: open->closed 
State-Changed-By: roam 
State-Changed-When: Mon Aug 9 12:00:58 GMT 2004 
State-Changed-Why:  
I've committed a patch emphasizing the need for an all-ones netmask 
on "secondary" addresses.  Thanks for bringing this up! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=68746 
>Unformatted:
