sonar-matchnet-by-ip
Find the network subnets that contain an IP address, searching every subnet group at once.
Unlike matchnet, which needs a group guid or name up front, this looks the group up for you. One row per matching subnet, carrying the group it belongs to. Sonar stores subnets as IPv4 only.
Syntax
sonar-matchnet-by-ip [ip=IP] [keywords=KEYWORDS] [limit=NUM]
Options
- ip=IP
- Optional. IPv4 address to look up. Omit to search without an address condition
- keywords=KEYWORDS
- Optional. Space separated search terms, matched against the subnet group name and description, or against the subnet description
- limit=NUM
- Optional. Maximum number of rows to return (default: no limit)
Output Fields
| Field | Type | Name | Description |
|---|---|---|---|
| ip | IP address | IP | Address that was looked up |
| subnet_group_guid | String | Group GUID | Subnet group GUID |
| subnet_group_name | String | Group name | Subnet group name |
| subnet_group_description | String | Group description | Subnet group description |
| subnet_id | Integer | Subnet ID | Subnet entry ID |
| subnet_start_ip | IP address | Start IP | First address of the subnet |
| subnet_end_ip | IP address | End IP | Last address of the subnet, computed from the prefix when stored as a CIDR block |
| subnet_cidr | Integer | CIDR | Prefix length, or null when the subnet was stored as a range |
| subnet_description | String | Description | Subnet description |
| subnet_app_code | String | App code | Code of the app that owns the subnet, or null when it was added by hand |