Re: alias netmask bug?



Jeremy Chadwick wrote:
On Tue, Jul 24, 2007 at 03:34:54AM +0300, Evren Yurtesen wrote:
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

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

It's not a bug. Why did you disregard the instructions, though?

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?

Don't know, but my guess is no, it probably does not use "each IP
randomly", and I cannot even fathom the network breakage that would
ensue as a result of such.


I have seen systems that have been configured like this (on physical interfaces) have some strange problems. I'm sure one box that got a config like this by accident kicked one of the IP's off the interface several hours after it was set up. Never been able to reproduce that though.

Tom
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Summary: netmask & defaultrout not set in Jumpstart
    ... The target server still configured its netmask wrong. ... This is a portion of the JET/jumpstart config: ... Attempting to configure interface bge3... ...
    (SunManagers)
  • Re: Desired behaviour of "ifconfig -alias"
    ... > For a set of IPs in the same subnet on the same interface, ... > the primary IP be the one with the proper netmask, ... alias Establish an additional network address for this interface. ... inet 88.198.173.154 netmask 0xfffffff8 broadcast 88.198.173.159 ...
    (freebsd-stable)
  • Re: 2 Nics and default route
    ... >> kernel figures out which interface to use to get to it. ... >> If for some reason you want the cards addressed in the same subnet, ... >> be done by artificially restricting the netmask, ... All machines in the subnet should have the same netmask set and you ...
    (comp.unix.bsd.openbsd.misc)
  • netmask & defaultrout not set in Jumpstart
    ... It appears that it is not setting the netmask correctly. ... This is a portion of the JET/jumpstart config: ... Using RPC Bootparams for network configuration information. ... Attempting to configure interface bge3... ...
    (SunManagers)
  • CARP and em0 timeout watchdog
    ... inet 192.168.0.18 netmask 0xffffff00 broadcast 192.168.0.255 ... the em0 interface connects to the LAN while the em1 interface is ... with transfers across the carp IP I end up with em0 ...
    (freebsd-stable)