alias netmask bug?

Evren Yurtesen yurtesen at ispro.net
Tue Jul 24 01:02:30 UTC 2007


Hi,

I remember from earlier versions of FreeBSD that it had a restriction about 
alias IP netmasks (somewhere in 3.x,4.x days)...

as explained here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-virtual-hosts.html
-------------------------------------
The calculation of alias netmasks is important, but fortunately quite simple. 
For a given interface, there must be one address which correctly represents the 
network's netmask. Any other addresses which fall within this network must have 
a netmask of all 1s (expressed as either 255.255.255.255 or 0xffffffff).
-------------------------------------

However I tried on the loopback interface to add a 2nd IP with the same netmask 
as the original IP and it accepts it fine. (on 6.2)

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
         inet 127.0.0.1 netmask 0xff000000
         inet 127.0.0.2 netmask 0xff000000

Is FreeBSD allowing this a bug or ???

If this is not a bug. What happens if an interface which is connecting to the 
machine has 2 IP addresses with same netmask which is not 255.255.255.255? Does 
FreeBSD use each IP randomly?

Thanks,
Evren


More information about the freebsd-hackers mailing list