- NAME
-
- gcloud alpha compute dhcp-options-configs create - create a Google Compute Engine DHCP options configuration
- SYNOPSIS
-
-
gcloud alpha compute dhcp-options-configs createNAME[--boot-file-name=BOOT_FILE_NAME] [--boot-file-params=[BOOT_FILE_PARAMS,…]] [--boot-file-url=BOOT_FILE_URL] [--description=DESCRIPTION] [--dns-search-paths=[DNS_SEARCH_PATHS,…]] [--dns-server-ipv4-addresses=[DNS_SERVER_IPV4_ADDRESSES,…]] [--dns-server-ipv6-addresses=[DNS_SERVER_IPV6_ADDRESSES,…]] [--domain-name=DOMAIN_NAME] [--lease-time=LEASE_TIME] [--ntp-server-ipv4-addresses=[NTP_SERVER_IPV4_ADDRESSES,…]] [--ntp-server-ipv6-addresses=[NTP_SERVER_IPV6_ADDRESSES,…]] [--region=REGION] [--tftp-server-ipv4-addresses=[TFTP_SERVER_IPV4_ADDRESSES,…]] [--tftp-server-name=TFTP_SERVER_NAME] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)gcloud alpha compute dhcp-options-configs createis used to create a regional DHCP options configuration. DHCP options configurations store user-defined DHCP parameters such as custom DNS servers, NTP servers, domain search suffixes, lease durations, and TFTP/PXE boot parameters. - EXAMPLES
-
To create a DHCP options config with custom DNS servers and domain suffix, run:
gcloud alpha compute dhcp-options-configs create my-dhcp-config --region=us-central1 --domain-name=corp.example.com --dns-server-ipv4-addresses=192.168.1.10,192.168.1.11 - POSITIONAL ARGUMENTS
-
NAME- Name of the dhcp options config to create.
- FLAGS
-
--boot-file-name=BOOT_FILE_NAME- File path of the TFTP boot file (Option 67).
--boot-file-params=[BOOT_FILE_PARAMS,…]- Boot file parameter arguments for IPv6 (Option 60).
--boot-file-url=BOOT_FILE_URL- URL of the IPv6 boot file (Option 59).
--description=DESCRIPTION- An optional, textual description for the DHCP options config.
--dns-search-paths=[DNS_SEARCH_PATHS,…]- List of domain search suffixes (Options 119 and 24).
--dns-server-ipv4-addresses=[DNS_SERVER_IPV4_ADDRESSES,…]- List of IPv4 addresses of recursive DNS servers (Option 6).
--dns-server-ipv6-addresses=[DNS_SERVER_IPV6_ADDRESSES,…]- List of IPv6 addresses of recursive DNS servers (Option 23).
--domain-name=DOMAIN_NAME- The primary DNS domain name suffix (Option 15).
--lease-time=LEASE_TIME- The duration of the IPv4 address lease offered by the DHCP server to the client VM. See $ gcloud topic datetimes for information on duration formats (e.g. 24h, 86400s, 60m). Corresponds to DHCPv4 Option 51.
--ntp-server-ipv4-addresses=[NTP_SERVER_IPV4_ADDRESSES,…]- List of IPv4 addresses of NTP servers (Option 42).
--ntp-server-ipv6-addresses=[NTP_SERVER_IPV6_ADDRESSES,…]- List of IPv6 addresses of NTP servers (Option 56).
--region=REGION-
Region of the dhcp options config to create. If not specified, you might be
prompted to select a region (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
property:compute/regiongcloud config set compute/region REGIONA list of regions can be fetched by running:
gcloud compute regions listTo unset the property, run:
gcloud config unset compute/regionAlternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION --tftp-server-ipv4-addresses=[TFTP_SERVER_IPV4_ADDRESSES,…]- List of IPv4 addresses of TFTP boot servers (Option 150).
--tftp-server-name=TFTP_SERVER_NAME- Hostname of the TFTP boot server (Option 66).
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha compute dhcp-options-configs create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-09-01 UTC.
[null,null,["Last updated 2026-09-01 UTC."],[],[]]