FreeRADIUS InkBridge

%ip.v4.netmask( <ipv4 prefix> )

Get the netmask from an IPv4 prefix

Return: ipv4

Particularly useful for use when handling DHCPv4 requests, where Subnet-Mask is required in the reply, and the subnet the client is being placed in is known.

Example
Network-Subnet := 192.168.1.0/24
reply.Subnet-Mask := %ip.v4.netmask(Network-Subnet)
Output
255.255.255.0