Multiple IP Addresses on a NIC
This tutorial shows you how to assign multiple IP addresses to the same Network Interface Card (NIC) on Windows 10
Last updated
This tutorial shows you how to assign multiple IP addresses to the same Network Interface Card (NIC) on Windows 10
Last updated
There are a few situations where you want/need to assign more than one IP Address to a single Network Interface. A couple of examples are:
Binding to the same port on two different applications
Connecting to different network ranges with a single interface
Lets take the first example above and say you have two applications running on the same computer and you need both of them to receive Art-Net.
The Art-Net UDP port (6454) is defined by the standard, and it is highly unlikely that you will be able to change it on these applications. The issue here will be how can they both receive from the same UDP port, since a port can only be opened by a single application at a time (or not... keep reading... ).
In the most usual scenario, after the first application "binds" to that port (meaning, it will ask the Operating System to receive any incoming data for that port), subsequent bind attempts to the same port will fail, because the port will be already "in use" by the first application.
Except... There are two types of port binds:
Global Port Bind - bind to the port only (incoming data can arrive from ANY network interface)
The port must be exclusive within the system
IP/Port Pair Bind - bind to a port on a certain (local) IP address (any incoming data that arrives with a different destination IP address than the one bound will be ignored)
The IP+Port pair must be exclusive within the system
So, naturally, if the applications provide a way to bind to a IP+Port pair, we can use this "trick" to bind the same port on multiple applications. The very first step to do that is to assign multiple IP addresses to your interface.
Tip: this works for regular Network Interfaces, as well as for Loopback Interfaces
Win+R opens the "Run" dialog
Type "ncpa.cpl" and click OK
Right-click the adapter and click on Properties
Select "Internet Protocol Version 4 (TCP/IPv4)" in the list
Click the "Properties" button below the list
This will bring up the regular IPv4 settings dialog:
In the example above, we have already set this adapter to use the IP/Mask 2.0.0.1/8.
If you click the "Advanced..." button on the bottom, you will be shown a new dialog, as the one below.
Under the "IP Settings", "IP Addresses" group, if you click on the "Add..." button, you will be able to enter a new IP address (and mask) for this interface.
Make sure your IP Addresses are unique in the network (i.e. within the network, an IP address cannot be used by more than one computer)
Adding the IP address above, will make it appear on the list.
You can add as many IP addresses as you need
Once you're satisfied, click "OK" on all the dialogs to apply the new settings.
From this point on, with the configuration above, you can reach this computer via two different IP addresses: 2.0.0.1 and 2.0.0.101.
Now that we have configured two IP addresses for the same interface, we can configure our ArtNet applications from the example above:
Application 1: bind to IP 2.0.0.1, UDP port 6454 (Art-Net)
Application 2: bind to IP 2.0.0.101, UDP port 6454 (Art-Net)
If you want to send Art-Net data to Application 1, send it to IP 2.0.0.1. In the same way, if you want to send Art-Net data to Application 2, send it to IP 2.0.0.101.
This is how two different applications that bind to the same port can coexist in the same system.