Skip to Content
Open Beta — managed Kubernetes, DNS & more are live.
🕸️

Networks and subnets

Updated 2026-11-20
On this page

Networks and subnets

Networks are private layer-2 segments for your instances; subnets give them IP address ranges. Together they define how your resources reach each other before anything touches the internet.

Every project starts with room to build its own private topology. A network is an isolated broadcast domain, and a subnet is the address plan you lay on top of it. An instance attached to a network gets a fixed IP from one of that network's subnets and can talk to any other instance on the same network without leaving Patrii Cloud.

Networks stay private until you connect them to a router with an external gateway. This is deliberate: you decide exactly when and how traffic leaves your project, which keeps a database tier or an internal service unreachable from the internet by default.

Screenshot — The Networking > Networks list showing each network with its subnets and attached instances
The Networking > Networks list showing each network with its subnets and attached instances

Key concepts

Network — An isolated layer-2 segment. Instances on the same network share a broadcast domain.

Subnet — An IP address plan (a CIDR range) bound to a network, with a gateway and optional DHCP.

CIDR — The notation for an address range, for example 10.0.0.0/24 (256 addresses).

DHCP — The service that automatically hands a fixed IP from the subnet to each instance as it boots.

Fixed IP — The private address an instance holds on a network, drawn from the subnet's range.

Before you start

  • A project with available network quota.
  • A rough address plan so subnets do not overlap with each other or with networks you plan to connect over a VPN.

Step by step

  1. Open Networks

    Go to Networking and open Networks to see the networks already in your project.

    Screenshot — The Networks list with the Create network button
    The Networks list with the Create network button
  2. Create the network

    Choose Create network and give it a clear name such as app-tier or data-tier.

    Screenshot — The Create network form
    The Create network form
  3. Add a subnet
    • Add a subnet and enter a CIDR range that does not overlap anything else you run.
    • Leave DHCP enabled so instances receive an address automatically.
    • Optionally set custom DNS resolvers for instances on the subnet.
    Screenshot — The subnet form showing the CIDR and DHCP fields
    The subnet form showing the CIDR and DHCP fields
  4. Attach instances

    When you create an instance, select this network so it joins the segment. An instance can attach to more than one network.

Examples

Create a network and subnet
patrii network create --name app-tier \
  --cidr 10.10.0.0/24 --subnet-name app-tier-a
patrii subnet create --network app-tier --name app-tier-b \
  --cidr 10.10.1.0/24 --dhcp
List networks and subnets
patrii network list
patrii subnet list --network <network-id>
Create a network and subnet with Terraform
resource "patrii_network" "app" {
  name = "app-tier"
}

resource "patrii_subnet" "app" {
  network_id  = patrii_network.app.id
  name        = "app-tier-a"
  cidr        = "10.10.0.0/24"
  enable_dhcp = true
}

Limits & specifications

Common subnet settings:

SettingWhat it controls
CIDRThe address range, e.g. 10.10.0.0/24. Plan it so subnets never overlap.
GatewayThe subnet's default gateway address, used for routing off the subnet.
DHCPWhen on, instances get a fixed IP automatically at boot.
DNS resolversThe resolvers instances on the subnet use for name resolution.

Best practices

  • Plan CIDRs up front and avoid overlap with any network you may later join over a VPN or router.
  • Separate tiers onto their own networks (web, app, data) so security groups and routing stay simple.
  • Keep private-only tiers off any router with an external gateway.
  • Use short, descriptive network names so they read well in the console and in automation.

FAQ

Can an instance be on more than one network?
Yes. Attach an instance to several networks to give it, for example, a front-end network and a private back-end network.
Do instances on the same network need a router to talk?
No. Instances on the same network reach each other directly. A router is only needed to route between different networks or to reach the internet.
Why can't my instance reach the internet after I attached it?
A network is private until a router with an external gateway serves its subnet. See Routers to add that path.

Learn more

Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.

Was this article helpful?
Thank you for your feedback. Still stuck? Contact us