From owner-freebsd-rc@FreeBSD.ORG Mon Oct 17 21:09:11 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF7A716A41F for ; Mon, 17 Oct 2005 21:09:11 +0000 (GMT) (envelope-from cryx-freebsd@h3q.com) Received: from mail.h3q.com (mail.h3q.com [217.13.206.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFF3643D4C for ; Mon, 17 Oct 2005 21:09:10 +0000 (GMT) (envelope-from cryx-freebsd@h3q.com) Received: (qmail 76934 invoked from network); 17 Oct 2005 21:08:30 -0000 Received: from unknown (HELO ?23.23.23.242?) (cryx@212.202.201.68) by mail.h3q.com with AES256-SHA encrypted SMTP; 17 Oct 2005 21:08:30 -0000 Message-ID: <435412F7.2030906@h3q.com> Date: Mon, 17 Oct 2005 23:09:11 +0200 From: Philipp Wuensche User-Agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-rc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: alias configuration in rc.conf X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 21:09:11 -0000 Hi, I don't know if this is the right place, but I created a patch to /etc/network.subr and /etc/rc.d/netif to add a simpler alias configuration in rc.conf. Using the ifconfig_fxp0_aliasN="" syntax is error prone. If you forget to number N serially correct, /etc/rc.d/netif does not configure all aliases to the interface. Other weird things happen if N is not uniqe. Configuring a large number of aliases to an interface (e.g. in jail-hosting systems) fills up the rc.conf very fast, making the configuration complex. With the patches, alias configuration gets a lot easier. At the moment I use the ipv4_ifconfig variable, its not jet used. Mayby something else would be better. Using ranges in the last byte of the ipaddr. allows to configure more than one ipaddr in one statement. The syntax is as follow: ipv4_ifconfig_fxp0="192.168.0.1/24 23.23.23.5-23/24" This will configure fxp0 with the alias 192.168.0.1/24, 23.23.23.5/24 and 23.23.23.6-23/32 You can find the patch at http://outpost.h3q.com/patches/network.subr-range.patch Comments and testreports are very welcome :-) greetings, cryx