Saltar al contenido
NimbusNexus

Routers

Un router es lo que da acceso a internet a una red de tenant (y a sus subredes). Las VMs conectadas a una subred de tenant no pueden llegar a internet pública por sí solas — están en un segmento L2 privado. Un router une ese segmento con la red externa de la región, hace NAT para el tráfico saliente y (opcionalmente) aloja IPs flotantes para el entrante.

Cuándo necesitas un router

  • VMs expuestas al público en una red de tenant. Conecta un router y después reserva + asocia una IP flotante. El tráfico saliente pasa por el NAT del router; el entrante por la IP flotante se enruta de vuelta a la VM.
  • Capas de aplicación mixtas, privadas y públicas. La capa web está detrás de un router con una IP flotante; las capas de aplicación + BD siguen siendo privadas y llegan a internet (para cosas como las actualizaciones de paquetes) mediante el source-NAT del router.
  • Enrutamiento entre varias subredes. Un router puede dar servicio a varias subredes a la vez. El tráfico entre dos subredes del mismo router es interno a la VPC y nunca sale de NimbusNexus.

Si conectas las VMs directamente a la red externa, no necesitas un router — la red externa ES el gateway.

SNAT, DNAT e IPs flotantes

Un router tiene una conexión de gateway externo (a la red externa de la región) y cero o más conexiones internas (a subredes de tenant). Configurar el gateway en external_gateway_info también recibe bandwidth_subscription y bandwidth_mbps (un múltiplo de 10): el gateway queda limitado a ese ancho de banda, y el ancho de banda se factura (consulta Datos de precios).

  • Saliente desde una VM privada → el router hace source-NAT a su IP externa. Varias VMs privadas comparten esa única IP externa para el tráfico saliente.
  • Entrante hacia una IP flotante → el router hace destination-NAT a la VM privada a la que está asociada la IP flotante. La VM privada ve la IP de origen original (conservamos la IP del cliente a través del NAT para el tráfico entrante; solo se aplica SNAT al saliente).

El source-NAT sigue external_gateway_info.enable_snat, que es un ajuste de la plataforma. No configuras el destination-NAT directamente; el router lo gestiona según qué IPs flotantes has asociado.

Rutas estáticas

Un router lleva una tabla de rutas estáticas que puedes rellenar para destinos que no son el de por defecto. Cada ruta envía el tráfico hacia un CIDR destination, desde cualquier subred del router, a una dirección nexthop — otra VM, como un dispositivo VPN o un proxy transparente. PUT /api/v1/router/{router_id}/extraroutes añade rutas de forma atómica, y DELETE en el mismo endpoint las quita de forma atómica. La mayoría de los usuarios nunca lo tocan; está ahí para las topologías de VPC avanzadas que lo necesitan.

Próximos pasos

  • Redes y Subredes — lo que conectan los routers.
  • IPs flotantes — direcciones públicas de entrada que van sobre un router.
  • Grupos de seguridad — la capa de firewall que se aplica en la interfaz de la VM (el router en sí no filtra).

Reference

GET/api/v1/router/

List Routers

Lists virtual routers owned by the project.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
namequerystring | null—
descriptionquerystring | null—
admin_state_upqueryboolean | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/router/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/router/

Create Router

Creates a virtual router, attaching a bandwidth-billed QoS policy when an external gateway is provided.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
namestring | null—
descriptionstring | null—
admin_state_upboolean | null—
external_gateway_infoExternalGatewayInfo | null—
distributedboolean | null—
haboolean | null—
availability_zone_hintsarray of string | null—
bandwidth_subscriptionPlanType | nullSubscription plan for bandwidth billing on the external gateway port. Only relevant when external_gateway_info is provided.
bandwidth_mbpsinteger | null—
routesarray of Route | null—
project_idstring | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/router/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
GET/api/v1/router/artifacts

Router Artifacts

Returns external networks and project subnets usable when creating a router.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
namequerystring | null—
descriptionquerystring | null—
admin_state_upqueryboolean | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/router/artifacts" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/router/{router_id}

Get Router

Returns the details of a single virtual router by ID.

Parameters

NameInTypeDescription
router_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/router/<router_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PUT/api/v1/router/{router_id}

Update Router

Updates a virtual router and refreshes its bandwidth-billed QoS policy when the external gateway changes.

Parameters

NameInTypeDescription
router_id*pathstring—

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
namestring—
descriptionstring | null—
admin_state_upboolean—
external_gateway_infoExternalGatewayInfo | null—
distributedboolean | null—
haboolean | null—
routesarray of Route | null—
bandwidth_subscriptionPlanType | nullSubscription plan for bandwidth billing on the external gateway port. Pass to start or update bandwidth billing when external_gateway_info is present; omit (or set to null) when removing the external gateway.
bandwidth_mbpsinteger | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/router/<router_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/router/{router_id}

Delete Router

Deletes a virtual router by ID.

Parameters

NameInTypeDescription
router_id*pathstring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation Error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/router/<router_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PUT/api/v1/router/{router_id}/extraroutes

Add Extra Routes

Atomically adds extra static routes to a virtual router's routing table.

Parameters

NameInTypeDescription
router_id*pathstring—

Request body

JSON body required.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/router/<router_id>/extraroutes" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "destination": "https://example.com/webhooks",
      "nexthop": "example"
    }
  ]'
DELETE/api/v1/router/{router_id}/extraroutes

Remove Extra Routes

Atomically removes extra static routes from a virtual router's routing table.

Parameters

NameInTypeDescription
router_id*pathstring—

Request body

JSON body required.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/router/<router_id>/extraroutes" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "destination": "https://example.com/webhooks",
      "nexthop": "example"
    }
  ]'
GET/api/v1/router/{router_id}/extraroutes/artifacts

Extra Routes Artifacts

Returns artifacts of router interfaces to specify a correct next hop for extra routes.

Parameters

NameInTypeDescription
router_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/router/<router_id>/extraroutes/artifacts" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/router/{router_id}/interface

List Router Interfaces

Lists the interfaces (ports) currently attached to a virtual router.

Parameters

NameInTypeDescription
router_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/router/<router_id>/interface" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PUT/api/v1/router/{router_id}/interface

Add Router Interface

Attaches a subnet or port to a virtual router as a new interface.

Parameters

NameInTypeDescription
router_id*pathstring—

Request body

FieldTypeDescription
subnet_idstring | null—
port_idstring | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/router/<router_id>/interface" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
GET/api/v1/router/{router_id}/interface/artifacts

Interface Artifacts

Returns the router's existing interfaces and the subnets that may be attached as new interfaces.

Parameters

NameInTypeDescription
router_id*pathstring—
admin_domainquerystring | null—
admin_projectquerystring | null—
scope_current_projectqueryboolean | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/router/<router_id>/interface/artifacts" \
  -H "Authorization: Bearer $NIMBUS_KEY"
DELETE/api/v1/router/{router_id}/interface/{port_id}

Remove Router Interface

Detaches an interface port from a virtual router.

Parameters

NameInTypeDescription
router_id*pathstring—
port_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/router/<router_id>/interface/<port_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →