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
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Transit Gateway With Anypoint Platform
  • MuleSoft Operational and API Management Capabilities
  • MuleSoft Anypoint Platform Complete Setup Guide
  • Pilot VPC and Advanced NAT: Securely Connect Overlapping Networks to AWS VPC

Trending

  • How To Build Resilient Microservices Using Circuit Breakers and Retries: A Developer’s Guide To Surviving
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 3: Understanding Janus
  • Introduction to Retrieval Augmented Generation (RAG)
  • Intro to RAG: Foundations of Retrieval Augmented Generation, Part 1
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. What Is CIDR (Classless Inter-Domain Routing) in MuleSoft VPC

What Is CIDR (Classless Inter-Domain Routing) in MuleSoft VPC

Organization requiring around 500 IP Addresses or Host have to go with a Class B IP distribution system where almost more than 60,000 IP addresses are wasted.

By 
Jitendra Bafna user avatar
Jitendra Bafna
DZone Core CORE ·
Updated Dec. 23, 20 · Analysis
Likes (10)
Comment
Save
Tweet
Share
53.0K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

CIDR stands for Classless Inter-Domain Routing and it way of allocating IP address or host in more efficient manner. It replaces the old way of allocating IP address on based of class system. This method allocate the IP Addresses or host in more efficient way and avoid waste of IP Addresses.

  • Class A, 16 million IP Addresses.
  • Class B, 65,536 IP Addresses.
  • Class C, 256 IP Addresses

Let's consider the Organization requiring around 500 IP Addresses. In such cases, organizations have to go with a Class B IP distribution system where almost more than 60,000 IP addresses are wasted.

What Is an IP Address?

IP Addresses consist of two groups in bits in the address, the most significant bits are network prefix which identifies network or (subnet) and least significant bits from host identifier which specifies a particular interface of the host on that network.

IP Addresses have 2 components: 

  1. Network Address 
  2. Host Address

Each IP Address (IPv4) is 32 bit or 4 Octet. Below is the representation of IP Address in Binary

IP addresses

CIDR Block Notation: — xxx.xxx.xxx.xxx/n, where n is the number of bits used for the subnet mask.

Subnet Mask is made up of setting up all network bits to all 1's and host bits to all 0's.

Let's consider, if you provide CIDR Block 192.168.0.0/24, it will give 255 hosts or IP addresses.

CIDR Notation Total Host
192.168.0.0/24 256
192.168.0.0/23 512
192.168.0.0/22 1024

What Is Subnet?

A subnetwork or subnet is a logical subdivision of an IP network. The practice of dividing a network into two or more networks is called subnetting. Computers that belong to a subnet are addressed with an identical most-significant bit-group in their IP addresses.

Now, we will see how to Calculate the total number of hosts using Subnet Mask.

Use Case 1 

Subnet Mask 192.168.0.0/24 will equate to IP Range 192.168.0.0 — 192.168.0.255.

Subnet Mask 192.168.0.0/24

N represents Network and H represents Host. In the above example, we made 24 bits to 1's and the remaining 8 bits to 0's because the Subnet Mask end range is 24. Total 0's are 8 for Host (2*2*2*2*2*2*2*2=256).

This will give an IP range of 192.168.0.0 — 192.168.0.255 (Total 256 Hosts).

Use Case 2

Subnet Mask 192.168.0.0/23 will equate to IP Range 192.168.0.0 — 192.168.0.511.

Subnet Mask 192.168.0.0/23

N represents Network and H represents Host. In the above example, we made 23 bits to 1's and the remaining 9 bits to 0's because the Subnet Mask end range is 23. Total 0's are 9 for Host (2*2*2*2*2*2*2*2*2=512).

This will give an IP range of 192.168.0.0 — 192.168.0.511 (Total 512 Hosts).

Use Case 3

Subnet Mask 192.168.0.0/27 will equate to IP Range 192.168.0.0 — 192.168.0.31.

Subnet Mask 192.168.0.0/27

N represents Network and H represents Host. In the above example, we made 27 bits to 1's and the remaining 5 bits to 0's because the Subnet Mask end range is 27. Total 0's are 5 for Host (2*2*2*2*2=32).

We have borrowed 3 bits from the host to make a total of 27 bits. Subnet will be (2*2*2=8) and the Host will be 32. So we can get a total of 8 subnets.

Subnetworks will be 192.168.0.0/27, 192.168.0.31/27, 192.168.0.63/27, 192.168.0.95/27, 192.168.0.127/27, 192.168.0.159/27, 192.168.0.191/27, 192.168.0.223/27

Here we are dividing the subnet mask into smaller subnetworks.

Whenever you are creating MuleSoft VPC, you need to make sure whatever CIDR Mask you are providing doesn't conflict with your on-premise or any other networks.

The smallest network subnet block you can assign for your Anypoint VPC is /24 and the largest /16. 

For each worker deployed to CloudHub, the following IP assignation takes place:

  • For better fault tolerance, the VPC subnet may be divided into up to four Availability Zones.
  • A few IP addresses are reserved for infrastructure.
  • At least two IP addresses per worker to perform at zero-downtime.

MuleSoft VPC Sizing

Now, we learn how we can do the VPC sizing. Below are some requirements that received from your client and it may vary from client to client.

  • You have four environments dev, test, sit and prod.
  • Application on dev and sit must run on 1 Worker.
  • Application on the test must be run on 2 Workers.
  • Application on prod must run on 2 Workers.
  • Total Application = 100 (Near Future)
  • The organization will have 2 VPC’s, one for PROD and another for NON PROD.

The problem statement is that we need to decide the minimum CIDR block will be needed for PROD and NON-PROD VPC.

Environment

Production VPC

Non-Production VPC

Dev


100*1 Worker =100

SIT


100*1 Worker =100

Test


100*2 Worker =200

Production

100*2=200


Total

200

400

Additional IP Address required for zero downtime (50% of Total)

100

200

Total IPs

300

600


There will be 2 IPs reserved for each VPC for infrastructure.

For Production VPC, we require around 300 IPs and it will be provided by a subnet mask of /23 (e.g. 192.168.0.0/23). This subnet mask will provide 512 IPs.

For Non-Production VPC, we require around 600 IPs and it will be provided by a subnet mask of /22 (e.g. 192.168.0.0/22). This subnet mask will provide 1024 IPs.

Smallest VPC size supported by MuleSoft is /24 and larger is /16.


You should know how you can make use of the CIDR range efficiently and perform MuleSoft VPC sizing.

Virtual private cloud Host (Unix) MuleSoft Network Use case

Opinions expressed by DZone contributors are their own.

Related

  • Transit Gateway With Anypoint Platform
  • MuleSoft Operational and API Management Capabilities
  • MuleSoft Anypoint Platform Complete Setup Guide
  • Pilot VPC and Advanced NAT: Securely Connect Overlapping Networks to AWS VPC

Partner Resources

×

Comments
Oops! Something Went Wrong

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

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!