Information Technology Reference
In-Depth Information
> netsh interface ip add address "Local Area Connection" 10.1.1.150 255.255.255.0
Using the Registry
The Registry entries controlling IP configuration are stored in a subkey of Tcpip\Parameters\
Interfaces that corresponds to the GUID of the NIC. If you have more than one NIC installed
in your server, you can find the one that corresponds to a particular IP by using the following
commands:
> wmic nicconfig get ipaddress,settingid > \foo.txt
> for /f "tokens=2" %a in ('type foo.txt ^| findstr " <IP Address> "') do echo %a
Note You can enumerate the GUID for all installed NICs in your server by eliminating the ^| findstr
" <IP Address> " portion of that command.
When assigning an IP address to a NIC using the Registry, you may have also noticed that
the IPAddress , SubnetMask , and DefaultGateway Registry values listed in this section are all
REG_MULTI_SZ values, which means that they can hold more than one value. To add multiple IP
addresses to a single NIC, simply add more than one IP address to these three Registry keys—
you can separate them using the Enter key or the space bar. Populating both the IPAddress and
SubnetMask Registry keys is mandatory when adding an additional IP to a NIC—the additional
IP address will not be recognized unless you add an entry to both keys. The DefaultGateway key
is optional when specifying additional IP addresses—if you do not specify a new default gateway,
it will use the gateway that is already in place for that NIC.
Note To remove an additional static IP address from the Registry, simply delete the IP address and corre-
sponding subnet mask from the IPAddress and SubnetMask keys.
How It Works
When configuring a NIC in Windows Server 2003, you'll typically only configure a single IP
address, subnet mask, and default gateway for each installed NIC. But in some cases, particu-
larly when you're dealing with a web server and SSL certificates, you can assign more than one
IP address on one physical NIC. This will allow you to assign a unique IP address to multiple
websites without needing to install additional hardware in your server.
At a minimum, you need to configure a subnet mask associated with each additional IP
address; unless you specify otherwise, all configured IP addresses will use the default gateway
assigned to the physical NIC. Keep in mind, however, that this process will increase the perfor-
mance demands on the NIC for each additional IP address that it needs to route and manage
traffic for.
Search WWH ::




Custom Search