From owner-freebsd-stable@FreeBSD.ORG Mon Feb 12 17:27:37 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94C9416A406; Mon, 12 Feb 2007 17:27:37 +0000 (UTC) (envelope-from joao@matik.com.br) Received: from msrv.matik.com.br (msrv.matik.com.br [200.152.83.14]) by mx1.freebsd.org (Postfix) with ESMTP id 0C56613C4BB; Mon, 12 Feb 2007 17:27:36 +0000 (UTC) (envelope-from joao@matik.com.br) Received: from anb (anb.matik.com.br [200.152.83.34]) by msrv.matik.com.br (8.13.8/8.13.1) with ESMTP id l1CHRVwR046352; Mon, 12 Feb 2007 15:27:31 -0200 (BRST) (envelope-from joao@matik.com.br) From: JoaoBR Organization: Infomatik To: freebsd-stable@freebsd.org, kevin@insidesystems.net, brooks@freebsd.org Date: Mon, 12 Feb 2007 15:27:14 -0200 User-Agent: KMail/1.9.4 References: <200702121426.l1CEQIF4031564@lurza.secnetix.de> In-Reply-To: <200702121426.l1CEQIF4031564@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200702121527.15246.joao@matik.com.br> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on msrv.matik.com.br X-Virus-Status: Clean Cc: Subject: Re: Desired behaviour of "ifconfig -alias" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2007 17:27:37 -0000 On Monday 12 February 2007 12:26, Oliver Fromme wrote: > JoaoBR wrote: =2E... > > "ifconfig nic -alias" is obviously a wired and confusing behaviour > > It might be confusing to you. Personally I think that the > current behaviour isn't that far off. > the question is not you or me, I guess that you are like me perfectly capab= le=20 of working around messed things. But that does not make it being right or=20 acceptable. > First you need to be aware that there is no distinction > between a primary IP and alias IPs (such a distinction > existed historically, but it's gone). All of the IPs on > an interface are equal, just like hardlinks on a file. I said this in shorter words in my post but it is not the point at all.=20 > The "-alias" parameter simply removes an address from an man page tells us that it removes THE specified address ... not AN address > interface. The term "alias" should really be avoided > because it is misleading. You can use "delete" or "remove" > which do the same thing. I think "-alias" should really > be regarded to exist for backwards compatibility only. > Personally I always use "delete". > it is not misleading and it is a perfect term. With alias you add secondary= =20 addresses to an interface. Like secondary is probably the better word, as=20 cisco does, but what we have is alias and that is ok. It could be any other= =20 word so long as it works as it should. (We do have "add" also I remember.) also don't forget the following, alias is a perfect and usual term, then wh= en=20 I can add an IP address with the alias cmd then -alias should remove it. I know that I can add the first IP also with alias but that is not the usua= l=20 way. Also do not forget that the usual way since ever is ifconfig_nic_alias0 to= =20 add one. So this thing is confusing. > If no IP address is specified, then it's not completely > nonsensical to remove the first address. In fact I've > used that short-cut to quickly remove the only address > from an interface. I've used "ifconfig xyz0 delete" > quite a lot. the man page tells us that -alias removes *the* specified address and not t= he=20 first, also the man page does not say that there is any further action when= =20 *no* IP address specified delete is according to the man page another word for -alias, that means, us= ing=20 grammatical logic that -alias is the main command, then according to the ma= n=20 page there is no other command as "-alias *IP*" to remove an IP address=20 and -alias only should not remove anything > > > then already beeing here there is more, ifconfig nic alias does not > > return anything at all > > That's the same as "ifconfig nic add". If you don't tell > it anything to add, then it won't add anything, of course. > Remember that UNIX always tries to do exactly what you > tell it to dao. ;-) > you see, now you apply logic because you want to and when not not ... ;) to let it more clear what I mean, you say: "you don't tell it anything to a= dd"=20 so why the heck "ifconfig nic -alias" should remove one if I do not tell so? > > and ifconfig nic -alias on a nic w/o ip returns "can't assign > > requested address" ... > > That error corresponds to EADDRNOTAVAIL, which is the > correct errno to return, because there's no address left > on the interface. However, I agree that the message is > a bit confusing to the unfamiliar. at least one agreement here :) =2D-=20 Jo=E3o A mensagem foi scaneada pelo sistema de e-mail e pode ser considerada segura. Service fornecido pelo Datacenter Matik https://datacenter.matik.com.br