Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Please note: The steps below only provide a basic overview. The exact tasks required will vary depending on your network design. Please refer to the AWS GCP documentation for details.

...

When an instance is created, a default Ethernet interface is attached to the system. This default network interface is the primary network interface. You can create additional network interfaces and attach them to an instance. 

Please note: If an instance has only one Ethernet interface, a public IP address can be assigned to the interface automatically. However, this automatically assigned address will be removed by AWS if a second interface is added to the instance and the instance is stopped and restarted. Be careful not to lose connectivity to your instance when changing the network configuration. Refer to the section about Elastic IP Addresses for additional information.

...

classpagebreak

Creating a New Network Interface

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

...

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.

...

Assigning a Public IP Address to the Network Interface

Please note:

...

classpagebreak

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

...

Detaching a Network Interface from an Instance

<tbd>

Address Assignment Information

<tbdmandatory. During the creation of the instance, you can add additional network interfaces.

General Information

The rules for Google cloud instances with respect to network interfaces are strict:

  • Interfaces can only be added during instance creation.
  • Each network interface configured in a single instance must be attached to a different VPC network.
  • The additional VPC networks that the multiple interfaces will attach to must exist before an instance is created. See Using VPC Networks for instructions on creating additional VPC networks.
  • You cannot delete a network interface without deleting the instance.

Therefore the required VPCs and subnets must exist before the instance is created.

To create additional VPCs (if required), perform the steps below.

Create VPCs and Subnets for Instance

Step 1: Open the VPC network section by clicking on the Navigation menu, then selecting VPC network, and clicking on VPC networks - as illustrated below.

Image Added

This will open the VPC overview page with the already existing VPCs. If all required VPCs and subnets already exist, continue with creating the new VM instance. Otherwise, continue with step 2.


Step 2: If you need to create a new VPC, click on CREATE VPC NETWORL at the top of the VPC overview list.

Image Added

This opens the VPC configuration window.


Step 3: Create VPC and subnets.

In the VPC configuration window, enter

  • the VPC name, and
  • the subnet name, region and address.

Image Added

Click on Create at the bottom of the window to create the VPC.

The new VPC should appear in the VPC overview list. Selecting the VPC in the overview list will open the detail information window. Example:

Image Added


Step 4: Create firewall rules for the VPC.

With the detail information open, click on Firewall. This will allow you to define the required firewall rules for the VPC.

An example of a small set of firewall rules that allow incoming SSH and ICMP is shown below:

Image Added

Adding Additional NICs to an Instance

Additional NICs are added during instance creation. Perform the following steps in the instance creation window:

  • Open the advanced settings at the bottom of the VM creation window by clicking on Management, security, disks,... at the bottom of the page.
  • Select Networking from the advanced settings section.
  • Click on Add network interface.
  • Select the correct subnet (created before).
  • Set the information about internal and external IP address (static or ephemeral) as required.

Image Added

After adding all the required information, click on Done.

The second interface is now visible in the details page of the VM instance:

Image Added

Assigning a Static IP Address to a Network Interface

During the creation of a VM instance, when you add the default and optional additional NICs, you can determine if the IP addresses assigned to a NIC are static (persistent across restarts) or ephemeral (non-persistent across restarts). The process to add a static IP requires to reserve the IP address. The public IP address may also have to be created first.

If you select to add a static private IP address to an interface, you will get the following window to reserve a static private IP address:

Image Added

If you select to add a static public IP address to an interface, you will get the following window to create (if needed) and reserve an address:

Image Added


You can also manage external IP addresses from the VPC network management section (Navigation menu > VPC network > External IP addresses):

Image Added

Detaching a Network Interface from an Instance

You cannot delete a network interface without deleting the instance it is attached to. So if you do not need a network anymore, but do not want to delete the instance, you can only disable it from the operating system level.

Address Assignment Information

When creating a VPC and its subnets, subnet address ranges are assigned to these subnets. There are some restriction regarding permitted address ranges:

Restricted address ranges:

Restricted ranges include Google public IP addresses and commonly reserved RFC ranges, as described below. These ranges cannot be used for subnet ranges.

  • Public IP addresses for Google APIs and services, including Google Cloud netblocks: You can find these IP addresses at http://gstatic.com/ipranges/goog.txt.
  • 199.36.153.4/30 and 199.36.153.8/30: private Google access-specific virtual IP addresses
  • 0.0.0.0/8: Current (local) network RFC 1122
  • 127.0.0.0/8: Local host RFC 1122
  • 169.254.0.0/16: Link-local RFC 3927
  • 224.0.0.0/4: Multicast RFC 5771
  • 255.255.255.255/32: Limited broadcast destination address RFC 8190 and RFC 919

Reserved subnet addresses:

Every subnet has four reserved IP addresses in its primary IP range. There are no reserved IP addresses in the secondary IP ranges.

  • Network: first address in the primary IP range for the subnet 10.1.2.0 in 10.1.2.0/24
  • Default gateway: Second address in the primary IP range for the subnet 10.1.2.1 in 10.1.2.0/24
  • Second-to-last address: second-to-last address in the primary IP range for the subnet that is reserved by Google Cloud for potential future use 10.1.2.254 in 10.1.2.0/24
  • Broadcast: last address in the primary IP range for the subnet 10.1.2.255 in 10.1.2.0/24

Please note:

  • The default gateway does not respond to ping.
  • The default gateway does not decrement TTL headers (used for traceroute).
  • Only IPv4 unicast traffic is supported.

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