Network interfaces#

General information#

Networks are being attached to instances via network interfaces. Network interface can be created either in the subnet or in the virtual switch.

Network interface created in subnet:

  • has a private IP-address from the CIDR block of subnet IP addresses;

  • can be used as gateway at route creation in route tables;

  • has a MAC address, which is automatically allocated by the cloud;

  • cannot be detached from / attached to an instance if it is a primary network device.

Network interface created in a virtual switch:

  • has no addressing;

  • scan’t be used as gateway at route creation in route tables;

  • has a MAC address, which is automatically allocated by the cloud;

  • can be detached from an instance if it is not a primary network interface.

Billing#

Network interfaces are free of charge.

Available quotas#

The following default quotas are allocated to network interfaces:

  • 150 network interfaces in a project.

If necessary, you can increase quotas. To do this, contact the support service via the support portal or by email support@k2.cloud.

Network interface creation#

When creating a network interface in a subnet, such interface is assigned a Private IP address from the address range of the selected subnet. You can assign to the network interface any IP address from this range, except for:

  • the first four addresses;

  • the last address.

Thus, for example, in a subnet with the CIDR block 172.31.0.0/20, the addresses 172.31.0.0, 172.31.0.1, 172.31.0.2, 172.31.0.3, and 172.31.15.255 are reserved. Therefore, the first available address that can be assigned to a network interface is 172.31.0.4, and the last one is 172.31.15.254.

Important

To use an IP address from a subnet as a virtual address or to use such address for a hardware connected via an external network, you need to create a network interface with this address. This will reserve the address in order to definitely avoid its assignment to other cloud resources.

  1. In the top menu of the web interface, select the project and region where you want to create a network interface.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking Network interfaces. To quickly find the section, you can use the menu search.

  4. Click Create.

  5. In the network interface creation dialog, specify the following parameters:

    • (Optional) Network interface description.

    • VPC where the interface should be created.

    • Network – select a subnet or virtual switch from the list.

    • ( Only if a subnet is selected) Private IP – the following options are available for associating a Private IP:

      • Auto assign — automatically assign random IP-address from the CIDR block of subnet IP addresses;

      • Custom address — specified by user, must be from the CIDR block of subnet IP addresses.

  6. If you need to set a tag, click Add tag and specify the tag key and value. To assign more tags, click Add tag again.

  7. After setting all the required parameters, click Create.

Attach/detach network interface#

Note

Only an unused (not attached to another instance) network interface can be attached.

To attach a network interface:

  1. In the top menu of the web interface, select the project and region where you want to attach a network interface.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking Network interfaces. To quickly find the section, you can use the menu search.

  4. In the resource table, select the network interface and click Attach on the pop-up action bar.

  5. In the window that opens, select the instance to which you want to attach the network interface from the drop-down list, and click Attach.

This operation can also be performed on the network interface page. To do this, go to the Information tab and click Attach.

To detach the network interface:

Note

Only an active (attached to an instance) network interface can be detached.

  1. In the top menu of the web interface, select the project and region where you want to detach a network interface.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking Network interfaces. To quickly find the section, you can use the menu search.

  4. In the resource table, select the network interface and click Detach on the pop-up action bar.

  5. In the window that opens, confirm the action by clicking: bdg-primary:Detach.

This operation can also be performed on the network interface page. To do this, go to the Information tab and click Detach.

Note

For more information about interface features and restrictions, please see Instances.

Network interface deletion#

If you want the network interface to be automatically deleted with the instance, go to the interface page and select Delete with the instance on the Information tab.

Note

To delete a network interface, you must first detach it from the instance.

Note

Deleting a network interface releases the associated Private and Elastic IP addresses.

  1. In the top menu of the web interface, select the project and region where you want to delete a network interface.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking Network interfaces. To quickly find the section, you can use the menu search.

  4. In the resource table, select the network inteface and click Delete on the pop-up action bar. You can select and delete several network interfaces at once.

  5. In the window that opens, confirm the deletion.

Alternatively, you can delete a particular interface on its page, in the Information tab. To do this, go to the Information tab and click Delete.

Operations with interfaces#

Configure Elastic IP#

Important

An Elastic IP can be associated only if the network interface was created in a subnet and if the VPC has an attached internet gateway.

To associate an unused Elastic IP address with a network interface, modify or disassociate the associated Elastic IP address, do the following:

  1. In the top menu of the web interface, select the project and region where you want to set up an Elastic IP address for a network interface.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking Network interfaces. To quickly find the section, you can use the menu search.

  4. In the resource table, find the network interface for which the Elastic IP address should be modified and click on the network interface’s ID to go to its page.

  5. In the Information tab, click the editing icon next to the Elastic IP parameter:

    • to associate or change the address, select the desired IP address from the drop-down list;

    • to disassociate an Elastic IP address, click the icon next to the address.

  6. Click to save changes.

Note

Once the Elastic IP is associated, the network interface becomes available at the specified address within a minute.

Changing the network interface description#

Note

Only ASCII symbols are permitted to be used in the description.

  1. In the top menu of the web interface, select the project and region where you want to edit description for a network interface.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking Network interfaces. To quickly find the section, you can use the menu search.

  4. In the resource table, find the network interface for which description should be modified and click on the network interface’s ID to go to its page.

  5. In the Information tab, click the editing icon for the Description parameter and enter a new description.

  6. To save changes, click .

Changing security groups#

Important

This feature is supported only for the network interface created in a subnet.

Note

If source/destination check (source-dest-check) is disabled on the selected interface and at least one of the added security groups is a source in the inbound rules of this or any other group, then you cannot associate such security groups with the network interface.

  1. In the top menu of the web interface, select the project and region where you want to change a security group for a network interface.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking Network interfaces. To quickly find the section, you can use the menu search.

  4. In the resource table, select the network interface and click Change security groups on the pop-up action bar.

  5. In the window that opens, select one or more security groups from the list.

    • To assign a security group to a network interface, set next to the selected group.

    • To cancel the assignment, clear the checkbox.

  6. To save changes, click Change.

Additionally, if at least one security group is assigned to the network interface, you can also configure the list of groups on the network interface page, in the Security groups tab.

Change the Source/destination check attribute#

This option is enabled by default for all newly created interfaces in subnets. When the source-dest-check attribute is enabled for an interface, every IP packet passing through this interface must be sent from or targeted to the IP address of this interface.

If you need to setup routing or NAT on the instance, you must disable source-dest-check on its network interface.

  1. In the top menu of the web interface, select the project and region where you want to change the attribute value for a network interface.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking Network interfaces. To quickly find the section, you can use the menu search.

  4. In the resource table, find the network interface for which the attribute value should be changed and click on the network inteface’s ID to go to its page.

  5. In the Information tab, switch the Source/dest. check toggle to the desired position (Enabled/Disabled).

Note

If a network interface is associated with a security group and this group is listed as a source in an inbound rule of any security group, including itself. You cannot disable source-dest-check for the network interface.

Change tags#

  1. In the top menu of the web interface, select the project and region where you want to set tags for a network interface.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking Network interfaces.

  4. In the resource table, find the network interface for which the tags should be edited and click on its ID to go to the resource page.

  5. Open the Tags tab and click Edit to set tags.

  6. To add a tag, fill in Key and Value fields. To assign the next tag, click Add tag.

    To modify a tag, edit the required fields (Value and/or Key) of the respective tag.

    To delete a tag, click the icon next to the tag you no longer need.

  7. To complete editing, click Save changes.

Network interface information#

For general information about the available network interfaces, see the Network Interfaces subsection. To view a summary table of all network interfaces in the project, select All VPC in the VPC filter. To display network interfaces from a particular VPC, select the desired VPC in the filter.

To view detailed information about a particular network interface, go to Virtual machines Networking Network Interfaces and select the desired interface from the list. To facilitate the interface search, select the VPC, in which the interface was created, in the VPC filter or use the table search.

Once you have selected the desired netwok interface, click its ID. The network interface page will open.

The Information tab displays the main interface parameters:

  • interface description;

  • addresses (MAC address, Private IP, Elastic IP);

  • information about logical location (VPC, availability zone, subnet);

  • number of assigned security groups;

  • Source/dest. check option (toggle).

If the network interface is attached to the instance, the following parameters are also displayed:

  • attachment ID;

  • attachment status;

  • ID of the instance to which the network interface is attached;

  • device index;

  • Delete with instance option (toggle).

Important

A network interface cannot be automatically deleted together with the instance if it was selected as a gateway when a route was configured in the route table.

Here you can also:

The Security groups tab displays a table with details of security groups assigned to the network interface:

  • group ID;

  • group name;

  • description.

Here, you can also change the security group attached to the interface.

In the Tags tab, you can view tags assigned to the network interface. You can add, modify or delete tags for the network interface.