Skip to main content

dtctl network update-subnet

Usage​

dtctl network update-subnet [flags]

Aliases​

us

Description​

Update a subnet's gateway, DHCP setting, allocation pools, or DNS servers.

Example​

dtctl network update-subnet --network-id <network-id> --subnet-id <subnet-id> --gateway-ip 10.0.0.1 --dns-servers 8.8.8.8,1.1.1.1

Response​

In text output (the default), this command returns the following columns: ID, Name, Project ID, Network ID, IP Version, Subnet Pool ID, Enable DHCP, IPv6 RA Mode, IPv6 Address Mode, Gateway IP, CIDR, Allocation Pools, DNS Nameservers, Description, Created At, Updated At, Revision Number, Project ID.

Pass --output json to get the full response object instead.

Flags​

OptionDescription
--allocation-pool, -aAllocation pool as 'startIP-endIP' (repeatable). Omit to leave allocation pools unchanged
--dhcp, -pEnable DHCP on the subnet
Default: true
--dns-servers, -dComma-separated DNS server IPs. Omit to leave DNS servers unchanged
--gateway-ip, -gGateway IP address
--network-id, -nNetwork ID (required)
--subnet-id, -sSubnet ID (required)
CommandDescription
dtctl network listList networks
dtctl network showShow a network
dtctl network createCreate a network
dtctl network updateRename a network
dtctl network deleteDelete a network
dtctl network subnetShow subnet details

Global Flags​

OptionDescription
--api-urlSend this command to a different API endpoint, e.g. a test environment (default "https://console.dt.net.tr/api/v1")
--config, -cSpecify a custom config file
Default: ~/.config/dtctl/config.yaml
--no-headersOmit the column headers, for scripting
Default: false
--output, -oOutput format: text, wide, vertical, json. text fits the terminal, wide never truncates, vertical prints one field per line
Default: text