From owner-freebsd-net@FreeBSD.ORG Mon May 24 08:37:05 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 0992816A4CE for ; Mon, 24 May 2004 08:37:05 -0700 (PDT) Received: from relay.rinet.ru (relay.rinet.ru [195.54.192.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2822943D45 for ; Mon, 24 May 2004 08:37:04 -0700 (PDT) (envelope-from flist@qqmore.rinet.ru) Received: from relay.rinet.ru (localhost [127.0.0.1]) by relay.rinet.ru (8.12.9p2/8.12.9) with ESMTP id i4OERuYL032455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 May 2004 18:27:56 +0400 (MSD) (envelope-from flist@qqmore.rinet.ru) Received: (from uucp@localhost)i4OERuNH032454; Mon, 24 May 2004 18:27:56 +0400 (MSD) (envelope-from flist@qqmore.rinet.ru) Received: from qqmore.rinet.ru. (localhost.rinet.ru [127.0.0.1]) by qqmore.rinet.ru. (8.12.11/8.12.11) with ESMTP id i4OES380005647; Mon, 24 May 2004 18:28:03 +0400 (MSD) (envelope-from flist@qqmore.rinet.ru) Received: (from flist@localhost) by qqmore.rinet.ru. (8.12.11/8.12.11/Submit) id i4OERho9005631; Mon, 24 May 2004 18:27:43 +0400 (MSD) (envelope-from flist) Date: Mon, 24 May 2004 18:27:43 +0400 From: Alex Semenyaka To: "Louis A. Mamakos" Message-ID: <20040524142743.GA5564@qqmore.rinet.ru> Mail-Followup-To: Alex Semenyaka , "Louis A. Mamakos" , freebsd-net@freebsd.org, Peter Pentchev References: <20040520162919.GA1971@straylight.m.ringlet.net> <20040520171833.GA22494@Odin.AC.HMC.Edu> <20040521133530.GA1403@qqmore.rinet.ru> <20040523233737.219F720FC5@whizzo.transsys.com> <20040524034049.GA1022@qqmore.rinet.ru> <20040524135147.2BF7320F6C@whizzo.transsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040524135147.2BF7320F6C@whizzo.transsys.com> User-Agent: Mutt/1.5.6i cc: freebsd-net@freebsd.org cc: Peter Pentchev cc: Alex Semenyaka Subject: Re: [RFC] ifconfig: match by link-level address 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, 24 May 2004 15:37:05 -0000 On Mon, May 24, 2004 at 09:51:47AM -0400, Louis A. Mamakos wrote: >> You've absolutely right and I wanted to propose it just on the base of >> currently existing functionality (independently of this thread). However if >> there will be automatic renaming things would be easier. Thus I decided to >> combine both approaches since it leads to simple solution. > This interface renaming operation is likely to only occur as the system > boots, and probably is an "automated" process rather than one that involves > human. Well, to some extend. I mean that the process should be automated but I want to be able to specify what to rename. > Keeping with the decades-long UNIX tradition of using combinations > of tools would lead you to writing a simple shell script, rather than going > to all the trouble to extend the existing tool. Exactly what I already DID :) Probably I did not express myself clear enough, sorry. I did it just as new script (/etc/rc.ifrename) which have simple config (/etc/ifrename.conf) like that: 00:01:02:03:04:05 int0 00:02:04:08:10:20 int1 Nothing but current /sbin/ifconfig and /bin/sh. And again, if it is interesting for somebody I'll publish patches... > Certainly there's no performance-related reason to do so. Sure. > I guess I don't see how you might choose to extend ifconfig to implement > some function that can't be done with some external tools. About the only Well actually you should discuss the necessity of the changes in ifconfig with the author of the original posting :) What I proposed was just middle way between what he proposed and what I did. I mean if somebody is changing ifconfig anyway that way would be easier to implement. However personally I did the job without any modification of ifconfig at all. > I'm not sure how much easier "automatic" renaming might be. You still > need some ability to specify policy on what interfaces are renamed > (e.g., only 100Base-T ethernet but not 802.11 wireless). What I am trying to solve is the situation when you have a box with (say) 4 etherexpresses and first on them is dead. Then old fxp1 becomes fxp0, old fxp2 becomes fxp1 and so on. And now you cannot remotely connect to that box abd find out what is going on, that's it. So I want automatic renaming during the boot, but I want it controlled: "this card will have the name intel0, that on - intel1", and it should leave untouched cards without explicit entry in the renaming config. It is the way I did it. Do you see any disadvanatges there? About the media type... well, I believe that if I will pick the MAC-address of the card and new name I know what that card is, right? I do ifconfig, choose cards I want to rename, and create renaming config. Why do I need to specify also media type? Is it possible that my wireless adaptor will have the same MAC-adress as my Inter Etherexpress? I believe not. -- Sincerely, Alex Semenyaka