Using a laptop on different networks - DNS settings
- By Ramesh Srinivasan
- Published
My laptop is running Windows XP Professional and is connected to a domain. The IP address is obtained automatically from the router but the DNS entry is manually entered based on the domain controller's static address. All works fine. I want to make it easy for the user to take the laptop and use it on other networks where all the TCP/IP information is obtained automatically.
I have considered using the Alternate Configuration except that there is a DHCP server on both networks. Both networks have routers which are DHCP servers and the Alternate Configuration assumes that it won't find one in order to switch configurations. The only parameter that is different is either a manually configured DNS entry or an automatically assigned one.
You can create a script that sets the DNS addresses automatically. Another script (home.vbs) can set automatic DNS for your home configuration.
Please see this ready-made script from the Microsoft Script center. You can tailor this script as per your requirements.
How Can I Configure a Computer to Use a Dynamically-assigned DNS Server?
That article tells you how to set the DNS settings to manually assigned address, and the later part explains how to set the DNS address settings to automatic.
I've tried the script and it works very well, and the settings are immediately applied without needing a reboot.
