dtctl router create
Usage
dtctl router create [flags]
Aliases
c
Description
Create a router with an external gateway on the given external network (see dtctl network list --network-type Physical), optionally attaching internal subnets. SNAT is enabled by default for outbound access.
Example
dtctl router create --name edge --external-network-id <external-network-id>
Response
In text output (the default), this command returns the following columns: ID, Name, Admin State Up, Status, External Gateway Info, Static Routes, Description, Flavor ID, Created At, Updated At, Revision Number.
Pass --output json to get the full response object instead.
Flags
| Option | Description |
|---|---|
--enable-snat, -t | Enable source NAT (SNAT) for outbound traffic Default: true |
--external-network-id, -e | External network ID for the gateway (see 'dtctl network list --network-type Physical') (required) |
--name, -n | Name of the router (required) |
--subnet-ids, -s | Comma-separated internal subnet IDs to attach |
Related Commands
| Command | Description |
|---|---|
| dtctl router list | List routers |
| dtctl router show | Show a router |
| dtctl router update | Rename a router |
| dtctl router update-static-route | Update a static route |
| dtctl router delete | Delete a router |
| dtctl router delete-external-gateway | Remove the external gateway |
| dtctl router delete-interface | Detach an interface |
| dtctl router delete-static-route | Delete a static route |
| dtctl router add-static-route | Add a static route |
| dtctl router attach-external-gateway | Attach an external gateway |
| dtctl router attach-interface | Attach an internal interface |
| dtctl router externals | List networks with external access |
| dtctl router interfaces | List a router's interfaces |
| dtctl router restart | Restart a router |
| dtctl router static-routes | List a router's static routes |
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 |