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
| Option | Description |
|---|---|
--allocation-pool, -a | Allocation pool as 'startIP-endIP' (repeatable) |
--cidr, -s | Subnet CIDR, e.g. 10.0.0.0/24 (required when IPAM is enabled) |
--dhcp, -p | Enable DHCP on the subnet Default: true |
--dns-servers, -d | Comma-separated DNS server IPs |
--gateway-ip, -g | Gateway IP address for the subnet |
--ipam, -i | Enable IP Address Management (create a subnet) Default: true |
--name, -n | Name of the network (required) |
Related Commands
| Command | Description |
|---|---|
| dtctl network list | List networks |
| dtctl network show | Show a network |
| dtctl network update | Rename a network |
| dtctl network update-subnet | Update a subnet |
| dtctl network delete | Delete a network |
| dtctl network subnet | Show subnet details |
Global Flags
| Option | Description |
|---|---|
--api-url | Send this command to a different API endpoint, e.g. a test environment (default "https://console.dt.net.tr/api/v1") |
--config, -c | Specify a custom config file Default: ~/.config/dtctl/config.yaml |
--no-headers | Omit the column headers, for scripting Default: false |
--output, -o | Output format: text, wide, vertical, json. text fits the terminal, wide never truncates, vertical prints one field per line Default: text |