Miikka walks you through
setting a static private IP address
for an EC2 instance running Windows

static-private-ip-windows-miikka

I am using an Amazon EC2 Windows instance and a private IP address was automatically assigned to it. Do I need to assign a static IP address for that EC2 instance?

You do not need to set a static private IP address on a Windows EC2 instance, but in some cases you may need to use two private IP addresses for your Windows network adapter.

When EC2 instances are launched, the primary elastic network interface is assigned a reserved private IP address from the default VPC DHCP pool.

The private IP address stays assigned to the network interface until it is deleted. The instance's primary network interface cannot be removed; it stays assigned to the instance until the instance is deleted. It is not possible to remove or change the private IP address of the primary network interface, but it is possible to add more private IP addresses to the network interface.

Note: You can manually assign a static private IP address for your Windows network adapter, but if the network interface IP address and Windows adapter’s IP addresses don’t match, the network connection will not work. In some cases, you might need to use two private IP addresses for your Windows network adapter, and also set up static private IP addresses.

  1. Open the EC2 Console, choose your instance, choose the Description tab, choose the linked name next to Network interfaces, and then choose Interface ID.
  2. Choose Actions, choose Manage IP Addresses, Assign new IP, enter a new IP address, and then choose Yes, Update.
  3. Connect to your EC2 Windows instance using Remote Desktop Protocol (RDP).
  4. Open Network and Sharing Center, choose Change adapter settings, Properties, Internet Protocol Version 4 (TCP/IPv4).
  5. Choose Use the following IP address, enter your private IP address, Subnet mask, Default gateway IP addresses, and then choose Advanced.
  6. In the IP addresses pane, choose Add, enter your additional private IP and Subnet mask addresses, and then choose Add.
  7. Choose the DNS tab, enter a DNS server address, and then choose OK.

Note: For more information about finding your VPC DNS server settings, see Amazon DNS Server. For information on the reserved addresses, see VPC and Subnet Sizing.

Open a Command Prompt window as an administrator and test by pinging both private IP addresses. You should also be able to ping both addresses from another instance in the same subnet.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-03-31

Updated: 2017-05-22