node-subnet-group

Queries subnet group data synchronized between the Data Node and the Control Node. When the guid option is specified (in the 4.0 series, 4.0.2609.0 and later, the name option as well), queries the subnet entries of that subnet group. When both are omitted, lists all subnet groups.

Command properties

PropertyDescription
Command typeDriver
Required permissionAdministrator
License usageNot counted
Parallel executionNot supported
Distributed executionNot supported

Syntax

To list subnet groups:

node-subnet-group

To query subnet entries of a specific subnet group by GUID:

node-subnet-group guid=STR

To query subnet entries of a specific subnet group by name (4.0 series, 4.0.2609.0 and later):

node-subnet-group name=STR

Options

guid=STR
GUID of the subnet group to query. In the 5.0 series (through 5.0.2605.2), this is the only way to specify a subnet group. In the 4.0 series (4.0.2609.0 and later), it cannot be used together with name. When omitted, lists all subnet groups.
name=STR
Name of the subnet group to query (cannot be used together with guid). When omitted, lists all subnet groups. This option is available starting with 4.0.2609.0.

Output fields

When both the guid and name options are omitted (subnet group list):

FieldTypeDescription
idintegerSubnet group ID
guidstringSubnet group GUID
namestringSubnet group name
descriptionstringSubnet group description
subnet_countintegerNumber of subnet entries
user_namestringName of the user who created it
user_guidstringGUID of the user who created it

When either the guid or name option is specified (subnet entry list):

FieldTypeDescription
start_ipipaddrStart IP address of the subnet
end_ipipaddrEnd IP address of the subnet
cidrintegerCIDR prefix length
descriptionstringSubnet description

Error codes

Parse errors
Error codeMessageDescription
300300no permission for node-subnet-groupExecuted from a session without administrator privileges.
300301invalid guid format for node-subnet-groupThe guid option value is not a valid GUID format.
300302subnet group [guid] not found for node-subnet-groupNo subnet group exists for the specified guid.
300303Subnet group not found by name for node-subnet-group.No subnet group exists with the name specified in the name option. Available starting with 4.0.2609.0, which has the name option.
300304Duplicate subnet group name for node-subnet-group.More than one subnet group exists with the name specified in the name option. Available starting with 4.0.2609.0, which has the name option.
300305Specify only one of 'guid' or 'name' option in the node-subnet-group command.Both the guid and name options are specified. Available starting with 4.0.2609.0, which has the name option.
300306Cannot load subnet group for node-subnet-group.An error occurred while reading data while querying by the name option. Available starting with 4.0.2609.0, which has the name option.
Runtime errors

None

Description

The node-subnet-group command queries subnet group data synchronized to the Data Node. This command is only available on the Data Node and requires administrator privileges.

When either the guid or name option is specified, it queries the start IP, end IP, CIDR, and description of each subnet defined in that subnet group. When both options are omitted, it lists the metadata of all subnet groups synchronized to the Data Node.

In the 4.0 series (4.0.2609.0 and later), you can use the name option to specify a subnet group by name instead of GUID. Specifying both options at the same time causes an error, as does specifying a name that does not exist or that matches more than one group.

Examples

  1. List all subnet groups

    node-subnet-group
    

    Lists all subnet groups synchronized to the Data Node.

  2. Query subnet entries of a specific subnet group

    node-subnet-group guid=550e8400-e29b-41d4-a716-446655440000
    

    Queries the subnet entries of the subnet group corresponding to the specified GUID.

  3. Query subnet entries of a subnet group by name (4.0 series, 4.0.2609.0 and later)

    node-subnet-group name=internal_subnets
    

    Queries the subnet entries of the subnet group with the specified name.

Change history

TargetIntroduced in
The node-subnet-group commandBefore Sonar 4.0
The name option4.0.2609.0