dtctl router attach-external-gateway
Usage
dtctl router attach-external-gateway [flags]
Aliases
aeg
Description
Attach an external gateway to a router so its networks can reach the external network.
Example
dtctl router attach-external-gateway --router-id <router-id> --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, -s | Enable source NAT (SNAT) for outbound traffic Default: true |
--ip-address, -a | Gateway IP address, or 'auto' to assign one automatically Default: auto |
--network-id, -n | External network ID to attach as the gateway (required) |
--router-id, -i | Router ID to attach the external gateway to (required) |
Related Commands
| Command | Description |
|---|---|
| dtctl router list | List routers |
| dtctl router show | Show a router |
| dtctl router create | Create 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-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 |