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

Tutorials
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?

USA VPS
Ubuntu VPS
Germany Cloud Servers
Linux KVM Hosting
KVM VPS
Brazil VPS
OpenVZ VPS
cPanel KVM
Linux Cloud Server
Windows Cloud Server

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.

Examples:

netsh interface ipv4  add address “Local Area Connection” 10.0.0.2  255.0.0.0
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:

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

Example:

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

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.

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.

img1

In the Properties window choose “Internet protocol version 4 (TCP/IPv4)” and click on Properties button.

img2

Click Advanced button in the next window.

img3

Here you have to click Add button next to IP addresses field.

img4

And add the IP address:

img5

Save the changes and your IP will be added to your Local Area Connection network interface.

cPanel KVM
Linux Cloud Server
OpenVZ VPS
KVM VPS
Windows Cloud Server
Germany Cloud Servers
Ubuntu VPS
Linux KVM Hosting
USA VPS
Brazil VPS
Rate this Tutorial:
No Comments