Note the Idx
number of the interface you are interested in modifying. On my test server, I have only
one network interface, excluding the loopback interface, so that??™s what I will be modifying
in this example.
I will set my network interface to have the static IP address 192.168.100.75 with a
subnet mask of 255.255.255.0 and a default gateway of 192.168.100.1. If I look at the Idx
number for my Local Area Connection in Figure 2-4, I can see that the value is 2 for my
network interface. Putting all this information together, I can now run the following
command to set these values:
Netsh interface ipv4 set address name=2 source=static
address=192.168.100.75 mask=255.255.255.0 gateway=192.168.100.1
Since DNS is so critical to Windows Server 2008, especially in an Active Directory
domain, I would also need to configure the DNS Servers for this server. In this case,
Figure 2-4. List of network interfaces using Netsh
33 Chapter 2: Server Core
I want to set this interface to use the DNS Server with the IP address 192.168.100.40. To
set this value, I run the following command:
Netsh interface ipv4 add dnsserver name=2 address=192.168.100.40
If more than one interface needs to be configured, I would simply repeat this process
for every interface. If you are trying to set up network interface card (NIC) teaming or
failover, you should consult your vendor??™s documentation to determine how to accomplish
this task in Server Core, since most vendors supply graphical interfaces to configure
these advanced options, and those will not run on a Server Core installation.
Pages:
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70