Compute a subnet from a ipv4 field; by default emits a into a _subnet field.

asstringfalse_subnetSpecifies the output field, defaults to _subnet.
bitsnumbertrue Specifies the prefix bits to include in the subnet, e.g. 23.
fieldstringtrue Specifies the input field. [a]

[a] If an argument name is not given, field is the default argument.

subnet() Examples

Compute subnet for ipAddress using 23bit prefix; emit into subnet field

subnet(ipAddress, bits=23, as=subnet)