Skip to main content

dtctl network create

Usage​

dtctl network create [flags]

Aliases​

c

Description​

Create a virtual network. With IP Address Management (IPAM) enabled (the default), a subnet is created from the given CIDR, with an optional gateway, DHCP, allocation pools, and DNS servers.

Example​

# Create a network with a 10.0.0.0/24 subnet
dtctl network create --name app-net --cidr 10.0.0.0/24 --dns-servers 8.8.8.8,1.1.1.1

Flags​

OptionDescription
--allocation-pool, -aAllocation pool as 'startIP-endIP' (repeatable)
--cidr, -sSubnet CIDR, e.g. 10.0.0.0/24 (required when IPAM is enabled)
--dhcp, -pEnable DHCP on the subnet
Default: true
--dns-servers, -dComma-separated DNS server IPs
--gateway-ip, -gGateway IP address for the subnet
--ipam, -iEnable IP Address Management (create a subnet)
Default: true
--name, -nName of the network (required)
CommandDescription
dtctl network listList networks
dtctl network showShow a network
dtctl network updateRename a network
dtctl network update-subnetUpdate a subnet
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