Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2002 09:26:51 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Roger Harrell <roger@audiblefaith.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to configure multiple IPs on FreeBSD
Message-ID:  <20020826082651.GB3063@happy-idiot-talk.infracaninophi>
In-Reply-To: <3D695E8A.3BF8EAD@audiblefaith.com>
References:  <3D67FEA3.81CA0D0B@audiblefaith.com> <20020825113425.GB3075@happy-idiot-talk.infracaninophi> <3D695E8A.3BF8EAD@audiblefaith.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 25, 2002 at 03:47:38PM -0700, Roger Harrell wrote:
> Just for my knowledge what is the 0xffffffff after netmask? Why use that
> vs 255.255.255.0 which is what is in the current line for the main IP in
> rc.conf?

The two formats are equivalent and either is accepted by FreeBSD's
ifconfig(8).  FreeBSD seems to default to using the dotted quad style
whereas other Unix like Solaris prefers the hexadecimal style.  You can
also give the network details in the address/mask style,
eg. 127.0.0.1/8

Thus

    0xffffffff is equivalent to 255.255.255.255 or /32
    0xfffffff0                  255.255.255.240 or /28
    0xffffff00                  255.255.255.0   or /24

It's not just the netmask that can be expressed in several different
formats.  An IP4 address is nothing more than a 32 bit unsigned
integer, and can be displayed in several ways.  Eg.  all of these are
equivalent:

    http://www.bbc.co.uk/

    http://212.58.224.56/

    http://0xd43ae038/

    http://3560628280/

Mind you, it seems that recent versions of Mozilla won't recognise the
last two, but something like lynx or w3m loads them up right away.

	Cheers,

	Matthew
-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
                                                      Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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