Menu
Amazon Elastic Compute Cloud
User Guide for Windows Instances

Configuring a Secondary Private IPv4 Address for Your Windows Instance in a VPC

On the EC2-VPC platform, you can specify multiple private IPv4 addresses for your instances. After you assign a secondary private IPv4 address to an instance in a VPC, you must configure the operating system on the instance to recognize the secondary private IPv4 address.

Configuring the operating system on a Windows instance to recognize a secondary private IPv4 address requires the following:

Note

These instructions are based on Windows Server 2008 R2. The implementation of these steps may vary based on the operating system of the Windows instance.

Prerequisites

Before you begin, make sure you meet the following requirements:

Step 1: Configure Static IP Addressing on Your Windows Instance

To enable your Windows instance to use multiple IP addresses, you must configure your instance to use static IP addressing rather than a DHCP server.

Important

When you configure static IP addressing on your instance, the IP address must match exactly what is shown in the console, CLI, or API. If you enter these IP addresses incorrectly, the instance could become unreachable.

To configure static IP addressing on a Windows instance

  1. Connect to your instance.

  2. Find the IP address, subnet mask, and default gateway addresses for the instance by performing the following steps:

    1. Choose Start. For Search, type cmd to open a command prompt window, and then press Enter.

    2. At the command prompt, run the following command: ipconfig /all. Review the following section in your output, and note the IPv4 Address, Subnet Mask, Default Gateway, and DNS Servers values for the network interface.

      Copy
      Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Physical Address . . . . . . . . : DHCP Enabled. . . . . . . . . . . : Autoconfiguration Enabled . . . . : IPv4 Address. . . . . . . . . . . : 10.0.0.131 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 10.0.0.1 DNS Servers . . . . . . . . . . . : 10.1.1.10 10.1.1.20
  3. Open the Network and Sharing Center by running the following command from the command prompt:

    Copy
    C:\> %SystemRoot%\system32\control.exe ncpa.cpl

  4. Open the context (right-click) menu for the network interface (Local Area Connection) and choose Properties.

  5. Choose Internet Protocol Version 4 (TCP/IPv4), Properties.

  6. In the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box, choose Use the following IP address, enter the following values, and then choose OK.

    Field Value
    IP address The IPv4 address obtained in step 2 above.
    Subnet mask The subnet mask obtained in step 2 above.
    Default gateway The default gateway address obtained in step 2 above.
    Preferred DNS server The DNS server obtained in step 2 above.
    Alternate DNS server The alternate DNS server obtained in step 2 above. If an alternate DNS server was not listed, leave this field blank.

    Important

    If you set the IP address to any value other than the current IP address, you will lose connectivity to the instance.

    
							IP Addresses

You will lose RDP connectivity to the Windows instance for a few seconds while the instance converts from using DHCP to static addressing. The instance retains the same IP address information as before, but now this information is static and not managed by DHCP.

Step 2: Configure a Secondary Private IP Address for Your Windows Instance

After you have set up static IP addressing on your Windows instance, you are ready to prepare a second private IP address.

To configure a secondary IP address for a Windows instance

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Instances and select your instance.

  3. On the Description tab, note the secondary IP address.

  4. Connect to your instance.

  5. On your Windows instance, choose Start, Control Panel.

  6. Choose Network and Internet, Network and Sharing Center.

  7. Select the network interface (Local Area Connection) and choose Properties.

  8. On the Local Area Connection Properties page, choose Internet Protocol Version 4 (TCP/IPv4), Properties, Advanced.

  9. Choose Add.

  10. In the TCP/IP Address dialog box, type the secondary private IP address for IP address. For Subnet maskx, type the same subnet mask that you entered for the primary private IP address in Step 1: Configure Static IP Addressing on Your Windows Instance , and then choose Add.

    
              TCP/IP Address dialog box
  11. Verify the IP address settings and choose OK.

    
              IP Settings tab
  12. Choose OK, Close.

  13. To confirm that the secondary IP address has been added to the operating system, at a command prompt, run the command ipconfig /all.

Step 3: Configure Applications to Use the Secondary Private IP Address

You can configure any applications to use the secondary private IP address. For example, if your instance is running a website on IIS, you can configure IIS to use the secondary private IP address.

To configure IIS to use the secondary private IP address

  1. Connect to your instance.

  2. Open Internet Information Services (IIS) Manager.

  3. In the Connections pane, expand Sites.

  4. Open the context (right-click) menu for your website and choose Edit Bindings.

  5. In the Site Bindings dialog box, for Type, choose http, Edit.

  6. In the Edit Site Binding dialog box, for IP address, select the secondary private IP address. (By default, each website accepts HTTP requests from all IP addresses.)

    
							IP Addresses
  7. Choose OK, Close.

Configure a Secondary Elastic Network Interface

You can attach a second elastic network interface to the instance.

To configure a second network interface

  1. Configure the static IP addressing for the primary elastic network interface as per the procedures above in Step 1: Configure Static IP Addressing on Your Windows Instance .

  2. Configure the static IP addressing for the secondary elastic network interface as per the same procedures.