We use cookies to improve our services and provide a better experience. By continuing to use this site, you agree with our Cookies Policy.

More than 400 step-by-step articles to guide you through online project development.
HomeTutorialsOperating SystemsWindowsWeb Server

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”
netsh interface ipv4 add address “Local Area Connection” gateway= gwmetric=2

The first command adds a static IP address of with a subnet mask of to the Local Area Connection interface. The second command adds the IP address of 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:

FOR /L %variable IN (start,step,end) DO command


FOR /L %IP N (1,1,145) netsh interface ipv4 add address “Local Area Connection” 192.168.0.%IP

This command will add all IP addresses from to with subnet to the “Local Area Connection” network interface.

Configuration status

The status of network interfaces configuration can be checked with the following command:

ipconfig /ALL

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.

Rate this Tutorial:
No Comments