How To Calculate Ip Range From Cidr?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To calculate the IP range from CIDR, first calculate the number of IP addresses in the range. To do this, subtract the CIDR from 32 (e.g. for a /24 CIDR, 32-24 = 8). Then calculate the number of IP addresses in the range by raising 2 to the power of the result (e.g. for a /24 CIDR, 28 = 256 IP addresses). Finally, find the first and last IP address in the range by subtracting the number of IP addresses from the CIDR network address (e.g. for a /24 CIDR, the first address is 192.168.0.0, and the last address is 192.168.0.255).