Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI Studio
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex BareMetal
  • Getting started
    • All guides
    • Overview
      • Overview
      • Server configurations
      • Disk status analysis
      • Overview
      • DHCP
      • Restrictions in BareMetal networks
    • Quotas and limits
    • All tutorials
    • Connecting an existing BareMetal server to Cloud Backup
    • Configuring VRRP for a cluster of BareMetal servers
    • Establishing network connectivity in a BareMetal private subnet
    • Establishing network connectivity between BareMetal and Virtual Private Cloud private subnets
    • Establishing network connectivity between a BareMetal private subnet and on-prem resources
    • Delivering USB devices to a BareMetal server or virtual machine
    • Configuring an OPNsense firewall in high availability cluster mode
    • Deploying a web app on BareMetal servers with an L7 load balancer and Smart Web Security protection
  • Monitoring metrics
  • Audit Trails events
  • Access management
  • Pricing policy
  • FAQ

In this article:

  • DHCP options
  • DHCP in a public network
  • DHCP in an ephemeral public subnet
  • DHCP on a dedicated public subnet
  • DHCP in a private network
  • Known issues
  1. Concepts
  2. Network
  3. DHCP

DHCP in a Yandex BareMetal network

Written by
Yandex Cloud
Updated at June 26, 2025
  • DHCP options
  • DHCP in a public network
    • DHCP in an ephemeral public subnet
    • DHCP on a dedicated public subnet
  • DHCP in a private network
  • Known issues

In public (ephemeral) and private subnets, you can use DHCP to automatically configure IP addressing parameters on server interfaces. If the server OS is installed from Marketplace images, getting IP addresses via DHCP is enabled by default on all physical interfaces of the server.

Warning

DHCP can only be used to assign an IP address directly to the physical interface of a network card by fixing the MAC address, so we do not recommend changing the MAC addresses of server network cards.

To assign multiple IP addresses to a single physical interface, e.g., in case of virtualization, you will need to use your own DHCP server. Changing the DHCP service settings on a subnet can globally affect network connectivity on the private network for servers that use DHCP.

DHCP optionsDHCP options

The following DHCP options are transmitted on public and private networks:

  • 1: Subnet Mask. Subnet mask.
  • 3: Router. Default gateway. Subnet gateway for public subnets.
  • 6: Domain Server. DNS server addresses. 77.88.8.8, 77.88.8.1 for public subnets.
  • 51: Lease Time. The time the address is issued for is 12 hours.
  • 54: DHCP Server Id: Subnet gateway.
  • 58: Renewal Time. The time after which the client will start re-requesting the address is 5 minutes.
  • 59: Rebinding Time. The time after which the server will send a broadcast request to update the address is 7 minutes.
  • 121: Classless Static Route: Static routes in the network. For private subnets, these are 10.0.0.0/8, 192.168.0.0/16, and 172.16.0.0/12 through the subnet gateway. Used to access other subnets within VRF.

DHCP in a public networkDHCP in a public network

Depending on the BareMetal server's selected network settings, the public network may reserve an ephemeral or dedicated public subnet for it.

DHCP in an ephemeral public subnetDHCP in an ephemeral public subnet

If the Public address field in the server network settings is set to From ephemeral subnet, its public subnet is ephemeral and its network interface connected to that subnet will get an IPv4 address from the range of Yandex BareMetal public IP addresses.

In an ephemeral public subnet, a DHCP server is enabled by default and provides BareMetal servers with IPv4 addresses prefixed with /31. You cannot disable the DHCP server on an ephemeral public subnet.

If DHCP is disabled on a BareMetal server's network interface connected to an ephemeral public subnet, consider the following when configuring that interface:

  • The subnet housing the server's public IP address has a subnet prefix length of 31 bits and consists of two addresses: the default gateway's IP address and the host IP address.
  • The host IP address is specified in the Public address field on the page with server information.
  • Less than the host IP address by one, the gateway IP address is specified in the Default gateway field on the page with server information.

Here is an example:

  • Server public IP address: 198.51.100.111.
  • Subnet CIDR: 198.51.100.110/31.
  • Default gateway IP address: 198.51.100.110.

DHCP on a dedicated public subnetDHCP on a dedicated public subnet

If the Public address field in the server network settings is set to From a dedicated subnet, its public subnet is dedicated and its network interface connected to that subnet can get an IPv4 address from the range of addresses associated with the selected dedicated subnet.

Dedicated public subnets do not have a DHCP server. Therefore, on the network interface of a server connected to such a subnet, you should manually configure a static IP address from the subnet’s range of public IP addresses and set the default gateway address.

The information about the range of IP addresses available in a public subnet and default gateway is provided in the Public network section on the server information page and on the public subnet information page.

You cannot enable a DHCP server on a dedicated public subnet.

DHCP in a private networkDHCP in a private network

The server network interface connected to a private network gets an IP address from the CIDR specified in the routing settings of the private subnet the server is connected to.

Within a private network, you can manage the DHCP service parameters:

  • By default, the DHCP service is disabled in the subnet settings. In this case, IP addresses for servers in a private subnet are assigned statically. When the DHCP service is enabled for a subnet, IP addresses can be assigned for servers automatically.
  • When configuring the DHCP service for a subnet, you can specify additional parameters.

The DHCP service can be used in a subnet for only one CIDR, from which an address will be assigned only for the server’s physical interface. If you need to configure DHCP to assign addresses for VMs, you need to configure it on your own, for example, using your own DHCP server.

DHCP in a private network assigns addresses for 12 hours. The server extends the address lease every 5 minutes for another 12 hours. If you need to update the address faster, you should do it manually on the server:

  1. Find out the interface name and current address:

    ip -4 address
    ...
    2: etx1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        altname eno1
        altname enp2s0f0
        inet 10.0.0.2/28 metric 100 brd 10.0.0.15 scope global dynamic etx1
        valid_lft 43037sec preferred_lft 43037sec
    ...
    
  2. Reset the address lease:

    dhclient -r etx1
    
  3. Renew your lease:

    dhclient etx1
    

Known issuesKnown issues

If you have Ubuntu 18 installed on your server, DHCP may add an address from the new subnet to the server without deleting the old one after reconfiguring your network settings, for example, when changing subnets. The old address will be deleted automatically when the lease expires. You can also use the ip -4 addr del 10.0.0.2/10 dev etx1 command to delete the address or reboot the server after changing the configuration.

Was the article helpful?

Previous
Overview
Next
Restrictions in BareMetal networks
© 2025 Direct Cursus Technology L.L.C.