Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: prepare page for adding gcp information

...

The following steps are required to create a new network interface that can later be added to an instance:

This opens the interface creation window.

Image Removed

On this screen,

  • enter a description,
  • select the subnet the interface should be on (select the subnet to which your instance is to be connected),
  • allow AWS to automatically assign a private IP address or set a custom one from the subnet IP range, and
  • associate the interface with a security group (often the same as for the instance).

Click on Create when you are done. The new interface will appear in the overview list. There you can assign a name to the interface. Check that the interface is in state available.

StepDetails
Locate the Network Interfaces option on the EC2 dashboard and click on it.

Image Removed

Clicking on Network Interfaces opens the list of existing network interfaces.
Create a new interface.

Click on Create Network Interface at the top of the interface list.

Image Removed







Div
classpagebreak


Attaching the Interface to your Instance

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

...

.

...


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

This will open the window to enter the necessary instance information.

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

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

StepDetailsLocate your network interface in the interface list and right-click on it.Image RemovedSelect your instance and confirm entry.Image Removed
Verify that instance has second interface.

Select your instance in the instance list. The description tab in instance details should now display two network interfaces:

Image Removed

(info) You can also attach/detach existing interfaces from the instance overview screen. Select your instance and then Actions > Networking > Attach or Detach network interface.

...










Assigning a Public IP Address to the Network Interface

Please note:

...

...


Div
classpagebreak


The table below describes the steps required to add an Elastic IP address to a network interface.

Image Removed

This will list the already created Elastic IP addresses.

In the overview list, click on Allocate new address if you need to allocate a new address. It is also possible to assign an existing address to an interface. However, each address can only be used for one instance.

Image Removed

This will open the address allocation window.

Select the address. Then select Actions > Associate Elastic IP address. A window to enter the required options opens.

Image Removed

In the window,

  • select to associate the IP address with a network interface,
  • select your network interface from the drop-down menu,
  • connect the public address to the private address of the interface, and 
  • click on Associate to complete the step.
StepDetailsLocate the Elastic IPs option on the EC2 dashboard and click on it.Allocate a new address.

In the address allocation window, select the Amazon pool (or your own pool of public addresses), and click on Allocate.

Image Removed

The new address will be shown in the list.

Associate the address with the network interface.








Detaching a Network Interface from an Instance

You can detach a network interface from your instance in two ways:

  1. Select your instance in the instance list and use the menu Actions > Networking > Detach Network Interface. Or,
  2. Select your network interface in the network interface list and use the menu Actions > Detach.

Take care that this step will not make your instance unreachable.

Please note: the primary network interface cannot be detached.

...

classpagebreak

Interface Naming on Linux Hosts with Enhanced Networking

When looking at the instance from the AWS management console, the interface names are eth0, eth1, etc.

On instances without support for enhanced networking the Linux interface names are also eth0, eth1, etc.

However, on instances with support for enhanced networking, the names on the AWS level differ from those on the Linux level:

  • The first (primary) interface is called ensX (where X is an integer denoting the interface number; example: ens5).
  • When a second interface is added to a running instance, it may initially be called eth0.
    However, the command ethtool -i eth0 shows that the enhanced network driver (ena) will be used for this interface. This interface will change its name to ensY (where Y is X+1) after restarting the instance. This means that any configuration file created for this interface must use the final name of the interface instead of eth0. Otherwise, the instance may become unreachable after a restart because there is no valid interface configuration (NetworkManager is not enabled on Charon-SSP AWS, so a configuration file must exist to configure the interface properly).
    Please note: this numbering sequence may change in the future. It is based on the PCI slot on which the Ethernet controller is presented and which is incremented by one for each additional Ethernet interface added. On the Charon host system, the slot can be verified with the following command:
    # lspci -vv | grep -A20 Ethernet

 To avoid confusion before the instance can be restarted, the new interface can be renamed to its final name using the command 
     ip link set eth0 name ensY && ip link set ensY up

...

classpagebreak

Address Assignment Information

Each VPC is assigned a block of private IP addresses. This block can be split by the user to form several IP subnets. Routing between such subnets is automatically enabled.

When an E2C instance is launched into the default VPC and a public subnet, the default behavior is as follows:

  • If the instance has only one network interface, it is automatically assigned a private IP address from the address range assigned to the public subnet and a public IP address. This network interface is the primary network interface. It is called eth0 on the AWS level (please refer to the interface naming section to learn about the interface names presented to the operating system).
  • If the instance has more than one network interface, it is automatically assigned a private IP address for each of the network interfaces - but no public IP address.

The default behavior can be modified, for example:

  • Manually assigning a private IP address from the subnet range.
  • Enabling or disabling the automatic assignment of a private IP address to deviate from the subnet setting.
  • Manually assigning a public IP address from the AWS range or the customer range.

Please note: Public IP addresses are not directly visible to the instance. The instance operating system always works with the private address. For external connections, the private address is mapped to the public IP address via NAT.

Reserved addresses (important, if manual address assignment is used):

The following address range is reserved to allow AWS to query meta-data about instance configuration: 169.254.0.0/16. This range is automatically configured on every network interface.

The following addresses are reserved in each subnet and cannot be used for E2C instances (shown in the example below for network 10.1.1.0/24):

  • 10.1.1.0: the network address
  • 10.1.1.1: reserved by AWS for the VPC router
  • 10.1.1.2: reserved by AWS in any subnet; the second host address in the base VPC network range is the DNS server for the VPC.
  • 10.1.1.3: reserved by AWS for future use
  • 10.1.1.255: network broadcast address; AWS networks do not use broadcasts.

Please note: An automatically assigned public IP address is released (and not re-assigned) by AWS for example if

  • a second interface is added to the instance and the instance is then stopped and restarted,
  • an Elastic IP is associated with the the instance,
  • an Elastic IP address is associated with the primary interface of the instance.

See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html for details.

Please note: An automatically assigned public IP address is not persistent. Every time a instance starts, it is assigned a new public IP address. If persistent public addresses are needed, use Elastic IP addresses.<tbd>


Address Assignment Information

<tbd


Include Page
KBCOMMON:DOC-GoToToc
KBCOMMON:DOC-GoToToc