This page explains how to use the ipv4_netmask_suffix function in APL.
ipv4_netmask_suffix
function in APL extracts the netmask suffix from an IPv4 address. The netmask suffix, also known as the subnet prefix length, specifies how many bits are used for the network portion of the address.
This function is useful for network log analysis, security auditing, and infrastructure monitoring. It helps you categorize IP addresses by their subnets, enabling you to detect patterns or anomalies in network traffic or to manage IP allocations effectively.
Splunk SPL users
ipv4_netmask_suffix
function simplifies this task by directly extracting the suffix from an IPv4 address in CIDR notation.ANSI SQL users
SUBSTRING
or CHARINDEX
. In APL, the ipv4_netmask_suffix
function provides a direct and efficient alternative.Parameter | Type | Description |
---|---|---|
ipv4address | string | The IPv4 address in CIDR notation (e.g., 192.168.1.1/24 ). |
24
for 192.168.1.1/24
.32
when the input IPv4 address doesn’t contain the suffix.null
if the input is not a valid IPv4 address in CIDR notation.geo.country | netmask |
---|---|
USA | 24 |
UK | 24 |