Q. How do I use the command line to configure Windows Server 2008 and Windows Vista IPv4 static IP information?
June 12, 2008
A. The syntax used with the Netsh interface to configure Server 2008 and Vista static IP information has changed due to IPv6 inclusion. Here's how I used the command line to configure Server 2008 and Vista IPv4 static IP information.
I determined the interface to configure (because Server 2008 and Vista have several). I listed the interfaces using the command
netsh interface ipv4 show interfaces
The output was:
I designated the physical adapter index 2.
Then I configured a static IP address.
netsh interface ipv4 set address name="2" source=static address=10.1.1.11 mask=255.255.255.0 gateway=10.1.1.10
Next I added the DNS servers. The primary DNS server's index is 1.
netsh interface ipv4 add dnsserver name="2" address=192.168.1.230 index=1
To add a secondary DNS server, I repeated the add dnsserver command but designated the new server's index as 2.
netsh interface ipv4 add dnsserver name="2" address=192.168.1.230 index=2
To configure primary and secondary WINS servers, I'd utilize exactly the same syntax I employed to add the DNS servers, but in the code I'd substitute winsserver for dnsserver. The first index would be the primary WINS server and the second index would be the secondary WINS server.
About the Author
You May Also Like