Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Intertech Services AG
Yandex Virtual Private Cloud
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Cloud network
    • Subnet
    • IP address
      • Reserving a static public IP address
      • Converting a dynamic public IP address to static
      • Converting a static public IP address to dynamic
      • Moving an address between folders
      • Deleting a static public IP address
    • Static routing
    • Security groups
    • Enable a software-accelerated network
    • DDoS protection
    • Chart of network connections
  • Practical guidelines
  • Concepts
  • DDoS Protection
  • Recommendations
  • Access management
  • Pricing policy
  • API reference
  • Questions and answers
  1. Step-by-step instructions
  2. IP address
  3. Converting a dynamic public IP address to static

Converting a dynamic public IP address to static

Written by
Yandex Cloud

    You can convert a dynamic public IP address to static. Static public IP addresses are reserved and remain attached to respective resources when VMs and network load balancers are stopped.

    Note

    Pay attention to the pricing policy for inactive static public IPs.

    Management console
    CLI
    API

    To change a public IP address from dynamic to static:

    1. In the management console, select the folder containing the appropriate address.
    2. In the list of services, select Virtual Private Cloud.
    3. On the left-hand panel, select IP addresses.
    4. Click in the row of the address that you want to make static.
    5. In the menu that opens, select Make static.
    6. In the window that opens, click Change.

    If you don't have the Yandex Cloud command line interface yet, install and initialize it.

    The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

    To change a public IP address from dynamic to static:

    1. See the description of the CLI's update address attribute command:

      yc vpc address update --help
      
    2. Get a list of addresses in the default folder:

      yc vpc address list
      

      Result:

      +----------------------+------+---------------+----------+------+
      |          ID          | NAME |    ADDRESS    | RESERVED | USED |
      +----------------------+------+---------------+----------+------+
      | e2l46k8conff8n6ru1jl |      | 84.201.177.41 | false    | true |
      +----------------------+------+---------------+----------+------+
      

      The false value of the RESERVED parameter of the IP address with the ID e2l46k8conff8n6ru1jl shows that this address is dynamic.

    3. Make the address static by using the --reserved=true key and address ID:

      yc vpc address update --reserved=true e2l46k8conff8n6ru1jl
      

      Result:

      id: e2l46k8conff8n6ru1jl
      folder_id: b1g7gvsi89m34pipa3ke
      created_at: "2021-01-14T09:36:46Z"
      external_ipv4_address:
        address: 84.201.177.41
        zone_id: ru-central1-a
        requirements: {}
      reserved: true
      used: true
      

      The reserved parameter value changed to true and the IP address is now static.

    To convert the type of a public IP address from dynamic to static, use the update REST API method for the Address resource or the AddressService/Update gRPC API call.

    Was the article helpful?

    Language / Region
    Yandex project
    © 2023 Intertech Services AG