Skip to content

Network Templates

Network templates define a prototype CIDR size that IPAM uses when allocating new networks from a container. They are referenced by next_available_network calls.

show template network

Syntax:

show template network [<name>]

WAPI: GET networktemplate

show template network
name=small-subnet cidr=24
name=medium-subnet cidr=22 comment=For branch offices
show template network small-subnet
name=small-subnet cidr=24

configure template network add

Syntax:

configure template network add <name> cidr <num>
    [comment=<comment>]
    [set <key> <value> ...]

WAPI: POST networktemplate

The cidr value is the prefix length (integer) for networks allocated from this template.

configure template network add small-subnet cidr 24
{"name": "small-subnet", "cidr": 24}

With comment and extensible attributes:

configure template network add branch-office cidr 25 \
    comment "Branch /25 allocation" set Region EU

Set-chain depth cap

At most 4 set key=value pairs are accepted. See Extensible Attributes.

configure template network \<name> delete

Syntax:

configure template network <name> delete

WAPI: GET networktemplate?name=<name> then DELETE <ref>

configure template network small-subnet delete