Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Assign Multiple IP Addresses (Aliases) to a Single NIC

April 12, 2019 PowerShellWindows 10Windows Server 2012 R2Windows Server 2016

Assign Multiple IP Addresses (Aliases) to a Single NIC

In some cases an administrator needs to configure multiple IP addresses one a single network interface (NIC) in Windows. An example of such situations can be the need to run multiple sites with unique IP addresses and SSL certificates (e. g., SSL certificates from Let’s Encrypt) on one IIS or Apache server, preparing to change of IP addressing in a subnet, binding the applications to different IP addresses, etc.

Let’s consider how to add an additional static IP address on a network interface in Windows 10 (in the same way you can add an additional IP address to a NIC on Windows Server). First of all, make sure that only one IP address is assigned to your Ethernet network adapter. To do it, run this command:

ipconfig

ipconfig - getting current ip address

As you can see, one IP address (192.168.1.90) is assigned to the local network connection (it is called Ethernet0 in my case).

You can add the second static IP address in a number of ways.

Contents:
  • How to Add an Additional IP Address via Windows GUI?
  • SkipAsSource Flag
  • How to Assign the Second IP Address Using Netsh Command?
  • Adding Secondary IP Address Using PowerShell

How to Add an Additional IP Address via Windows GUI?

You can add the second IP address from the Windows GUI.

  1. Open the Control Panel –> Network and Internet –> Network and Sharing Center -> Change adapter settings (or just run the ncpa.cpl command);
  2. Open the properties of your network interface;
  3. Select TCP/IP v4 in the list of protocols and click Properties; tcp-ip properties windows 10
  4. Click the Advanced button and then press Add in the IP Addresses section;
  5. Specify an additional IP address, IP subnet mask and click Add;
  6. Save the changes by clicking OK several times. Assigning multiple IP addresses to single NIC in Windows 10

Using the ipconfig command, make sure that the second IP address has appeared on this interface.

Adding additional IP addresses on windows

Check the availability of the second IP address from other computers in the same network using the ping command. It should respond.

ping the secondary ip address

SkipAsSource Flag

The main drawback of adding the second IP address using this method is that the SkipAsSource (SkipAsSource=False) flag is not enabled for it. If SkipAsSource is enabled (True), the IP address won’t be used by the system for outbound connections, except if it is explicitly used by a certain application. Also, if the flag is enabled, the second IP address is not registered in the DNS (even when the dynamic registration is enabled). In general, you can set the main IP address using SkipAsSource parameter.

How to Assign the Second IP Address Using Netsh Command?

You can assign an additional IP address from the command prompt using the Netsh utility. This command also allows you to set the SkipAsSource for an IP address.

Open the command prompt as administrator and run this command:

Netsh int ipv4 add address name="Local Area Connection" 192.168.1.92 255.255.255.0 SkipAsSource=True

Adding Secondary IP Address Using PowerShell

You can also add a second IP alias to a network interface using the NetIPAddress PowerShell cmdlets (this cmdlet appeared in PowerShell version in Windows 2012 / Windows 8.)

Display the list of available interfaces:

Get-NetIPAddress | ft IPAddress, InterfaceAlias, SkipAsSource

Get-NetIPAddress

IPAddress InterfaceAlias SkipAsSource<
--------- -------------- ------------
172.23.53.241 vEthernet False
192.168.1.90 Ethernet0 False
127.0.0.1 Loopback Pseudo-Interface 1 False

To add an additional IP address for the Ethernet0 NIC, run this command:

New-NetIPAddress –IPAddress 192.168.1.92 –PrefixLength 24 –InterfaceAlias “Ethernet0” –SkipAsSource $True

New-NetIPAddress adding the secondary ip alias to a NIC
IPAddress : 192.168.1.92
InterfaceIndex : 11
InterfaceAlias : Ethernet0
AddressFamily : IPv4
Type : Unicast
PrefixLength : 24
PrefixOrigin : Manual
SuffixOrigin : Manual
AddressState : Tentative
ValidLifetime : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource : True
PolicyStore : ActiveStore

To modify SkipAsSource parameter and allow the outgoing traffic from this IP address of the network interface, use this command:

Get-NetIPAddress 192.168.1.92 | Set-NetIPAddress -SkipAsSource $False

powershell: Set-NetIPAddress SkipAsSource

7 comments
1
Facebook Twitter Google + Pinterest
previous post
Configuring an FTP Server with User Isolation on Windows Server 2016 / 2012 R2
next post
Restricting Group Policy with WMI Filtering

Related Reading

Configuring Event Viewer Log Size on Windows

May 24, 2023

How to Detect Who Changed the File/Folder NTFS...

May 24, 2023

Enable Single Sign-On (SSO) Authentication on RDS Windows...

May 23, 2023

Allow Non-admin Users RDP Access to Windows Server

May 22, 2023

How to Create, Change, and Remove Local Users...

May 17, 2023

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configuring Event Viewer Log Size on Windows

    May 24, 2023
  • How to Detect Who Changed the File/Folder NTFS Permissions on Windows?

    May 24, 2023
  • Enable Single Sign-On (SSO) Authentication on RDS Windows Server

    May 23, 2023
  • Allow Non-admin Users RDP Access to Windows Server

    May 22, 2023
  • How to Create, Change, and Remove Local Users or Groups with PowerShell?

    May 17, 2023
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

    May 16, 2023
  • View Success and Failed Local Logon Attempts on Windows

    May 2, 2023
  • Fix: “Something Went Wrong” Error When Installing Teams

    May 2, 2023
  • Querying Windows Event Logs with PowerShell

    May 2, 2023
  • Configure Windows LAPS (Local Administrator Passwords Solution) in AD

    April 25, 2023

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Create a UEFI Bootable USB Drive to Install Windows 10 or 7?
  • Managing Printers and Drivers with PowerShell in Windows 10 / Server 2016
  • Deploy PowerShell Active Directory Module without Installing RSAT
  • Managing User Photos in Active Directory Using ThumbnailPhoto Attribute
  • RDP Brute Force Protection with PowerShell and Windows Firewall Rules
  • Match Windows Disks to VMWare VMDK Files
  • Active Directory Dynamic User Groups with PowerShell
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top