Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Compute Cloud
  • Yandex Container Solution
    • Resource relationships
      • Overview
      • Platforms
      • vCPU performance levels
      • Preemptible VMs
      • VM network interfaces
      • Software-accelerated network
      • Live migration
      • Placement groups
      • Statuses
      • VM maintenance policies
      • Resetting Windows VM passwords
    • Graphics processing units (GPUs)
    • Images
    • Dedicated host
    • Encryption
    • Backups
    • Quotas and limits
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Internal IP address
  • Public IP address
  • Host name and internal FQDN
  • Examples
  • MAC address
  • Use cases
  1. Concepts
  2. Virtual machines
  3. VM network interfaces

VM network interfaces

Written by
Yandex Cloud
Updated at April 18, 2025
  • Internal IP address
  • Public IP address
  • Host name and internal FQDN
    • Examples
  • MAC address
  • Use cases

A virtual machine can have one or more network interfaces. When creating a VM, you need to configure at least one of its network interfaces by selecting the subnet to connect your VM to, configuring internal and public IP addresses, and adding the required security groups. This will allow the VM to connect to other services on the intranet and internet.

After the network interface is connected, the VM will be assigned an internal IP address in the subnet. A public IP address will be assigned only if you specified it in the network interface settings.

You can find out the IP addresses, FQDNs, and other information in the management console by going to the Network section on the virtual machine page. This data can be used to connect to the VM.

On VMs created from public Linux images, the IP address and host name (FQDN) are not automatically written to the /etc/hosts file. This may affect the sudo command.

You can change the network interface settings on stopped VMs by assigning a public IP address, changing the subnet, selecting other security groups, or configuring the DNS settings.

You can also add more network interfaces and delete them from both stopped and running VMs. However, to avoid VM routing issues, we recommended adding and removing network interfaces on stopped VMs.

The feature of adding and removing network interfaces on running VMs is at the Preview stage. To access the feature, contact support.

If the network interfaces you added are inactive or you can no longer connect to your VM, see Troubleshooting.

RecommendationsRecommendations

For stable network operation on a VM, follow these recommendations:

  • To maintain network connectivity, add network interfaces to stopped VMs.
  • Assign a public IP address to a single VM's network interface only.

Internal IP addressInternal IP address

For each network interface of a VM, you can specify an internal IP address that will be assigned to that interface. If the internal IP address is not specified, it will be assigned automatically from the IP address range of the relevant subnet.

Note

Currently, only IPv4 addresses are supported. Yandex Compute Cloud VMs and DB hosts provide access to and from the internet via public IP addresses only.

An internal IP address can be used to access a VM from another VM. You can use an internal IP address only to connect to the VMs that belong to the same cloud network.

You can change the internal IP address of a network interface after you create a VM.

Public IP addressPublic IP address

To access your virtual machine from the internet, you can get a public IP address.

The public IP address can be assigned automatically from the Yandex Cloud address pool or selected from a list of reserved public IP addresses.

If a public IP address was assigned automatically, it will be released if you stop a VM. The VM will get a new public IP address the next time you start it. If you restart a VM, it retains the automatically assigned public IP address.

You can make a public IP address static. For more information, see Making a VM public IP address static.

For more information about IP address pricing, see the Public IP addresses section of the Virtual Private Cloud documentation.

The public IP address of the VM's network interface is mapped to its internal IP address through NAT. Therefore, all requests to the VM from the external IP address of its network interface are sent to the internal IP address of that interface. For more information about NAT, see RFC 3022.

Host name and internal FQDNHost name and internal FQDN

When creating a VM, it is assigned a host name and internal FQDN that can be used to access one VM from another within the same cloud network. You can get the FQDN together with information about the VM.

Once the VM is created, you cannot change its host name and internal FQDN.

The assigned FQDN depends on the specified (CreateInstanceSpec.hostname). The host name must be unique in your virtual network.

  1. You cannot specify the hostname parameter in the management console for a new VM. Instead, the user-defined VM name is used:

    • If you leave the Name field empty when creating a VM, this internal FQDN will be assigned: <VM_ID>.auto.internal.
    • If you enter a VM name in the Name field, this internal FQDN will be assigned: <VM_name>.<region>.internal.
  2. When using the CLI, API, and Terraform, FQDNs are created as follows:

    • If you do not specify a hostname, the VM will get a unique FQDN in this format: <VM_ID>.auto.internal.
    • If a hostname is specified and does not contain the . symbol, it is treated as an FQDN prefix. The VM will get an internal FQDN in this format: <hostname>.<region>.internal.
    • If a hostname is specified and contains the . symbol in the middle or at the end, it is treated as an FQDN. The VM will get an internal FQDN that will be the same as hostname. You cannot specify an FQDN beginning with or containing only a period (.).

ExamplesExamples

Specified host name VM FQDN
<not_specified> <VM_ID>.auto.internal
breathtaking breathtaking.ru-central1.internal
this-is-sparta this-is-sparta.ru-central1.internal
hello.world or hello.world. hello.world
breathtaking. breathtaking
.why error (FQDN starts with ".")
. error (FQDN contains dots "." only)

MAC addressMAC address

Once the network interface is connected to a VM, it will be assigned the device MAC address.

You can find out the MAC address from a VM or in the resource information using the Yandex Cloud API.

Use casesUse cases

  • Creating a bastion host
  • Implementing fault-tolerant use cases for network VMs
  • Configuring an SFTP server based on CentOS 7
  • Assigning a domain name to a web server VM
  • Deploying Remote Desktop Gateway

Was the article helpful?

Previous
Preemptible VMs
Next
Software-accelerated network
Yandex project
© 2025 Yandex.Cloud LLC