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
> 
> That seemed to have done the trick, manually. Im guessing, I could put the 
> same thing in my rc.conf file, but with proper syntax:
> 
> ifconfig_fxp0_alias0="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.  This
             is sometimes useful when changing network numbers, and one wishes
             to accept packets addressed to the old interface.  If the address
             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

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

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to