Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 2004 14:26:48 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Jason Williams <jwilliams@courtesymortgage.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: setting up network virtual hosts (ifconfig)
Message-ID:  <20040309142648.GC16123@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <5.2.1.1.0.20040308164913.02affee8@pop.courtesymortgage.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



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