Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: pdf layout

Anchor
TOC
TOC
Include Page
KBCOMMON:KB-CSSstyle
KBCOMMON:KB-CSSstyle

...

After creating a network interface, you have to assign it to the instance where it will be used.

Warning

Adding a secondary second network interface to a non-Amazon Linux EC2 instance causes traffic flow issues. These issues occur This occurs because both the primary and the secondary network interfaces are in the same subnet, and there is only one routing table with one gateway. Traffic that comes into the secondary second network interface leaves the instance using the primary first network interface. But this isn't allowed, because the secondary IP address doesn't belong to the MAC address of the primary network interfaceThis is blocked by AWS because a mismatch between MAC address and IP address.

To make the secondary second interface work, perform the following steps:

  • Add the new interface to your running instance.
  • Before restarting the network, create a secondary network configuration file for the second interface. 
  • If both interfaces only have private IP addresses,
    • configure a secondary routing table,
    • and then
    • set up rules in the custom routing table policy database so that traffic for the secondary interface uses the new routing table.

Refer to the AWS documentation and to section Example of a More Complex Network Configuration. Failure  Failure to use the proper steps, may make your instance unreachable! 


StepDetails
Locate your network interface in the interface list and right-click on it.

The right-click opens the context menu. Select Attach.


This will open the window to enter the necessary information.

Select your instance and confirm entry.

Select your instance from the drop-down list and click on Attach.


The state of your interface will change from available to in-use.

Verify that instance has second interface.

Select your instance in the instance list. This opens the instance details at the bottom of the screen. The description tab should now display two network interfaces as shown in the example below:

...

An Elastic IP address is a static, public IPv4 address to be used for one of your network interfaces or instances. You can associate an Elastic IP address with any instance or network interface in your account.

(info) The advantage of associating the Elastic IP address with the network interface instead of directly with the instance is that you can move the network interface with its attributes easily from one instance to another.

(warning) The initial automatically assigned public IP address will be removed as soon as you restart the network or the instance after adding a network interface with an Elastic IP address to your instance. Do not restart your network or your instance before you are sure you can reach it via the Elastic IP address. The automatically assigned public IP address will also be disabled if you assign an Elastic IP address to the primary Ethernet interface of the instance.

...