Zum Inhalt springen
NimbusNexus

Router

Ein Router verschafft einem Tenant-Netzwerk (und seinen Subnetzen) Internetzugang. VMs, die an ein Tenant-Subnetz angebunden sind, erreichen das öffentliche Internet nicht von allein — sie liegen in einem privaten L2-Segment. Ein Router verbindet dieses Segment mit dem externen Netzwerk der Region, übernimmt NAT für ausgehenden Traffic und stellt (optional) Floating-IPs für eingehenden Traffic bereit.

Wann Sie einen Router brauchen

  • Öffentlich erreichbare VMs in einem Tenant-Netzwerk. Binden Sie einen Router an, teilen Sie dann eine Floating-IP zu und hängen Sie sie an. Ausgehender Traffic läuft per NAT über den Router; eingehender Traffic an die Floating-IP wird zurück zur VM geroutet.
  • Gemischte private/öffentliche App-Schichten. Die Web-Schicht liegt hinter einem Router mit Floating-IP; App- und DB-Schicht bleiben privat und erreichen das Internet (etwa für Paket-Updates) über das Source-NAT des Routers.
  • Routing zwischen mehreren Subnetzen. Ein Router kann mehrere Subnetze gleichzeitig bedienen. Traffic zwischen zwei Subnetzen am selben Router bleibt innerhalb der VPC und verlässt NimbusNexus nie.

Wenn Sie VMs direkt an das externe Netzwerk anbinden, brauchen Sie keinen Router — das externe Netzwerk IST das Gateway.

SNAT, DNAT und Floating-IPs

Ein Router hat eine externe Gateway-Verbindung (zum externen Netzwerk der Region) und null oder mehr interne Verbindungen (zu Tenant-Subnetzen). Wenn Sie das Gateway in external_gateway_info setzen, braucht es außerdem bandwidth_subscription und bandwidth_mbps (ein Vielfaches von 10): Das Gateway wird auf diese Bandbreite begrenzt, und die Bandbreite wird abgerechnet (siehe Preisdaten).

  • Ausgehend von einer privaten VM → der Router führt Source-NAT auf seine externe IP durch. Mehrere private VMs teilen sich diese eine externe IP für ausgehenden Traffic.
  • Eingehend an eine Floating-IP → der Router führt Destination-NAT auf die private VM durch, an die die Floating-IP angehängt ist. Die private VM sieht die ursprüngliche Quell-IP (bei eingehendem Traffic erhalten wir die Client-IP über das NAT hinweg; nur ausgehender Traffic wird per SNAT umgesetzt).

Source-NAT richtet sich nach external_gateway_info.enable_snat, einer Plattformeinstellung. Destination-NAT konfigurieren Sie nicht direkt; der Router regelt es anhand der Floating-IPs, die Sie angehängt haben.

Statische Routen

Ein Router hat eine Tabelle statischer Routen, die Sie für Ziele abseits der Standardroute füllen können. Jede Route leitet Traffic für den CIDR in destination, aus jedem Subnetz am Router, an die Adresse in nexthop — eine andere VM wie eine VPN-Appliance oder einen transparenten Proxy. PUT /api/v1/router/{router_id}/extraroutes fügt Routen atomar hinzu, und DELETE auf demselben Pfad entfernt sie atomar. Die meisten Nutzer brauchen das nie; es ist für fortgeschrittene VPC-Layouts gedacht, die es benötigen.

Nächste Schritte

  • Netzwerke und Subnetze — was Router verbinden.
  • Floating-IPs — öffentliche Adressen für eingehenden Traffic, die über einen Router laufen.
  • Sicherheitsgruppen — die Firewall-Schicht an der VM-Schnittstelle (der Router selbst filtert nicht).

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 →