From owner-freebsd-questions@FreeBSD.ORG Tue Mar 9 06:27:01 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B266916A4CE for ; Tue, 9 Mar 2004 06:27:01 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id E585243D31 for ; Tue, 9 Mar 2004 06:27:00 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i29EQn3L098020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Mar 2004 14:26:49 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i29EQmft098019; Tue, 9 Mar 2004 14:26:48 GMT (envelope-from matthew) Date: Tue, 9 Mar 2004 14:26:48 +0000 From: Matthew Seaman To: Jason Williams Message-ID: <20040309142648.GC16123@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Jason Williams , freebsd-questions@freebsd.org References: <5.2.1.1.0.20040308160419.02afa950@pop.courtesymortgage.com> <5.2.1.1.0.20040308160419.02afa950@pop.courtesymortgage.com> <5.2.1.1.0.20040308164913.02affee8@pop.courtesymortgage.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hOcCNbCCxyk/YU74" Content-Disposition: inline In-Reply-To: <5.2.1.1.0.20040308164913.02affee8@pop.courtesymortgage.com> User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk X-Virus-Scanned: clamd / ClamAV version devel-20040304, clamav-milter version 0.67j cc: freebsd-questions@freebsd.org Subject: Re: setting up network virtual hosts (ifconfig) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2004 14:27:01 -0000 --hOcCNbCCxyk/YU74 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 08, 2004 at 04:50:47PM -0800, Jason Williams wrote: > >e.g. something like this works fine here : > > > ># /etc/rc.local : > >ifconfig fxp0 alias 192.168.2.222 netmask 0xffffffff >=20 > That seemed to have done the trick, manually. Im guessing, I could put th= e=20 > same thing in my rc.conf file, but with proper syntax: >=20 > ifconfig_fxp0_alias0=3D"inet 192.168.2.222 netmask 0xffffff The proper syntax for the netmask on the second and subsequent interface addresses from each distinct network block is to use the all-ones netmask: you can express that either as 255.255.255.255 or as 0xffffffff or as /32, whichever suit you best. This is a FAQ on this list but it still keeps tripping people up -- despite being clearly documented in ifconfig(8): alias Establish an additional network address for this interface. T= his is sometimes useful when changing network numbers, and one wis= hes to accept packets addressed to the old interface. If the addr= ess is on the same subnet as the first network address for this interface, a non-conflicting netmask must be given. Usually 0xffffffff is most appropriate. However you look at it, 0xffffff could never be a correct netmask. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --hOcCNbCCxyk/YU74 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFATdQodtESqEQa7a0RAuCtAJkBHBG18aFwzsnQKDkvU4wl5USMAgCfYOSW i1N3NjfIYwPaemInQWO4i5A= =+33v -----END PGP SIGNATURE----- --hOcCNbCCxyk/YU74--