Network service CLI reference
The Network CLI reference lists curated commands with Quake AI-specific context. This page covers core resource commands; router static routes and security-group commands are documented on that reference.
See the OpenStack command-line client reference for the full list of openstack commands.
These commands manage networks, subnets, ports, routers, and floating IPs in your OpenStack environment. NETWORK_ID_OR_NAME, SUBNET_ID_OR_NAME, PORT_ID_OR_NAME, ROUTER_ID_OR_NAME, and FLOATING_IP_ID_OR_ADDRESS are placeholders that you replace with the actual IDs or names of the resources.
List networks#
openstack network listShow network details#
openstack network show NETWORK_ID_OR_NAMECreate a network#
openstack network create NETWORK_NAMEDelete a network#
openstack network delete NETWORK_ID_OR_NAMEList subnets#
openstack subnet listShow subnet details#
openstack subnet show SUBNET_ID_OR_NAMECreate a subnet#
openstack subnet create --network NETWORK_ID_OR_NAME --subnet-range CIDR SUBNET_NAMECIDR: The IP address range of the subnet in CIDR notation (for example, 192.168.1.0/24).
Delete a subnet#
openstack subnet delete SUBNET_ID_OR_NAMEList ports#
openstack port listShow port details#
openstack port show PORT_ID_OR_NAMECreate a port#
openstack port create --network NETWORK_ID_OR_NAME PORT_NAMEDelete a port#
openstack port delete PORT_ID_OR_NAMEList routers#
openstack router listShow router details#
openstack router show ROUTER_ID_OR_NAMECreate a router#
openstack router create ROUTER_NAMETo set the external gateway when you create the router, pass --external-gateway:
openstack router create --external-gateway PUBLIC_NETWORK_ID_OR_NAME ROUTER_NAMEDelete a router#
openstack router delete ROUTER_ID_OR_NAMEAdd a router interface#
openstack router add subnet ROUTER_ID_OR_NAME SUBNET_ID_OR_NAMERemove a router interface#
openstack router remove subnet ROUTER_ID_OR_NAME SUBNET_ID_OR_NAMESet a router external gateway#
openstack router set --external-gateway PUBLIC_NETWORK_ID_OR_NAME ROUTER_ID_OR_NAMEA port on a router's internal subnet cannot have a floating IP associated until the router has an external gateway. The external network must be one that is marked router:external (on Quake AI, PublicStatic).
Remove a router external gateway#
openstack router unset --external-gateway ROUTER_ID_OR_NAMEList external networks#
openstack network list --externalOnly the networks returned here (those with router:external = true) can serve as a router external gateway or as the source network for a floating IP.
List floating IPs#
openstack floating ip listCreate a floating IP#
openstack floating ip create PUBLIC_NETWORK_ID_OR_NAMEAssociate a floating IP with a port#
openstack floating ip set --port PORT_ID_OR_NAME FLOATING_IP_ID_OR_ADDRESSIf the port's subnet is not connected to a router with an external gateway, this returns 404 NotFoundException, reporting that the external network is not reachable from the subnet. Set the router external gateway first. The status code is 404, not the 400 or 409 a binding conflict might suggest.
Disassociate a floating IP#
openstack floating ip unset --port FLOATING_IP_ID_OR_ADDRESSOutput columns#
Select specific columns with --column COL1 --column COL2 or change the output format with -f json, -f csv, or -f table (default).
openstack network list#
| Column | Description |
|---|---|
| ID | Network UUID |
| Name | Network name |
| Subnets | Associated subnet UUIDs |
openstack subnet list#
| Column | Description |
|---|---|
| ID | Subnet UUID |
| Name | Subnet name |
| Network | Parent network UUID |
| Subnet | CIDR range (e.g., 192.168.0.0/24) |
openstack router list#
| Column | Description |
|---|---|
| ID | Router UUID |
| Name | Router name |
| Status | Current state (ACTIVE, ERROR) |
| State | Administrative state (UP, DOWN) |
| Project | Owning project ID |
openstack port list#
| Column | Description |
|---|---|
| ID | Port UUID |
| Name | Port name |
| MAC Address | Layer 2 hardware address |
| Fixed IP Addresses | Assigned IP addresses and subnet IDs |
| Status | Current state (ACTIVE, DOWN, BUILD) |
openstack floating ip list#
| Column | Description |
|---|---|
| ID | Floating IP UUID |
| Floating IP Address | Public IP address |
| Fixed IP Address | Associated private IP (empty if unassociated) |
| Port | Associated port UUID (empty if unassociated) |
| Floating Network | Source external network UUID |
| Project | Owning project ID |