How to Set the IP Address on Windows 2008 Server Core

Type the following in a console window:

1
netsh interface ipv4 show interface

It should output something like this

IPAddress01

As you can see, our interface have ID 2 (column Idx).

Then to set the ip address type the following (replacing the address, netmask and gateway with your own values):

1
netsh interface ipv4 set address name=”2” source=static address=192.168.0.10 mask=255.255.255.0 gateway=192.168.0.1

Next it’s time to set up addresses to DNS servers, type:

1
netsh interface ipv4 add dnsserver name=”2” address=192.168.0.11

To add more DNS servers just type the above command again with another ip address.

1
ipconfig /all

To check all settings you just med are correct you can type:

Witch should output something like this..

IPAddress02

Other useful netsh commands:

Delete ip address from a interface:

1
netsh interface ipv4 delete address “Local Area Connection” addr=192.168.0.10 gateway=all

Delete DNS server from a interface:

1
netsh interface ipv4 delete dnsserver “Local Area Connection” 192.168.0.10
1
netsh interface ipv4 delete dnsserver “Local Area Connection” all

Substitute “Local Area Connection” with the name on the interface you want to act on.

Related Posts