From owner-freebsd-net@FreeBSD.ORG Mon Apr 19 15:43:30 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0D2416A4CE for ; Mon, 19 Apr 2004 15:43:30 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9330243D39 for ; Mon, 19 Apr 2004 15:43:30 -0700 (PDT) (envelope-from billf@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1098) id 8CE3F5C7F9; Mon, 19 Apr 2004 15:43:30 -0700 (PDT) Date: Mon, 19 Apr 2004 15:43:30 -0700 From: Bill Fumerola To: Julian Elischer Message-ID: <20040419224330.GN17862@elvis.mu.org> References: <20040419110912.A71274@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 4.10-MUORG-20040412 i386 X-PGP-Key: 1024D/7F868268 X-PGP-Fingerprint: 5B2D 908E 4C2B F253 DAEB FC01 8436 B70B 7F86 8268 cc: Luigi Rizzo cc: net@freebsd.org Subject: Re: what is the story on if_index allocation ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 19 Apr 2004 22:43:30 -0000 On Mon, Apr 19, 2004 at 12:28:23PM -0700, Julian Elischer wrote: > It's completely un-needed except that some standards want to access > interfaces by index for statitics purposes. they're "un-needed" in much the same way that statically assigning disk numbers is "un-needed". sure, the disks don't light on fire without it, but some consistancy and persistance does make things nice. for comparison: vendor C has a default-to-off option for this (''snmp ifindex persist'') which pre-allocates numbers loosely based on max_modules * max_ports_in_modules and dumps this mapping into the filesystem. vendor J allocates dynamically and won't reuse ifIndex numbers over the life of a router. a way of keeping indexes consistant for a given named interface (even across creation/destruction via cloning, kld, etc) is most certainly a desirable feature. the more persistant this can be made (life of the module all the way up to life of device) the better. i disagree that this logic belongs outside the kernel in the snmp agent. an inconsistant if_index makes it difficult and error prone for using the index in multiple utilities whose data may be combined/joined/scaled with information from the snmp agent's IF-MIB/ifXTable tables. -- - bill fumerola / fumerola@yahoo-inc.com / billf@FreeBSD.org