From owner-freebsd-questions@FreeBSD.ORG Fri May 7 11:15:08 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD1DB1065675 for ; Fri, 7 May 2010 11:15:08 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail4.sea5.speakeasy.net (mail4.sea5.speakeasy.net [69.17.117.48]) by mx1.freebsd.org (Postfix) with ESMTP id 94E508FC1D for ; Fri, 7 May 2010 11:15:08 +0000 (UTC) Received: (qmail 32214 invoked from network); 7 May 2010 11:15:08 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail4.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 7 May 2010 11:15:07 -0000 Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.6]) by be-well.ilk.org (Postfix) with ESMTP id D8DA95085E; Fri, 7 May 2010 07:15:01 -0400 (EDT) Received: by lowell-desk.lan (Postfix, from userid 1147) id 1B7B41CC30; Fri, 7 May 2010 07:15:01 -0400 (EDT) From: Lowell Gilbert To: John Levine References: Date: Fri, 07 May 2010 07:15:01 -0400 In-Reply-To: (John Levine's message of "Thu, 6 May 2010 17:13:16 +0000 (UTC)") Message-ID: <44r5loc6a2.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Using different IP config than what DHCP provides X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2010 11:15:08 -0000 John Levine writes: > I run FreeBSD 8.0 on my laptop, works great, when I take it with me I > open it up, wpa_supplicanr finds a network and DHCP configures it. > > On a few networks, though, I want to use a different network setup than > the one that DHCP provides. Is there any reasonable way to arrange > so that when I'm connected to specific network SSIDs, It runs a config > script I write rather than running dhclient, perhaps with a shim in > front of dhclient? > > The situation, in case you're wondering, is that the wifi in most of > the local coffee shops is run by the same ISP that hosts my servers, > and when I'm on their network, I want to set up in my IP range rather > than the default one DHCP offers. It is a pain to have to kill > dhclient and do the ifconfig and route commands manually. There are enough hooks in dhclient-script(8) to do this, assuming you have some way for the system to recognize where it is programatically. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/