Experimental

Download 671
Last updated Nov 4, 2026

sonar-matchnet-by-ip-batch

Enrich each record with the network subnets that contain its IP address, searching every subnet group at once.

A record whose address sits in several overlapping subnets is emitted once per subnet, keeping all of its original fields. The subnet catalog is read once when the query starts, so an edit made while it runs is not seen. Sonar stores subnets as IPv4 only; an IPv6 or unparseable value simply does not match.

Syntax

sonar-matchnet-by-ip-batch [field=FIELD] [fields=FIELDS] [keywords=KEYWORDS] [limit=NUM] [drop=DROP]

Options

field=FIELD
Optional. Name of the field holding the IP address. Specify either field or fields
fields=FIELDS
Optional. Comma separated field names holding IP addresses. Specify either field or fields
keywords=KEYWORDS
Optional. Space separated search terms that narrow the subnet catalog, matched against the subnet group name and description, or against the subnet description
limit=NUM
Optional. Maximum number of matched rows to emit per input record (default: no limit)
drop=DROP
Optional. t: emit only matched records. f: pass an unmatched record through unchanged (default)

Output Fields

FieldTypeNameDescription
subnet_fieldStringMatched fieldField the address came from
subnet_valueIP addressMatched valueAddress that matched
subnet_group_guidStringGroup GUIDSubnet group GUID
subnet_group_nameStringGroup nameSubnet group name
subnet_group_descriptionStringGroup descriptionSubnet group description
subnet_idIntegerSubnet IDSubnet entry ID
subnet_start_ipIP addressStart IPFirst address of the subnet
subnet_end_ipIP addressEnd IPLast address of the subnet, computed from the prefix when stored as a CIDR block
subnet_cidrIntegerCIDRPrefix length, or null when the subnet was stored as a range
subnet_descriptionStringDescriptionSubnet description
subnet_app_codeStringApp codeCode of the app that owns the subnet, or null when it was added by hand