Psychz - Raviteja
Votes: 0Posted On: May 24, 2017 05:52:52
The IP address is a unique address provided to a network element. An organization such as an office comprises of multiple network devices and needs multiple IP addresses. Hence, these organizations are, sometimes, provided with a block of IP addresses. The IP block depends on the nature and size of the organization. A small office may require hundred IP addresses but a large organization requires thousands of IP addresses.
There are certain restrictions while providing a block of address. They are listed below.
1. The addresses in a block must be contiguous, one after another.
2. The number of addresses in a block must be a power of 2 (I, 2, 4, 8, ... ).
3. The first address must be evenly divisible by the number of addresses.
For instance, let us take an IP block (10.0.0.0 to 10.0.0.15) of 16 IP addresses
1. The addresses are contiguous.
2. The number of addresses allotted is 16 (two to the power of 4).
3. The first address "10.0.0.0" when converted to decimal notation is 2147483648. This is perfectly divisible by 16.
Subnet Mask
The subnet mask is used to define the block of IP addresses provided to the organization. A block of IP address is represented as "a.b.c.d/n".
The "/n" is called as the CIDR notation.
Calculation of IP range - The "/ " notation after the IP address can be used to calculate the IP address range that falls into that category. All you have to do is subtract the prefix from the number 32(As IP addresses is a 32 bit number). Put the result as an exponent of 2 and you will get the number of IPs in that range.
For instance, to find the IP range of "/29" prefix, we subtract The prefix 29 from 32. The result 3 is used as an exponent of 2. Hence, the IP range you get is "2 to the power 3" i.e 8 IPs.
With this method, you will be able to calculate any IP range that is provided to you.