Overview
Classless Inter-Domain Routing(CIDR) is a method for allocating IP addresses and IP routing. Jive only accepts CIDR formatted IPs, so it is essential to translate the IP address in this format. This article explains the steps in converting IP addresses in this format.
Solution
The CIDR format is composed of an IP address followed by a slash and a number, like for example 8.8.8.8/32. The number after the slash is the "bitmask", meaning the number of bits of the address that are fixed (not varying). So, the higher the number, the fewer bits can change, the fewer IP addressed will be represented by the notation. The smaller the number, the wider the range will be.
Single IP Address
Translating a single IP address into a CIDR format can be done by simply adding a /32
for an IPv4 address or /128
for an IPv6 address.
Example
To turn the IPv4 address 168.215.186.2 into a CIDR format, write it as 168.215.186.2/32
. Similarly for IPv6, to translate the IPv6 address 2001:0db8:85a3:0000:00000:8a2e:0370:733 to the said format, write it as 2001:0db8:85a3:0000:0000:8a2e:0370:733/128
IP Address Range
If you are asked to add an address range (e.g., whitelist this range: 128.1.0.1 to 136.255.255.254), you will probably get multiple CIDR addresses because there will be a multitude of subnet masks (subnet masks examples are /32, /30, or anything after the '/').
There is no straightforward way to convert a range of IP addresses other than using a third-party translation site for an address block for all the CIDR addresses. It is recommended to use the CIDR Utility Tool | IP Address Guide:
Once you are on the utility tool, follow through the below steps:
- Copy the IP address range and paste it in the IP Range To CIDR field.
- Click Calculate.
- Copy and save the resulting code block.
Taking as an example the range from 80.100.110.0 to 80.100.120.255:
As you can notice, a single range can easily translate into multiple ranges in CIDR format.
Comments
0 comments
Article is closed for comments.