DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Keep Your Application Secrets Secret
  • Dynatrace Perform: Day Two
  • Mastering Multi-Cloud Integration: SAFe 5.0, MuleSoft, and AWS - A Personal Journey
  • The 7 Biggest Cloud Misconfigurations That Hackers Love (and How to Fix Them)

Trending

  • 11 Agentic Testing Tools to Know in 2026
  • Designing API-First EMR Architectures in .NET: Enabling Modular Growth in Compliance-Driven Systems
  • The Hidden Cost of Overprivileged Tokens: Designing Messaging Platforms That Assume Compromise
  • Stop Running Two Data Systems for One Agent Query
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Understanding CIDRs and Public vs Private IPs

Understanding CIDRs and Public vs Private IPs

We use CIDR ranges for security-related things. Like to secure the traffic in terms of IP addresses. Usually, it helps us in defining the IP address range.

By 
Sravan Lingam user avatar
Sravan Lingam
·
Updated Mar. 16, 21 · Tutorial
Likes (12)
Comment
Save
Tweet
Share
25.8K Views

Join the DZone community and get the full member experience.

Join For Free

Hello, Muleys!

We often hear about CIDR (spelled as  /ˈsaɪdər, ˈsɪ-/)  when we encounter AWS terms or when configuring VPC's in MuleSoft. So this article basically helps you to understand what CIDRs are and how to calculate the range of IP addresses etc.

We use CIDR ranges for security-related things. Like to secure the traffic in terms of IP addresses. Usually, it helps us in defining the IP address range

As we all know, MuleSoft's cloud hub applications are deployed in AWS internally so we should be familiar with the notation of CIDR w.r.t AWS.

Usually,  the notation for CIDR is 

XML
 




xxxxxxxxxx
1


 
1
XX.YY.ZZ.AA/32 --> 1 IP


XML
 




xxxxxxxxxx
1


 
1
0.0.0.0/0 --> All IP's



We can define anything between 0 to 32 range. CIDR consists of 2 components: Base IP (xx.yy.zz.aa) and Subnet Mask (/26)

XML
 




xxxxxxxxxx
1


 
1
192.134.0.0/29 
2

          
3

          
4
192.134.0.0 is the Base IP address range 
5
/29 is the Subnet Mask



Base IP: Represents the IP address contained in that range

Subnet Mask: Defines how many bits can change in the IP

The subnet has two forms of representation: In windows, it is usually denoted as 255.255.255.0 (less commonly used). In AWS terms, it is denoted as /29 (most commonly used)

Subnet: It basically gives the additional next values of Base IP.

Calculated as:

XML
 




xxxxxxxxxx
1
13
9


 
1
/32 --  2^0 -- 1 IP
2
/31 --  2^1 - 2 IP
3
/30 --  2^2 - 4 IP
4
.
5
.
6
.
7
/0 -- 2^32 -ALL IPs  



How did we calculate?

Explanation of how calculation was performed

Calculation Details for 192.134.0.0/29

  • CIDR: 192.134.0.0/29
  • IPs in Range: 8 ( 2^ 32-29 = 2^ 3 =8)
  • Mask Bits:  29
  • CIDR IP Range: (192.134.0.0 - 192.134.0.7 )  i.e, 192.134.0.0,192.134.0.1,192.134.0.2,192.134.0.3,192.134.0.4,192.134.0.5,192.134.0.6,192.134.0.7, total of 8 IPs
  • Mask Bits: 29
  • Note: In Base IP, for IPv4 , we have a notation like w.x.y.z , 4 sections; each sections for eg: "w" can vary from 0 to 255 , likewise:

So the base IP is usually between the range of 0.0.0.0 to 255.255.255.255 (IPv4 range). Use this website here to calculate the CIDR range.

Public vs Private IPs

The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation. They define which range of IP addresses are public and can be accessed by everyone and what range of IP addresses are private and who can use them.

Private vs Public IP Ranges

Hope this article helps you to understand the basics of CIDR and its calculation along with what is private and public IP's and their range.

XML AWS MuleSoft application Cloud EGS (program) security Form (document) Internet (web browser)

Opinions expressed by DZone contributors are their own.

Related

  • Keep Your Application Secrets Secret
  • Dynatrace Perform: Day Two
  • Mastering Multi-Cloud Integration: SAFe 5.0, MuleSoft, and AWS - A Personal Journey
  • The 7 Biggest Cloud Misconfigurations That Hackers Love (and How to Fix Them)

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook