Table of Contents
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles!

Configure Windows with Multiple IP Addresses via PowerShell

Last Updated: Thu, Jun 18, 2020
Networking System Admin Windows Guides


A basic network configuration at Vultr consists of a single IPv4 address, configured by DHCP. If you have advanced networking requirements, Vultr supports multiple public IPs and up to five private networks. You need to manually configure these advanced scenarios. Refer to the networking configuration page in the customer portal for your exact configuration. This example demonstrates three public IPv4 addresses, two private IPv4 networks, and two public IPv6 addresses.

Note: Your network adapter names may not match the examples. See our article How to Find the Network Adapter Names for a Vultr Cloud Server.

This tutorial applies to:

  • Windows Server 2019
  • Windows Server 2016
  • Windows Server 2012 R2

1. Locate IP Info

Open the server information page in the customer portal. Make a note of the IP information. This tutorial uses the values shown below.

IPv4 Info


IPv6 Info


Click the network configuration link to locate the IPv4 DNS server information. This tutorial uses DNS servers:

  • IPv4 DNS:
  • IPv6 DNS: 2001:db8:1000::1

A secondary IPv6 address of 2001:db8:1000::200 will also be added to the public adapter.

2. Gather Information from Windows

  1. Connect to the server via RDP.
  2. Open an administrative PowerShell. (Start > Right-click on PowerShell > Run as Administrator)
  3. Look up the Adapter info.

    PS> Get-NetAdapter | Format-List -Property Name, ifIndex

    The report displays:

    Name                 : Ethernet
    ifIndex              : 1
    Name                 : Ethernet 2
    ifIndex              : 2
    Name                 : Ethernet 3
    ifIndex              : 3

    The interface Name corresponds to the adapter name in the Network and Sharing Center. The ifIndex is also known as InterfaceIndex in PowerShell. The ifIndex for your adapters will be different. For simplicity, this tutorial uses:

    • ifIndex 1: The public adapter
    • ifIndex 2: The first private adapter
    • ifIndex 3: The second private adapter
  4. Verify the current status of the public adapter.

    PS > Get-NetIPAddress -InterfaceIndex 1

    Verify IPAddress matches the Main IP shown on the server information page, and PrefixOrigin is "Dhcp" to confirm "InterfaceIndex 1" is the public adapter.

    IPAddress         :
    InterfaceIndex    : 1
    InterfaceAlias    : Ethernet
    AddressFamily     : IPv4
    Type              : Unicast
    PrefixLength      : 23
    PrefixOrigin      : Dhcp
    SuffixOrigin      : Dhcp

3. Make IP Changes

Making IP changes via RDP is not advised because the network will drop while changes are made. However, the web console does not allow copy-paste of the PowerShell commands below. For convenience, make a copy of the commands in Notepad on the server via RDP, then continue on the web console.

  1. Copy the following information into Notepad on the server while connected via RDP. Save the Notepad file to the desktop.
  2. Leave Notepad and your administrative PowerShell open.
  3. Disconnect your RDP session without logging out.
  4. Connect to the server via the web console. Notepad and PowerShell should still be open. You can copy-paste commands from Notepad to PowerShell, and the web console will remain connected when the network disconnects.
  5. Turn off DHCP on the public interface.

    PS> Set-NetIPInterface -InterfaceIndex 1 -Dhcp Disabled
  6. Set the static IP address on the public interface.

    PS> New-NetIPAddress –InterfaceIndex 1 –IPAddress –PrefixLength 23 -DefaultGateway -AddressFamily IPv4

    The parameters explained:

    • –InterfaceIndex 1: The public interface
    • –IPAddress The first public IP address
    • -PrefixLength 23: The prefix for Netmask
    • -DefaultGateway The gateway
    • -AddressFamily IPv4: This is an IPv4 configuration.
  7. Set a second static IP address on the public interface. A -PrefixLength of 32 sets the Netmask to

    PS> New-NetIPAddress –InterfaceIndex 1 –IPAddress –PrefixLength 32 -AddressFamily IPv4
  8. An example of a third static IP address on the public interface:

    PS> New-NetIPAddress –InterfaceIndex 1 –IPAddress –PrefixLength 32 -AddressFamily IPv4
  9. The public interface receives an IPv6 address via DHCP. Turn off IPv6 randomized privacy addressing:

    PS> Set-NetIPv6Protocol -RandomizeIdentifiers Disabled
    PS> Set-NetIPv6Protocol -UseTemporaryAddresses Disabled
  10. Add a second IPv6 address to the public interface.

    PS> New-NetIPAddress –InterfaceIndex 1 –IPAddress 2001:db8:1000::200 –PrefixLength 64 -AddressFamily IPv6
  11. Set the IPv4 and IPv6 DNS on the public interface. You may add multiple IPv4 and IPv6 DNS servers if desired.

    PS> Set-DnsClientServerAddress -InterfaceIndex 1 -ServerAddresses ("","2001:db8:1000::1")
  12. Add an IP address to the first private network, InterfaceIndex 2. A -PrefixLength of 20 sets the Netmask to

    PS> New-NetIPAddress –InterfaceIndex 2 –IPAddress –PrefixLength 20 -AddressFamily IPv4
  13. Add an IP address to InterfaceIndex 3, the second private network.

    PS> New-NetIPAddress –InterfaceIndex 3 –IPAddress –PrefixLength 20 -AddressFamily IPv4
  14. Set the MTU to 1450 bytes on both private network interfaces.

    PS> Set-NetIPInterface –InterfaceIndex 2 -NlMtuBytes 1450
    PS> Set-NetIPInterface –InterfaceIndex 3 -NlMtuBytes 1450

4. Verification

Verify the DNS servers are correct.

PS> Get-DnsClientServerAddress -InterfaceIndex 1 

InterfaceAlias               Interface Address ServerAddresses
                             Index     Family
--------------               --------- ------- ---------------
Ethernet                             1 IPv4    {}
Ethernet                             1 IPv6    {2001:db8:1000::1}

Verify the public gateway.

PS> Get-NetRoute -DestinationPrefix "" | Format-List -Property ifIndex, DestinationPrefix, NextHop

ifIndex           : 1
DestinationPrefix :
NextHop           :

Verify the IPv4 info for all adapters.

PS> Get-NetIPAddress -InterfaceIndex 1 -AddressFamily IPv4
PS> Get-NetIPAddress -InterfaceIndex 2 -AddressFamily IPv4
PS> Get-NetIPAddress -InterfaceIndex 3 -AddressFamily IPv4

Verify the IPv6 info for the public adapter.

PS> Get-NetIPAddress -InterfaceIndex 1 -AddressFamily IPv6

Verify the MTU setting. The public interface will be 1500, the two private adapters will be 1450.

PS> Get-NetIPInterface –InterfaceIndex 1 
PS> Get-NetIPInterface –InterfaceIndex 2 
PS> Get-NetIPInterface –InterfaceIndex 3 


Windows networking is fully configurable from the command-line. After completing these steps in PowerShell, these values will be visible in the GUI network dialogs.

Want to contribute?

You could earn up to $600 by adding new articles