From owner-freebsd-net@FreeBSD.ORG Tue Aug 28 21:05:40 2007 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 3C83C16A418 for ; Tue, 28 Aug 2007 21:05:40 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id D499913C468 for ; Tue, 28 Aug 2007 21:05:39 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l7SKpPo1007188; Tue, 28 Aug 2007 15:51:25 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Tue, 28 Aug 2007 15:51:25 -0500 (CDT) From: "Sean C. Farley" To: freebsd-net@FreeBSD.org Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-500783598-1188334285=:2740" X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on mail.farley.org Cc: "Sean C. Farley" Subject: dhclient multiple aliases limitation 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: Tue, 28 Aug 2007 21:05:40 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-500783598-1188334285=:2740 Content-Type: TEXT/PLAIN; format=flowed; charset=us-ascii I currently have a setup on a laptop where I have two aliases that I always want present. I would like to setup two aliases in /etc/dhclient.conf to handle having the Ethernet cable plugged in after boot, but dhclient has a limit of handling only one alias. /etc/rc.conf ifconfig_xl0="DHCP" ifconfig_xl0_alias0="inet 192.168.1.46 netmask 255.255.255.255" ifconfig_xl0_alias1="inet 192.168.6.46 netmask 255.255.255.0" The first address uses an alias-type netmask while the second is a private network I have for QEMU. I found that during PREINIT /sbin/dhclient-script is deleting the 192.168.1.46 address when it runs this: ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up A possible solution that works for me is to add an "alias" to this line. It appears to work, but I do not know if this would cause problems elsewhere or for other scenarios. Does anyone see any problems with this change? Sean P.S. Please Cc me since I am not on this list. -- scf@FreeBSD.org --0-500783598-1188334285=:2740 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=dhclient-script.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: dhclient-script patch Content-Disposition: attachment; filename=dhclient-script.patch LS0tIC9zYmluL2RoY2xpZW50LXNjcmlwdAkyMDA2LTA1LTEyIDIyOjI0OjAw LjAwMDAwMDAwMCAtMDUwMA0KKysrIC9ldGMvZGhjbGllbnQtc2NyaXB0CTIw MDctMDgtMjggMTU6MjU6MzAuMDAwMDAwMDAwIC0wNTAwDQpAQCAtMjIzLDcg KzIyMyw3IEBADQogDQogUFJFSU5JVCkNCiAJZGVsZXRlX29sZF9hbGlhcw0K LQlpZmNvbmZpZyAkaW50ZXJmYWNlIGluZXQgMC4wLjAuMCBuZXRtYXNrIDAu MC4wLjAgYnJvYWRjYXN0IDI1NS4yNTUuMjU1LjI1NSB1cA0KKwlpZmNvbmZp ZyAkaW50ZXJmYWNlIGluZXQgMC4wLjAuMCBuZXRtYXNrIDAuMC4wLjAgYnJv YWRjYXN0IDI1NS4yNTUuMjU1LjI1NSBhbGlhcyB1cA0KIAk7Ow0KIA0KIEFS UENIRUNLfEFSUFNFTkQpDQo= --0-500783598-1188334285=:2740--