How to set up an additional IP on Windows OS?
If you have bought more than one IP address, you may need to set up additional IP addresses on your Windows Server operating system. You can set up your IP addresses in two different ways – via command line or via graphic interface. This tutorial will teach you how to assign additional IP addresses to your network interface using both methods.
Adding an IP address via command line
Windows has a great command –
netsh – which allows you to manage your network connections with ease. Type “
netsh help” in command line to see the full list of available commands.
In order to add a new IP address to your network interface, you have to use the following string:
netsh interface ipv4 add address
NOTE: You must use ip instead of ipv4 for Windows Server 2003/XP and earlier versions.
netsh interface ipv4 add address “Local Area Connection” gateway=10.0.0.3 gwmetric=2
The first command adds a static IP address of 10.0.0.2 with a subnet mask of 255.0.0.0 to the Local Area Connection interface. The second command adds the IP address of 10.0.0.3 as a second default gateway for this interface with a gateway metric of 2.
Adding multiple IP addresses via command line
Windows also allows you to do add a whole range of IP addresses with just one command. The loop for can be used for this purpose:
This command will add all IP addresses from 192.168.0.1 to 192.168.0.145 with 255.255.255.0 subnet to the “Local Area Connection” network interface.
The status of network interfaces configuration can be checked with the following command:
Adding IP addresses via graphic interface
As it was already mentioned before, the IP addresses can also be added via graphical interface.
Navigate to Control Panel -> Network and Internet -> Network Connections and click the right button on “Local Area Connection” network interface and select Properties.
In the Properties window choose “Internet protocol version 4 (TCP/IPv4)” and click on Properties button.
Click Advanced button in the next window.
Here you have to click Add button next to IP addresses field.
And add the IP address:
Save the changes and your IP will be added to your Local Area Connection network interface.