Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 May 2010 07:15:01 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        John Levine <johnl@iecc.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Using different IP config than what DHCP provides
Message-ID:  <44r5loc6a2.fsf@lowell-desk.lan>
In-Reply-To: <hrutbc$1s1l$1@gal.iecc.com> (John Levine's message of "Thu, 6 May 2010 17:13:16 %2B0000 (UTC)")
References:  <hrutbc$1s1l$1@gal.iecc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
John Levine <johnl@iecc.com> 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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44r5loc6a2.fsf>