Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a FreeBSD 8 machine which can use several wireless access points. I want it to use the first available network and automatically use DHCP or a static address as required (this should be configured separately for every network). Is it possible under FreeBSD?

share|improve this question
up vote 1 down vote accepted

Yes, you can do this by modifying /sbin/dhclient-script. That runs whenever the box goes to do a DHCP REQUEST on an interface after it comes up. In that script you could add some code that checks what SSID it is associated with and perhaps just configures the interface (and doesn't actually assign the DHCP IP). If you need help with the script part let me know.

share|improve this answer
Never mind, I've switched to Arch Linux which supports stuff like this out of the box – eugene y Sep 1 '11 at 8:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.