Sunday, June 23, 2024
No menu items!
HomeCloud ComputingProactively manage your subnet IP address allocation with Network Analyzer

Proactively manage your subnet IP address allocation with Network Analyzer

Effectively managing your network’s IP addresses is essential to efficiently operating your enterprise. As a network administrator, observing the usage and growth of your IP address space is essential for capacity planning and proactively avoiding costly downtime. It is also key to identify where IP address allocation is non-optimal and could be resized for better resource utilization.

In order to efficiently manage your network’s IP addresses resources, you should monitor: 

1) The current allocation of IP addresses distributed across your subnetworks

2) High subnet IP Utilization to avoid resource exhaustion

Network Intelligence Center Network Analyzer automatically monitors your VPC configurations to surface network and services issues. Network Analyzer proactively powers subnet IP address management workflows through 2 key insights:

1) IP address utilization summary
Streamlines identifying where IP addresses are nearing depletion, and which IP addresses are being inefficiently under-utilized.

2) High IP address utilization of a subnet range
Enables proactive monitoring of subnet ranges nearing IP exhaustion

Get a Bird’s Eye View of your Network’s Subnet IP allocations with the new IP Utilization Summary Insight

Our new Network Analyzer insight IP utilization summary is designed to help Network Administrators better understand their IP address utilization in Google Cloud. It enables you to observe IP address utilization of all the VPCs and subnet ranges in your Google Cloud project, empowering the identification of subnets that:

1) Are reaching full IP address utilization in the future 

2) May be oversized and underused

Using the new IP Utilization Summary Insight

Select a Google Cloud project with a VPC network configured, and record the project ID. Replace the <PROJECT_ID> referenced below with the ID of your Google Cloud project.

1) Enabling the API in this project

code_block[StructValue([(u’code’, u’gcloud services enable –project <PROJECT_ID>’), (u’language’, u”), (u’caption’, <wagtail.wagtailcore.rich_text.RichText object at 0x3ec732f31a90>)])]

2) Getting the IP utilization information for this project

code_block[StructValue([(u’code’, u’gcloud recommender insights list –insight-type=google.networkanalyzer.vpcnetwork.ipAddressInsight –format=yaml –location global –project <PROJECT_ID>’), (u’language’, u”), (u’caption’, <wagtail.wagtailcore.rich_text.RichText object at 0x3ec732e1f5d0>)])]

Example of output:

code_block[StructValue([(u’code’, u’—rncategory: MANAGEABILITYrncontent:rn ipUtilizationSummaryInfo:rn – networkStats:rn – networkUri: // <PROJECT_ID>/global/networks/vpc-prodrn subnetStats:rn – subnetRangeStats:rn – allocationRatio: 0.015873rn subnetRangePrefix: subnetUri: // <PROJECT_ID>/regions/europe-west1/subnetworks/subnet-prod-1rn projectUri: // <PROJECT_ID>rndescription: Summary of IP utilization for all subnet rangesrnetag: ‘”991907143dcaa876″‘rninsightSubtype: IP_UTILIZATION_SUMMARYrnlastRefreshTime: ‘2023-06-04T18:45:17.833851299Z’rnname: projects/949352108157/locations/global/insightTypes/google.networkanalyzer.vpcnetwork.ipAddressInsight/insights/f357b25d-67bc-461f-bb48-5e7cb6374bacrnobservationPeriod: 9936000.351755031srnseverity: LOWrnstateInfo:rn state: ACTIVErntargetResources:rn- //<PROJECT_ID>’), (u’language’, u”), (u’caption’, <wagtail.wagtailcore.rich_text.RichText object at 0x3ec732df0990>)])]

The attribute allocationRatio represents the percentage of used IP addresses compared to the available IP addresses in your subnet range (identified by the subnetRangePrefix and subnetUri). The allocationRatio will contain a value between 0 and 1, with 1 representing 100% of IP utilization. For example, an allocationRatio of 0.5 represents 50% IP utilization by that subnet. Subnet ranges with 0% IP utilization are excluded from this insight.

This insight takes into account the4 reserved IP addresses by Google in IPv4 subnets.

Notice that you can see the last refresh date in the “lastRefreshTime” field. Network Analyzer will automatically refresh the IP utilization information every day. You can also trigger a manual refresh of the Network Analyzer insight information. To trigger a manual refresh, navigate to Network Analyzer in the Google Cloud Console and click the “UPDATE” button:

Every time this IP utilization information is updated (whether automatically, or manually), a log entry will be created. You can use the following query to navigate to such logs:

You can also use this logging query to understand the historical IP utilization of your subnets at a prior point in time.


The IP Utilization Summary insight is accessible programmatically, via theRecommender API, and/or Network Analyzerlogs. In the future, this insight is planned to be integrated into the Network Analyzer UI. 

This IP utilization summary insight supports both subnet primary range and secondary ranges. If you are using secondary ranges, the insight will allow you to monitor how many IP addresses are allocated in the secondary range. For example, if you use GKE, you will see how much of the secondary range for pods is allocated with your current GKE nodes.

Learn more

To monitor GKE IP utilization, please take a look at additional Network Analyzer insights documentation.

A special thank you to Network Analyzer Engineering Lead Hongkun Yang for his contributions to this blog post.

Cloud BlogRead More



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments