Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2001 07:16:14 +0100
From:      "Rogier R. Mulhuijzen" <drwilco@drwilco.nl>
To:        "Matthew Emmerton" <matt@gsicomp.on.ca>, "Jonathan Graehl" <jonathan@graehl.org>, <freebsd-net@FreeBSD.ORG>
Subject:   Re: Quick question about IP aliasing
Message-ID:  <4.3.2.7.0.20010227070424.00d25c10@mail.bsdchicks.com>
In-Reply-To: <001501c0a070$3a14d900$1200a8c0@gsicomp.on.ca>
References:  <NCBBLOALCKKINBNNEDDLAEJIDLAA.jonathan@graehl.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At 22:49 26-2-01 -0500, Matthew Emmerton wrote:

> > > do 'netmask 255.255.255.255' instead or 'netmask 0xffffffff' since this
>is
> > > an alias... for some reason otherwise services may not bind to the ip
> > > correctly
> >
> > Why would this be?  The two are numerically equivalent.

He's saying 'instead or' not 'instead of', I nearly fell for this too.

>Yes, but you're missing the point.
>
>The point is that you need to use a netmask of 255.255.255.255 for aliased
>IPs on FreeBSD, regardless of the alias of the primary (non-alias) IP.

Everybody is saying use 255.255.255.255 for an alias. Noone is giving 
reasons why.

Aliassing is the only way to bind more than one IP to an interface (well 
only simple way..) and aliasses are no different from the primary IP.

If you couldn't use the right subnetmask for an alias outside the main IP's 
subnet, the FreeBSD machine wouldn't be able to fully participate in that 
subnet's traffic. (It couldn't receive subnet broadcasts for one)

The only reason to use 255.255.255.255 is when the IPs are in the same 
subnet, or you'll get routing and broadcast problems.

If you use 10.1.1.1:255.255.255.0 and the 2nd IP is 10.1.1.2 you need to 
use 255.255.255.255 for the 2nd IP

If you use 10.1.1.1:255.255.255.0 and the 2nd IP is 10.2.2.2 you can use 
255.255.255.0 for the 2nd IP (if that is the subnetmask for that network)

If you use 10.1.1.1:255.0.0.0 and the 2nd IP is 10.2.2.2 you need to use 
255.255.255.255 again (same subnet)

If you use 10.1.1.1:255.255.255.0 and 10.2.2.2:255.255.255.0, and the 3rd 
IP is 10.2.2.4 you use 255.255.255.255 only for the 3rd IP.

         DocWilco

P.S.: If this is not the case with FreeBSD, we've got major problems.


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




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