Two set of properties for a single wifi connection
I'm setting up my home wifi network and I'd like to be able to connect to it (thus to a single SSID) using two different set of properties (fixed MAC Address or random one, use DHCP or not to set the IP address, gateaway, dns) and switch between them easily. I currently have to re-specify all of them each time I switch, Windows doesn't even remember the previously set IP settings when you switch from DHCP to manual, so that's relatively painful.
Ideally I'd have two entries for one SSID in the list of available networks, one for each set but other solutions which would allow me to switch more easily than restating all the IP settings are acceptable.
Solution 1:
You could use the command line or a script to change the configuration using netsh
:
-
use netsh to find the name/s of your network connection/s:
netsh interface ip show config
-
use netsh to set a static IP addresss and default gateway and DNS e.g.:
netsh interface ip set address name="WLAN Connection" static 192.168.0.2 255.255.255.0 192.168.0.1 1
netsh interface ip set dns "WLAN Connection" static 8.8.8.8
-
use netsh to set a dynamic IP address e.g.
netsh interface ip set address "WLAN Connection" dhcp
netsh interface ip set dns "WLAN Connection" dhcp