Multiple static IPs on specific wifi SSIDs and DHCP elsewhere?

I'd like to use static IPs for my home wifi, but DHCP on any other unrelated SSID I might connect to outside the house.

Would something like this work in rc.conf?

Code:
# Wifi
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
ifconfig_wlan0="WPA inet '192.168.1.150/24' ssid 'Highgate (5GHz)'"
ifconfig_wlan0="WPA inet '192.168.1.150/24' ssid 'The Crossroads (2.4GHz)'"
ifconfig_wlan0_ipv6="inet6 accept_rtadv"
 
you may configure your home dhcp server to give your laptop a fixed ip based on it's mac address and then leave rc.conf to syncdhcp
or maybe you can hack dhclient-script / dhclient.conf somehow (not sure what is possible and if it's worth the effort)
 
Back
Top