From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 23:49:21 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 648DB1065674 for ; Mon, 22 Aug 2011 23:49:21 +0000 (UTC) (envelope-from jwd@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5381D8FC0A for ; Mon, 22 Aug 2011 23:49:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7MNnLn7044734 for ; Mon, 22 Aug 2011 23:49:21 GMT (envelope-from jwd@freefall.freebsd.org) Received: (from jwd@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7MNnLwU044733 for freebsd-net@freebsd.org; Mon, 22 Aug 2011 23:49:21 GMT (envelope-from jwd) Date: Mon, 22 Aug 2011 23:49:21 +0000 From: John To: FreeBSD Net Message-ID: <20110822234921.GA34843@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: ifconfig -alias with duplicate netmasks work? 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: Mon, 22 Aug 2011 23:49:21 -0000 Fellow Net'ers Debugging an nfs locking problem to a linux host, I accidently issued some ifconfig commands on the bsd server (9-current) and found that duplicate netmasks seem to work fine. For instance: bce0: flags=8843 metric 0 mtu 1500 options=c01bb ether d4:85:64:66:2a:14 inet6 fe80::d685:64ff:fe66:2a14%bce0 prefixlen 64 scopeid 0x1 inet 10.24.99.127 netmask 0xffff0000 broadcast 10.24.255.255 inet 10.24.99.128 netmask 0xffff0000 broadcast 10.24.255.255 inet 10.24.99.126 netmask 0xffff0000 broadcast 10.24.255.255 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active via the commands: ifconfig bce0 inet 10.24.99.127 netmask 0xffff0000 broadcast 10.24.255.255 ifconfig bce0 inet 10.24.99.128 netmask 0xffff0000 broadcast 10.24.255.255 alias ifconfig bce0 inet 10.24.99.126 netmask 0xffff0000 broadcast 10.24.255.255 alias The man page for ifconfig says one 'must' use a different netmask, typically 0xffffffff. However, everything still seems to work ok. Has something changed, is the manpage wrong, am I totally missing something? Thanks, John man ifconfig 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.