---
title: "ezgh compute subnets create"
description: "Create a subnet."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh compute subnets create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh compute subnets create <name> --vpc <vpc> --ipv4-cidr <cidr> [--description d] [--tag k=v…] [flags]
```

Create a subnet of a VPC (`--vpc`: ID, UUID or name). `--ipv4-cidr` is its IPv4 range, /8 to /28, inside the VPC's, not overlapping another of its subnets or 100.112.0.0/12 (reserved); its IPv6 /64 is the VPC's next free one. Neither can be changed later. Five IPv4 addresses are reserved: the network address, .1 (the subnet's router), .2, .3 and the broadcast address.

Part of [`ezgh compute subnets`](/cli/reference/compute-subnets).

## Examples

```sh
ezgh compute subnets create app --vpc main --ipv4-cidr 10.0.1.0/24
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--description` | string |  | what it's for |
| `--ipv4-cidr` | string |  | the subnet's IPv4 range, such as 10.0.1.0/24 (required) |
| `--tag` | string, repeatable |  | a tag, key=value (repeat) |
| `--vpc` | string |  | the VPC (ID, UUID or name; required) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/compute-subnets-create/index.mdx
