Routers
Routers connect VPC subnets to each other and to external networks. Attach an external gateway to give your instances internet access through a floating IP, or connect multiple subnets within the same VPC.
Command: ace vpc router
Create a Router
ace vpc router create --name <name> [flags]Flags
--name
Yes
Router name
--gateway-network
No
External gateway network ID to attach at creation
Examples
# Create a router
ace vpc router create --name prod-router
# Create a router with an external gateway
ace vpc router create --name prod-router --gateway-network <external-network-id>Sample Output
Router created.
Router ID: b2c3d4e5-f6a7-8901-bcde-f12345678901
Name: prod-router
Status: ACTIVEList Routers
Alias: ace vpc router ls
Sample Output
Get Router Details
Alias: ace vpc router show
Sample Output
Delete Routers
Alias: ace vpc router rm
Remove all interfaces and the external gateway from a router before deleting it.
Example
Gateway Management
Set Gateway
Attach an external network as the router's gateway. This enables outbound internet access for instances in subnets connected to this router.
Flags
--router
Yes
Router ID
--network
Yes
External network ID
Example
Remove Gateway
Detach the external gateway from a router.
Example
Interface Management
Interfaces connect subnets to the router, enabling traffic routing between subnets and to external networks.
Add Interface
Attach a subnet to a router.
Flags
--router
Yes
Router ID
--subnet
Yes
Subnet ID to attach
Example
Remove Interface
Detach an interface from a router. You can specify either a --subnet (the CLI will look up the matching port) or pass interface IDs as positional arguments.
Flags
--router
Yes
Router ID
--subnet
No
Subnet ID (finds and removes the matching interface)
Examples
List Interfaces
List all interfaces attached to a router.
Sample Output
Command Summary
ace vpc router create
Create a router
ace vpc router list
List all routers
ace vpc router get <id>
Get router details
ace vpc router delete <id>
Delete router(s)
ace vpc router set-gateway
Attach an external gateway
ace vpc router remove-gateway
Detach the external gateway
ace vpc router add-interface
Attach a subnet to a router
ace vpc router remove-interface
Detach interface(s) from a router
ace vpc router interfaces
List interfaces on a router
Last updated
Was this helpful?