Using different IP config than what DHCP provides

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Fri May 7 11:15:08 UTC 2010


John Levine <johnl at 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/


More information about the freebsd-questions mailing list