Date: Tue, 13 Feb 2007 19:37:17 +0100 (CET) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-stable@FreeBSD.ORG, fcash@ocis.net Subject: Re: Desired behaviour of "ifconfig -alias" Message-ID: <200702131837.l1DIbHJW010476@lurza.secnetix.de> In-Reply-To: <200702130915.04257.fcash@ocis.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Freddie Cash wrote: > For a set of IPs in the same subnet on the same interface, wouldn't the > primary IP be the one with the proper netmask, and all IPs with netmasks > of /32 be secondary? That's historic. :-) Old versions of FreeBSD indeed required the netmask of the "aliases" to be /32 in that case. But it's no longer the case. # ifconfig re0 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 88.198.44.136 netmask 0xffffffe0 broadcast 88.198.44.159 inet 88.198.173.154 netmask 0xfffffff8 broadcast 88.198.173.159 inet 88.198.173.155 netmask 0xfffffff8 broadcast 88.198.173.159 inet 88.198.173.156 netmask 0xfffffff8 broadcast 88.198.173.159 inet 88.198.173.157 netmask 0xfffffff8 broadcast 88.198.173.159 inet 88.198.173.158 netmask 0xfffffff8 broadcast 88.198.173.159 > In that situation, wouldn't deleting the primary IP > cause connection issues for the rest of the IPs? No. I can delete _any_ of the above IP addresses, and the others would still work perfectly fine. I already did things like that (on a different machine). As for outgoing connections: It is true that the kernel picks a random matching IP address to be the source IP, which happens to be the first one, but that's just as coincidence as "-alias" picking the first one if none is given. ;-) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart Any opinions expressed in this message are personal to the author and may not necessarily reflect the opinions of secnetix GmbH & Co KG in any way. FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "I invented Ctrl-Alt-Delete, but Bill Gates made it famous." -- David Bradley, original IBM PC design team
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702131837.l1DIbHJW010476>