Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool updatecidrgroup

Cassandra 5.0+

This command is available in Cassandra 5.0 and later.

Creates or updates a CIDR group with specified IP ranges.


Terminal window
nodetool [connection_options] updatecidrgroup <group_name> <cidr_ranges>

See connection options for connection options.


nodetool updatecidrgroup creates a new CIDR group or updates an existing one with the specified IP address ranges. CIDR groups define network ranges that can be associated with roles for IP-based access control.


ArgumentDescription
group_nameName for the CIDR group (alphanumeric and underscores)
cidr_rangesSpace-separated list of CIDR ranges (each CIDR as separate argument)

CIDR (Classless Inter-Domain Routing) notation specifies IP ranges:

CIDRRangeAddresses
10.0.0.0/810.0.0.0 - 10.255.255.25516,777,216
172.16.0.0/12172.16.0.0 - 172.31.255.2551,048,576
192.168.0.0/16192.168.0.0 - 192.168.255.25565,536
192.168.1.0/24192.168.1.0 - 192.168.1.255256
10.0.0.1/3210.0.0.1 only1

Terminal window
nodetool updatecidrgroup office_network 192.168.1.0/24 192.168.2.0/24
Terminal window
nodetool updatecidrgroup internal_network 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
Terminal window
nodetool updatecidrgroup dc_us_east 10.1.0.0/16 10.2.0.0/16
Terminal window
nodetool updatecidrgroup admin_workstation 10.0.0.50/32
Terminal window
nodetool updatecidrgroup ipv6_network 2001:db8::/32 fd00::/8
Terminal window
# Add new range by redefining the group
nodetool updatecidrgroup office_network 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24

Terminal window
# Define network groups during cluster setup
nodetool updatecidrgroup app_servers 10.100.0.0/16
nodetool updatecidrgroup monitoring 10.200.0.0/24
nodetool updatecidrgroup admin 10.0.0.0/24
Terminal window
# Add new subnet to existing group
nodetool listcidrgroups # Check current ranges
nodetool updatecidrgroup app_servers 10.100.0.0/16 10.101.0.0/16
Terminal window
# Create groups for different access levels
nodetool updatecidrgroup readonly_apps 10.50.0.0/16
nodetool updatecidrgroup write_apps 10.60.0.0/16
nodetool updatecidrgroup admin_access 10.0.1.0/24

Naming Conventions

Use descriptive, consistent names:

  • dc_<datacenter> for datacenter-specific groups
  • app_<application> for application groups
  • env_<environment> for environment groups (prod, staging, dev)
  • role_<role> for access-level groups

Important Considerations

  1. Updates replace all ranges - When updating, specify ALL desired ranges, not just new ones
  2. Test before production - Verify CIDR ranges in non-production environments
  3. Document changes - Maintain records of CIDR group modifications
  4. Coordinate with network team - Ensure CIDR ranges match actual network topology

After Creating Groups

After creating CIDR groups, associate them with roles using CQL:

ALTER ROLE app_user WITH ACCESS TO CIDR GROUP 'app_servers';

Broad Ranges

Avoid overly broad CIDR ranges that could allow unintended access:

Terminal window
# Too broad - avoid
nodetool updatecidrgroup all_access 0.0.0.0/0
# Better - specific ranges
nodetool updatecidrgroup app_access 10.100.0.0/16

After creating or updating a CIDR group:

Terminal window
# List all groups to verify
nodetool listcidrgroups
# Test specific IP membership
nodetool getcidrgroupsofip 10.100.50.25
# Clear cache if needed
nodetool invalidatecidrpermissionscache

CommandRelationship
listcidrgroupsList all CIDR groups
getcidrgroupsofipCheck IP group membership
dropcidrgroupRemove CIDR groups
invalidatecidrpermissionscacheClear CIDR cache
reloadcidrgroupscacheReload from storage
cidrfilteringstatsView filtering statistics