Static/DHCP Addressing switch


T

TonyB

We are currently migrating from a static addressed based NT domain to a
DHCP/DDNS Win2k A/D domain, and are looking at the simplest way to switch
everyone over from static to DHCP without visiting every machine. As the
domain name is also changing, we have extra problems that need to be
resolved.

I have scripts that (using NETSH) change the address and dns to DHCP. This
part seems to work ok for the addressing, but it doesn't change the Primary
DNS Suffix, DNS Suffix search list or Connection-specific DNS suffix (even
though some of them should be allocated from the DHCP server!)

netsh interface ip set address "Local Area Connection" source=dhcp
netsh interface ip set dns "Local Area Connection" source=dhcp

The second VBS script changes the Domain, NV Domain and domain search list
to the new, correct settings. This updates the Primary DNS Suffix to the new
Win2k domain name, but I cannot see a way to automatically change the
connection-specific DNS suffix, and this is adapter specific, and each
adapter on each machine has a unique ServiceName.

SET WSHShell = CreateObject("WScript.Shell")
WSHShell.RegWrite
"HKLM\System\CurrentControlSet\Services\TCPIP\Parameters\Domain",
"comm.ad.roke.co.uk", "REG_SZ"
WSHShell.RegWrite
"HKLM\System\CurrentControlSet\Services\TCPIP\Parameters\NV Domain",
"comm.ad.roke.co.uk", "REG_SZ"
WSHShell.RegWrite
"HKLM\System\CurrentControlSet\Services\TCPIP\Parameters\SearchList",
"comm.ad.roke.co.uk,ad.roke.co.uk,roke.co.uk", "REG_SZ"

Is there any way to automatically change (via script) the domain name within
the active network connection?

Our problems are compounded by the fact that we have two networks, one where
most people have Local Admin rights (which are needed for this script to
work), and the second in which most only have User rights, so the script
breaks. I cannot obviously see a way to automate this when the client does
not have Local Admin rights. Are we stuck for this other network?

Also, from the DHCP server we are allocating the following scope options;

003 Router
006 DNS Servers
015 DNS Domain Name
046 WINS/NBT Node Type

I was under the impression there was a scope option 081 which can be used to
allocation a DNS domain search list from the DHCP server. Where is it?

Thanks

Tony
 
Ad

Advertisements

B

Brian Oakes [MSFT]

Option 81 isn't supported by the client... BUT you can go ahead and use a
Windows 2000 Group Policy to apply this to your clients. Assuming your
clients are atleast Windows 2000 Pro. If they aren't you are stuck.

Group policies have alot more strength then most people consider, but...
with the strength comes increased complexity so makes sure you test this
completely. But creating a Group Policy to assign the suffix will work. :)
--

Brian Oakes

This posting is provided "AS IS" with no warranties and confers no rights.
Please reply to the newsgroup so that others may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top