Microsoft Windows Server with Multiple IPs Assigned to a Single Interface

First, I try to avoid this whenever possible. I don’t like the idea of having multiple IP’s on one NIC interface. But there are environments that have this. This is just something to keep in mind when you’re using this setup. Windows will use the lowest IP address for the default source routing interface but it’s good to verify this.

This could cause problems especially when you need to open firewall ports and you keep getting the wrong Source IP. If I had a dollar for every ticket request I got with the wrong Source IP, I’d be retired. 🙂

To view what IP is the “active” source IP, run this command:

netsh int ipv4 show ipaddresses level=verbose

Address 172.16.30.11 Parameters
---------------------------------------------------------
Interface Luid     : Public Team
Scope Id           : 0.0
Valid Lifetime     : infinite
Preferred Lifetime : infinite
DAD State          : Preferred
Address Type       : Manual
Skip as Source     : false

Address 172.16.30.12 Parameters
---------------------------------------------------------
Interface Luid     : Public Team
Scope Id           : 0.0
Valid Lifetime     : infinite
Preferred Lifetime : infinite
DAD State          : Preferred
Address Type       : Manual
Skip as Source     : true

What you’re looking for is the “Skip as Source” entry. This dictates which interface will be initiating outgoing traffic communications. You want it be FALSE if you want that interface to be the source or the one initiating outgoing traffic. So above you have .11 as your source.

When “Skip as Source” is set to True, that IP address will not be registered in DNS. Traffic also will obviously not be initiated from that IP unless the application specifically binds to it.

To make changes, for instance you want .12 to be the source. Do this:

netsh int ipv4 add address "Ethernet0" 172.16.30.11/24 SkipAsSource = true
netsh int ipv4 add address "Ethernet0" 172.16.30.12/24 SkipAsSource = false

You can also look at the local routing table to see which IP is the source:

C:\>route print
===========================================================================
Interface List
  8...3c fd fe ad fa b8 ......Intel(R) Ethernet Converged Network Adapter X710-2
 14...3c fd fe ad f7 f0 ......Intel(R) Ethernet Converged Network Adapter X710-2 #2
 10...02 9a f8 4d 20 f1 ......Microsoft Failover Cluster Virtual Adapter
 18...24 6e 96 7d ae f1 ......Microsoft Network Adapter Multiplexor Driver
  1...........................Software Loopback Interface 1
 16...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
  2...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
 11...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      172.16.30.1    172.16.30.12    276
More Stories
Palo Alto Out of Sync Packets