---
title: "Create a network"
method: POST
path: "/networks/create"
tags: ["Network"]
---

# Create a network

`POST /networks/create`

## Request body

- object
  - `Name` string, required — The network's name.
  - `CheckDuplicate` boolean — Check for networks with duplicate names. Since Network is primarily keyed based on a random ID and not on the name, and network name is strictly a user-friendly alias to the network which is uniquely identified using ID, there is no guaranteed way to check for duplicates. CheckDuplicate is there to provide a best effort checking of any networks which has the same name but it is not guaranteed to catch all name collisions.
  - `Driver` string — Name of the network driver plugin to use.
  - `Internal` boolean — Restrict external access to the network.
  - `Attachable` boolean — Globally scoped network is manually attachable by regular containers from workers in swarm mode.
  - `Ingress` boolean — Ingress network is the network which provides the routing-mesh in swarm mode.
  - `IPAM` IPAM
    - `Driver` string — Name of the IPAM driver to use.
    - `Config` IPAMConfig[] — List of IPAM configuration options, specified as a map: ``` {"Subnet": <CIDR>, "IPRange": <CIDR>, "Gateway": <IP address>, "AuxAddress": <device_name:IP address>} ```
      - `Subnet` string
      - `IPRange` string
      - `Gateway` string
      - `AuxiliaryAddresses` object
    - `Options` object — Driver-specific options, specified as a map.
  - `EnableIPv6` boolean — Enable IPv6 on the network.
  - `Options` object — Network specific options to be used by the drivers.
  - `Labels` object — User-defined key/value metadata.

## Response `201`

No error

- object
  - `Id` string — The ID of the created network.
  - `Warning` string

## Other responses

- `403` — operation not supported for pre-defined networks
- `404` — plugin not found
- `500` — Server error

---

[API](https://skmtc.net/aliyun/apis/docker-engine-api.md) · [All operations](https://skmtc.net/aliyun/apis/docker-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aliyun/docker-engine-api/revisions/04bb09da9ccb/schema)
