From owner-freebsd-net@FreeBSD.ORG Wed Jun 29 17:15:34 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC063106564A for ; Wed, 29 Jun 2011 17:15:34 +0000 (UTC) (envelope-from olwi@fb-n.l.org.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 2B0C18FC17 for ; Wed, 29 Jun 2011 17:15:33 +0000 (UTC) Received: from [10.0.10.4] (TPad-L.deer.kiev.ua [10.0.10.4]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA01662; Wed, 29 Jun 2011 20:15:29 +0300 (EEST) (envelope-from olwi@fb-n.l.org.ua) Message-ID: <4E0B5DB1.5090702@fb-n.l.org.ua> Date: Wed, 29 Jun 2011 20:15:29 +0300 From: Oleg Cherevko User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: "Li, Qing" References: <4E0B406D.8070406@fb-n.l.org.ua> In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-net@freebsd.org" Subject: Re: ifconfig alias: same subnet netmask question X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2011 17:15:35 -0000 Li, Qing wrote: > First of all, are you encountering any issues ? Well, for the last 14+ years I used to setup aliases with 0xffffffff netmask and everything worked OK. However recently I encountered situation where 0xffffffff-style alias triggered some unwanted network behavior. When one sets alias like this: ifconfig em0 inet 192.168.1.1 netmask 0xffffff00 ifconfig em0 inet 192.168.1.2 netmask 0xffffffff alias and then exports connected networks via OSPF ASE, two prefixes end up being exported (192.168.1.1/24 and 192.168.1.2/32). In case of "identical netmask" setup: ifconfig em0 inet 192.168.1.1 netmask 0xffffff00 ifconfig em0 inet 192.168.1.2 netmask 0xffffff00 alias only one prefix gets exported (192.168.1.1/24). In my particular situation two exported prefixes led to wrong behavior of some equipment (other than FreeBSD machine in question). When I changed to "identical netmask" setup (one exported prefix) everything started to work flawlessly. So far I encountered no issues with this "identical netmask" setup. So I'd like to know why ifconfig manpage still recommends old way of setting aliases? Perhaps there are some pitfalls that I'm not aware of? Or manpage text is simply outdated? > There is an outstanding issue with the address alias and improper routing > table update that I am actively working on. > > --Qing > > >> -----Original Message----- >> From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd- >> net@freebsd.org] On Behalf Of Oleg Cherevko >> Sent: Wednesday, June 29, 2011 8:11 AM >> To: freebsd-net@freebsd.org >> Subject: ifconfig alias: same subnet netmask question >> >> Hi All, >> >> When describing the "alias" parameter ifconfig manpage claims that "If >> the address is on the same subnet as the first network address for this >> interface, a non-conflicting netmask must be given. Usually 0xffffffff >> is most appropriate." >> >> Taking into account that FreeBSD supports aliases from the same subnet >> with identical netmask for 6+ years now, does this statement still make >> sense? And what does this "conflicting netmask" stand for (I mean in >> the >> context of more or less recent FreeBSD versions, say 8.0+)? >> >> Are there any drawbacks in setting aliases like this: >> ifconfig em0 inet 192.168.1.1 netmask 0xffffff00 >> ifconfig em0 inet 192.168.1.2 netmask 0xffffff00 >> instead of traditional: >> ifconfig em0 inet 192.168.1.1 netmask 0xffffff00 >> ifconfig em0 inet 192.168.1.2 netmask 0xffffffff >> (again, for more or less recent FreeBSD versions)? >> >> -- >> Olwi >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" -- Olwi