EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login

What is CIDR?

By Priya PedamkarPriya Pedamkar

Home » Software Development » Software Development Tutorials » Network Security Tutorial » What is CIDR?

What is CIDR?

Introduction to CIDR

Classless inter-domain routing (CIDR) is a method for allocating IP addresses and IP routing. A collection of Internet Protocol (IP) standards is used to create unique identifiers for networks and individual devices. The IP addresses allow the transmission of unique packets of information to specific computers.

What is CIDR?

CIDR is mainly used to use IP addresses and solve the routing table explosion efficiently. It is defined in RFC (Request for comments) 1518 and RFC 4632. It is an address block allocation. There are five different classes in the IPV4 addressing system. The IP address classes are used for Internet IP addresses assignment.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

They are Class A address, Class B address, Class C address, Class D address, Class E address.

Class A address: In Class A, the first bit is considered. It is always set to zero. It can take the IP address from 1.X.X.X to 126.X.X.X.

Class B address: In Class B, the first two bits are considered. It can take the IP address from 128.0.X.X to 191.255.X.X.

Class C address: In Class C, the first three bits are considered. It can take the IP address from 192.0.0.X to 223.255.255.X.

Class D address: In-Class D first four bits are considered. It can take the IP address from 224.0.0.0 to 239.255.255.255. This Class is used for multicasting.

Popular Course in this category
Cyber Security Training (12 Courses, 3 Projects)12 Online Courses | 3 Hands-on Projects | 77+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.5 (6,002 ratings)
Course Price

View Course

Related Courses
CDN Training (2 Courses)OSPF Training Program (2 Courses)Penetration Testing Training Program (2 Courses)

Class E address: The IP addresses in Class E are reserved for Research and Development. It can take the IP address from 240.0.0.0 to 255.255.255.254.

So based on the requirement, we can choose the IP addresses.

For host addresses, we use the IP addresses of Class A/ Class B/ Class C.

Today the networking address ranges are using classless Interdomain Routing. By using CIDR, the old way of using the IP address for class A, class B, class C is replaced. In the older method, if we take the example of Class B as it is mostly used. If any institute or any organization requires hosts, they will be provided with the hosts, but in most of the cases, all the allocated hosts are not getting used, and it even leads to the routing table to the explosion.

In CIDR, the person who requires the IP addresses has to purchase the IP address allocator from the service provider; it can be any size that the purchaser requires. Whenever it is enabled based on the address prefix, it allows different routers at different levels to route on prefixes of different lengths. The CIDR is used for IPV4. IPV4 is 32 bits, and the most commonly used network are/8, /16, /24 and /32.

How does CIDR Works?

CIDR is an alternative to traditional subnetting. It is also called classless Addressing. It consists of CIDR blocks; by this, it dynamically allocates the IP addresses on the requirement of the users based on certain rules. Internet Assigned Number Authority (IANA) handles the assignment of CIDR blocks.

CIDR block

This block contains IP addresses. This block consists of 3 basic rules.

The 3 basic rules mentioned below:

Rule 1: In the CIDR block, the IP addresses which are allocated to the hosts should be continuous.

Rule 2: The size of the block should be of power 2 and should be equal to the total number of IP addresses.

Rule 3: The size of the block must be divisible by the first IP address of the block.

CIDR Notation

A CIDR IP address representation is the same as the IP address; it ends with a backward slash followed by a number. The n represents the number of network bits. It is called as IP network prefix.

The general way of representation of the CIDR IP address is

a.b.c.d / n

Examples

If we are given the CIDR representation, we can find the range of IP addresses.

We can see this with examples.

Example #1

The CIDR representation is 21.19.35.40/24. Find the IP addresses of the CIDR block?

24 represents the number of bits used for the identification of the network.

The 5 bits are used for the identification of hosts.

The CIDR address is 21.19.35.40/24.

The first IP address is 21.19.35.0

The last IP address is 21.19.35.255

The total cost is 256.

Netmask is 255.255.255.0.

Example #2

The representation is 255.255.255.255/31. Find the IP addresses of the CIDR block?

31 represents the number of bits used for the identification of the network.

The 1 bit is used for the identification of hosts.

The CIDR address is 255.255.255.255/31.

The first IP address is 255.255.255.254

The last IP address is 255.255.255.255

The total cost is 2.

Netmask is 255.255.255.254.

We can find the CIDR block from the block of IP addresses.

Example #3

The IP addresses range is from 21.19.35.64 and 21.19.35.127. Find the CIDR block?

The IP address ranges are from 21.19.35.64 and 21.19.35.127.

Before preceding further, the CIDR block rules, which are mentioned above, should be checked if they are satisfied, then it is a CIDR block.

So the size of the block is 26. (i.e., 127 – 64 + 1 = 64)

Number of bits = 32 – 6 = 26.

CIDR block is 21.19.35.64/26.

Example #4

The IP addresses range is from 255.255.255.32 and 255.255.255.63. Find the CIDR block?

The IP address ranges are from 255.255.255.32 and 255.255.255.63.

Before preceding further, the CIDR block rules, which are mentioned above, should be checked if they are satisfied, then it is a CIDR block.

So the size of the block is 25.   (i.e., 63 – 32 + 1 = 64)

 Number of bits = 32 – 5 = 27.

CIDR block is 255.255.255.32/27.

Recommended Articles

This is a guide to What is CIDR. Here we discuss how does CIDR Works and examples to find the range of the IP addresses. You may also have a look at the following articles to learn more –

  1. What is Amazon VPC?
  2. What is DHCP?
  3. Socket Programming in PHP
  4. Overloading and Overriding in C++

Cyber Security Training (12 Courses, 3 Projects)

12 Online Courses

3 Hands-on Projects

77+ Hours

Verifiable Certificate of Completion

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Network Security Tutorial
  • Advanced
    • Cryptosystems
    • Configuring DHCP Server
    • Block Cipher modes of Operation
    • TCP/IP Model
    • Types of Network
    • Types of Network Devices
    • Types of Network Topology
    • Types of Intrusion Prevention System
    • Types of Proxy Servers
    • Types of Websites
    • Types of NAT 
    • Mobile IP
    • Career in Automobile Design
    • What is TFS
    • What is NAT
    • What is OSI Model
    • Data Link Layer OSI Model
    • What is Cross Site Scripting
    • Applications of Sensors
    • ARP Packet Format
    • Asymmetric Information
    • Autoencoders
    • What is FTP Server?
    • IPS Tools
    • IPv4 Header Format
    • IPv6 Header Format
    • Authentication Header
    • Kerberos
    • Network Mapper
    • Network Scanning Tools
    • Network Mapping Tools
    • Network Access Control
    • Vulnerability Assessment Tools
    • Network Sniffer
    • Networking Commands
    • Networking Devices
    • Networking Strategies
    • Digital Certificate
    • What is a Digital Signature?
    • Digital Signature Softwares
    • Digital Signature Types
    • Digital Signature vs Digital Certificate
    • PKCS
    • What is FTP
    • FTP Commands
    • What is MIME?
    • What is Smart Card?
    • Networking Ports
    • Mutual Authentication
    • Password Authentication
    • Data Masking 
    • Authentication Tokens
    • Biometric Authentication
    • What is IP?
    • IPSec
    • Secure Electronic Transaction
    • What is CIDR
    • Static Binding and Dynamic Binding
    • What is SSL
    • PKIX
    • Public Key Infrastructure
    • What is Wireshark
    • Daisy Chain Topology
    • Markov Logic Network
    • Security engineering
    • SNMP Monitoring Tools
    • Network Analysis Tools
    • Server Monitoring Tools
    • Network Discovery Tools
    • Network Management Tool
    • SIEM Tools
    • OSINT Tools
    • Multiple Ping Tool
  • Basics
    • Security Consultant Definition
    • Security Policies
    • What is Network Security
    • What is Data Security?
    • What is Cryptography
    • Cryptography Techniques
    • Cryptography Tools
    • Data Security Techniques and Privacy
    • Digital Signature Cryptography
    • Java Cryptography
    • Basics of Cybersecurity
    • What is Network Topology
    • Algorithms and Cryptography
    • HTTP Methods
    • Security Technologies
    • Security Architecture
    • Network Topologies
    • What is a Physical Address?
    • Logical Address
    • What is Storage Area Network?
    • Mobile Ad Hoc Network
    • What is Computer Networks?
    • Security Principles
    • What is Remote Access?
  • Protocols
    • What is TCP Protocol
    • What is TCP/IP
    • How do IP Addresses Work?
    • Routing Protocols Types
    • What is Telnet
    • What is TFTP
    • What is DHCP
    • What is SFTP
    • Address Resolution Protocol
    • Internet Control Message Protocol
    • Simple Mail Transfer Protocol
    • Internet Security Protocols
    • SMTP Protocol
    • Types of Networking Protocols
    • User Datagram Protocol
    • Data Link Layer
    • Data Link Layer Services
    • Network Layer
    • Transport Layer Protocols
    • What Is Networking Protocols
    • TFTP
    • What is ARP
    • Basic Fundamental Of Networking
    • What is IPv4
    • What is IPv6
    • CIFS Protocol
    • What is SMB?
    • What is EIGRP
    • What is LLDP?
  • Routing
    • What is Router
    • Types of Routers
    • Dynamic Routing
    • Routing Algorithms
    • Routing Protocol
    • What is Routing
    • What is Static Routing
    • Important Types of DNS Servers (Powerful)
  • Attacks
    • Types of Network Attacks
    • What is Trojan Horse Virus
    • What is DOS
    • Types of DOS Attacks
    • DDos Attack Mitigation
    • Ransomware Attack  
    • Types of Cyber Attack
    • What is a Brute Force Attack
    • What is a Phishing Attack
    • What is Cyber Attack
    • What is DDoS Attack
    • What is Man In The Middle Attack
    • What is Man In The Middle Attack
    • What is Ransomware
    • What is Pharming
    • What is Phishing
    • What is CSRF
    • DNS Amplification Attack
    • Denial of Service Attack
  • Algorithm
    • IDEA Algorithm
    • MD5 Algorithm
    • Symmetric Algorithms
    • Diffie Hellman Key Exchange Algorithm
    • Digital Signature Algorithm
    • Encryption Algorithm
    • Advanced Encryption Standard
    • Asymmetric Encryption
    • ElGamal Encryption
    • HMAC
    • DES Algorithm
    • Brute Force Algorithm
    • SHA Algorithm
    • RSA Algorithm
    • What is Digital Certificate?
    • Certificate Revocation
    • RC5
  • Encryption/ Decryption
    • Encryption process
    • Public Key Encryption
    • Symmetric Key Encryption
    • What is Encryption
    • What is Decryption
    • Types of Cipher
    • Transposition Techniques
    • What is Steganography
    • One Time Pad
    • Steganography Techniques
  • Hosting
    • Types of Web Hosting
    • Free Web Hosting Sites
    • What is Hosting
    • What is VPS Hosting
    • What is Web Hosting
    • Types of Domain
    • VPN Applications for PC
    • Why we use VPN?
    • What is Virtual Host?
  • Firewalls
    • What is a Firewall?
    • Types of Firewalls
    • Firewall Devices
    • Firewall Uses
  • Interview Questions
    • Network Security Interview Questions
    • Networking Interview Questions
    • EIGRP Interview Questions

Related Courses

CDN Training

OSPF Certification Training

Penetration Training Course

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

© 2020 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA Login

Forgot Password?

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you
Book Your One Instructor : One Learner Free Class

Let’s Get Started

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

Special Offer - Cyber Security Training (12 Courses, 3 Projects) Learn More