From owner-freebsd-net@FreeBSD.ORG Tue Aug 28 21:13:56 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 B2A3E16A420; Tue, 28 Aug 2007 21:13:56 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 491A113C45B; Tue, 28 Aug 2007 21:13:56 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id l7SLDsje032485; Tue, 28 Aug 2007 16:13:54 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id l7SLDsjO032484; Tue, 28 Aug 2007 16:13:54 -0500 (CDT) (envelope-from brooks) Date: Tue, 28 Aug 2007 16:13:54 -0500 From: Brooks Davis To: "Sean C. Farley" Message-ID: <20070828211354.GA31137@lor.one-eyed-alien.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-06) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Tue, 28 Aug 2007 16:13:55 -0500 (CDT) Cc: freebsd-net@freebsd.org Subject: Re: 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:13:56 -0000 --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 28, 2007 at 03:51:25PM -0500, Sean C. Farley wrote: > 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. >=20 > /etc/rc.conf > ifconfig_xl0=3D"DHCP" > ifconfig_xl0_alias0=3D"inet 192.168.1.46 netmask 255.255.255.255" > ifconfig_xl0_alias1=3D"inet 192.168.6.46 netmask 255.255.255.0" >=20 > The first address uses an alias-type netmask while the second is a > private network I have for QEMU. >=20 > I found that during PREINIT /sbin/dhclient-script is deleting the > 192.168.1.46 address when it runs this: >=20 > ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.2= 55=20 > up >=20 > 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? Off hand this sounds correct. We really want dhclient to leave any addresses other than ones it sets alone so always using alias directives is probably correct. -- Brooks > Sean >=20 > P.S. Please Cc me since I am not on this list. > --=20 > scf@FreeBSD.org Content-Description: dhclient-script patch > --- /sbin/dhclient-script 2006-05-12 22:24:00.000000000 -0500 > +++ /etc/dhclient-script 2007-08-28 15:25:30.000000000 -0500 > @@ -223,7 +223,7 @@ > =20 > PREINIT) > delete_old_alias > - ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.= 255 up > + ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.= 255 alias up > ;; > =20 > ARPCHECK|ARPSEND) > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFG1JASXY6L6fI4GtQRAnMcAKDU9JDAOAuuXbaI6mUlzteWDx/07QCePzve d1akxJjvafNSup1bVIi77+I= =diYj -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z--