Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Compute Cloud
  • Getting started
    • Overview
    • Creating a Linux VM
    • Creating a Windows VM
    • Creating instance groups
  • Step-by-step instructions
    • All instructions
    • Creating VMs
      • Creating a Linux VM
      • Creating a Windows VM
      • Creating a VM from a set of disks
      • Creating a VM with disks restored from snapshots
      • Creating a VM from a custom image
      • Creating a preemptible VM
      • Creating a VM with a GPU
    • DSVM
      • Overview
      • Creating a VM from a public DSVM image
    • Placement groups
      • Creating a placement group
      • Deleting a placement group
      • Creating a VM in a placement group
      • Adding a VM to a placement group
      • Removing a VM instance from a placement group
    • Images with pre-installed software
      • Creating a VM from a public image
      • Configuring software
      • Working with a VM based on a public image
      • Getting a list of public images
    • Getting information about a VM
      • Getting information about a VM
      • Viewing serial port output
    • Managing VMs
      • Stopping and starting a VM
      • Attaching a disk to a VM
      • Detaching a disk from a VM
      • Moving a VM to a different availability zone
      • Making a VM's public IP address static
      • Updating a VM
      • Changing VM computing resources
      • Deleting a VM
    • Working on VMs
      • Connecting to a VM via SSH
      • Connecting to a VM via RDP
      • Working with Yandex.Cloud from inside a VM
      • Installing NVIDIA drivers
    • Creating new disks
      • Creating an empty disk
      • Create an empty disk with a large block
    • Disk management
      • Creating a disk snapshot
      • Updating a disk
      • Deleting a disk
      • Deleting a disk snapshot
    • Creating new images
      • Uploading your image
    • Managing images
      • Deleting a disk image
    • Managing the serial console
      • Getting started
      • Connecting to a serial console via SSH
      • Connecting to a serial console via CLI
      • Start your terminal in the Windows SAC
      • Disabling access to the serial console
    • Creating instance groups
      • Creating a fixed-size instance group
      • Creating a fixed-size instance group with a network load balancer
      • Creating an automatically scaled instance group
      • Creating an instance group from Container Optimized Image
    • Getting information about instance groups
      • Getting a list of instance groups
      • Getting information about an instance group
      • Getting a list of instances in a group
    • Managing instance groups
      • Editing an instance group
      • Configuring application health check on the VM
      • Updating a instance group
        • Incremental updates
        • Uninterrupted updates
      • Stopping an instance group
      • Starting an instance group
      • Deleting an instance group
    • Dedicated hosts
      • Creating a VM in a group of dedicated hosts
      • Creating a VM on a dedicated host
  • Yandex Container Optimized Solutions
  • Scenarios
    • Configuring NTP time synchronization
    • Running instance groups with auto scaling
  • Concepts
    • Relationship between resources
    • Virtual machines
      • Overview
      • Platforms
      • vCPU performance levels
      • Graphics accelerators (GPUs)
      • Preemptible VMs
      • Network on a VM
      • Live migration
      • Placement groups
      • Statuses
      • Metadata
    • Disks
      • Overview
      • Disk snapshots
    • Images
    • Instance groups
      • Overview
      • Access
      • Instance template
      • Variables in an instance template
      • Policies
        • Overview
        • Allocation policy
        • Deployment policy
        • Scaling policy
      • Scaling types
      • Auto-healing
      • Updating
        • Overview
        • Allocating instances across zones
        • Deployment algorithm
        • Rules for updating instance groups
      • Statuses
    • Dedicated host
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1 to May 1, 2019
  • Compute API reference
    • Authentication in the API
    • gRPC
      • Overview
      • DiskPlacementGroupService
      • DiskService
      • DiskTypeService
      • HostGroupService
      • HostTypeService
      • ImageService
      • InstanceService
      • PlacementGroupService
      • SnapshotService
      • ZoneService
      • InstanceGroupService
      • OperationService
    • REST
      • Overview
      • Disk
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • DiskPlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listDisks
        • listOperations
        • update
      • DiskType
        • Overview
        • get
        • list
      • HostGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listHosts
        • listInstances
        • listOperations
        • update
      • HostType
        • Overview
        • get
        • list
      • Image
        • Overview
        • create
        • delete
        • get
        • getLatestByFamily
        • list
        • listOperations
        • update
      • Instance
        • Overview
        • addOneToOneNat
        • attachDisk
        • create
        • delete
        • detachDisk
        • get
        • getSerialPortOutput
        • list
        • listOperations
        • removeOneToOneNat
        • restart
        • start
        • stop
        • update
        • updateMetadata
        • updateNetworkInterface
      • PlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listInstances
        • listOperations
        • update
      • Snapshot
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • Zone
        • Overview
        • get
        • list
      • Operation
        • Overview
        • get
      • InstanceGroup
        • Overview
        • createFromYaml
        • update
        • list
        • get
        • delete
        • start
        • stop
        • create
        • listAccessBindings
        • setAccessBindings
        • updateFromYaml
        • listLogRecords
        • listInstances
        • updateAccessBindings
        • listOperations
  • Questions and answers
    • General questions
    • Virtual machines
    • Disks and snapshots
    • Licensing
    • All questions on the same page
  1. Concepts
  2. Virtual machines
  3. Network on a VM

Network on a VM

  • Internal IP address
  • Public IP address
  • Hostname and FQDN
  • MAC address

When creating a VM, you need to specify settings for the network interface connected to it: select the subnet to connect the VM to, and configure its internal and public IP addresses. This allows the VM to interact with other services on the intranet and internet.

After the network interface is connected, the VM will be assigned the internal IP address in the subnet and FQDN. The public IP address will only be assigned if this was set when creating the VM.

Note

The network interface can only be configured when creating VMs. For example, you can't connect a VM to a different subnet after you created it.

You can find out the IP addresses, FQDN and other information in the management console (go to the Network section on the virtual machine's page). This data can be used to connect to the VM.

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

Internal IP address

You can specify the internal IP address at which the VM will be accessible after being created. If no internal IP address is specified, it will be assigned automatically.

Note

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

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

The internal IP address cannot be changed.

Public IP address

You can get a public IP address to access a VM from the internet.

A public IP address is assigned automatically and cannot be chosen. The address is allocated from the pool of Yandex.Cloud addresses.

When a VM is stopped, its public IP address is released, and the next time the VM is started, it gets a new public IP address. When the VM is restarted, its public IP address is saved.

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

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

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

Hostname and FQDN

When creating a VM, it is assigned a hostname and FQDN. You can use the FQDN to access a VM from another VM within the same cloud network.

You can specify a VM's hostname when creating it. Based on the hostname and region, the fully qualified domain name (FQDN) will be generated in the following format:

<hostname>.ru-central1.internal

For example, if you specified the hostname myinstance, the FQDN will be like this:

myinstance.ru-central1.internal

Note

The VM name is used to generate the FQDN only once, when creating the VM. If the FQDN is important to you, choose an appropriate name for the VM at the creation stage.

If no hostname is specified, the VM's ID will be used as its hostname. In this case, the region is omitted, since the VM's ID is unique within the entire Yandex.Cloud.

<ID>.auto.internal

MAC address

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

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

In this article:
  • Internal IP address
  • Public IP address
  • Hostname and FQDN
  • MAC address
Language / Region
Careers
Privacy policy
Terms of use
Brandbook
© 2021 Yandex.Cloud LLC