AnkraDocs
Console

Concepts

Private networks

Isolated layer-2 networks inside a zone, with IPv4 subnets you choose, an IPv6 ULA leg on every interface, and routers for routing and NAT.

A private network is an isolated layer-2 network that spans every host of a zone. Traffic on it never touches the public internet and is free. Use private networks for databases, internal services and anything that should not have a public address.

Creating a network#

A network has a zone, a name and an IPv4 CIDR from the private ranges (RFC 1918), between /16 and /29:

bash
ankra-cloud networks create --zone se-sto1 --name backend --cidr 10.40.0.0/24

The network's first host address (10.40.0.1 above) is reserved for a router. The CIDR may not overlap the zone's public address pools or the ranges the cloud reserves for its own infrastructure (10.10.0.0/16, 10.20.0.0/16, 10.21.0.0/16, 10.22.0.0/16, 10.30.0.0/16 and 10.99.0.0/24); the API answers 400 when it does.

Every network also gets an IPv6 unique local /64 derived from its id. Each server interface on the network has an address there too (address6 in the interface view), so IPv6-only servers talk to each other privately without any IPv4.

Attaching servers#

Name networks when creating a server (networks: [{ "network_id": "…", "address": "10.40.0.20" }], the address is optional), or attach a stopped server later with POST /v1/servers/{id}/networks. A server has at most 7 private interfaces, each on a different network of its zone. Detaching (DELETE /v1/servers/{id}/networks/{network}) also needs the server stopped.

In the console, the Network step of the deploy page lists the private networks of the chosen location. Create network there makes a network in that location and attaches it to the server you are deploying, without leaving the form.

Routers#

A router joins networks of one zone and routes between them. Networks attached to the same router may not overlap; networks of different routers (and of different accounts) may.

With nat_enabled a router is also a NAT gateway: it takes a public IPv4 address (nat_address) and masquerades the attached networks' IPv4 traffic to the internet. A router with NAT costs €10 a month, billed per hour from the moment NAT is turned on; routers without NAT are free. What a server sends to the internet through the gateway counts towards that server's own transfer allowance, 20 TB a month and then €2.00 per TB, like traffic of its own public interface. A NAT gateway can also run on a dedicated uplink, whose 50 TB per term then cover its servers' traffic instead.

On top of that the router pays €4.00 a month for every public IPv4 address it holds (see The IPv4 add-on): its NAT address, where that is a public IPv4 address. The router's nat_address_billed says whether it is. Ankra assigns the address.

bash
ankra-cloud routers create --zone se-sto1 --name edge --nat --wait
ankra-cloud routers attach-network <router-id> --network <network-id> --wait

A NAT gateway starts on the shared uplink. If your servers need a connection of their own, ask for a dedicated uplink: a 1 Gbit/s connection that only your servers use. You ask for it when you create a router with NAT or later on the router, in the console or with uplink:

bash
ankra-cloud api update_router -p id=<router-id> --data '{"uplink":"dedicated"}'

Ankra sets the dedicated uplink up, so asking is a request:

  • The router's dedicated_uplink.state is pending until Ankra has connected it. Until then the NAT gateway keeps running on the shared uplink and is billed as a shared NAT gateway.
  • When it is connected the state becomes active and you get a notification. Billing starts then: €85.00 per 30-day term, charged in full when each term starts and renewed automatically, instead of the €10 a month of the shared uplink. Transfer through the gateway is metered per 30-day term: each term includes 50 TB, and beyond that the price is €2.00 per TB. On top, the gateway is charged €4.00 a month for every public IPv4 address it holds. See 30-day terms.
  • If Ankra cannot provide it, the state becomes declined with the reason, the gateway stays on the shared uplink and nothing is charged for the dedicated uplink. You can ask again.
  • Setting uplink back to shared takes a pending request back or removes an active dedicated uplink. So does turning NAT off or deleting the router. A term that was already charged is not refunded.

Only a router with NAT can ask, and asking needs the operate permission. You do not choose addresses or anything else about the connection: the router keeps its NAT address.

While the dedicated uplink is active, the router's page in the console shows how much of the term's 50 TB has been used, and so does the API:

bash
ankra-cloud api get_router_transfer -p id=<router-id>

It answers the current term (period_start, period_end), what the gateway sent to the internet in it (transmitted_bytes), the transfer the term includes (included_bytes), and what went beyond it with its cost so far (billable_bytes, amount_cents). Only outbound traffic counts, and the allowance starts over with every term. See Transfer through a dedicated uplink.

A server without a public IPv4 routes IPv4 through its first network's router, or through that network's NAT gateway edge when it has no router. On a network with neither, the server gets no IPv4 route from the network and an IPv6-only server keeps reaching IPv4 through the zone's NAT64. For IPv6-only servers that need the IPv4 internet, a NAT gateway edge (NAT64 and DNS64) is usually the better choice; a network has either a NAT router or a NAT gateway edge, not both.

Deleting#

A network cannot be deleted while servers, a router or a network edge use it (409). Detach them first. Deleting a router needs its networks detached.

Limits#

The default quota is 10 private networks and 5 routers per account; ask support to raise them. See GET /v1/quotas.