You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/website/source/docs/configuration/from-1.5/functions/ipnet/cidrnetmask.html.md

882 B

layout page_title sidebar_current description
docs cidrnetmask - Functions - Configuration Language configuration-functions-ipnet-cidrnetmask The cidrnetmask function converts an IPv4 address prefix given in CIDR notation into a subnet mask address.

cidrnetmask Function

cidrnetmask converts an IPv4 address prefix given in CIDR notation into a subnet mask address.

cidrnetmask(prefix)

prefix must be given in IPv4 CIDR notation, as defined in RFC 4632 section 3.1.

The result is a subnet address formatted in the conventional dotted-decimal IPv4 address syntax, as expected by some software.

CIDR notation is the only valid notation for IPv6 addresses, so cidrnetmask produces an error if given an IPv6 address.

Examples

> cidrnetmask("172.16.0.0/12")
255.240.0.0