Saturday, January 7, 2012

How to calculate the IP Range in Network Address

Do you like this post?


How to calculate the IP Range in Network Address
If someone gives you an IP address of 97.156.253.28 and a subnet mask of 255.255.255.248, how do you determine the network address and the broadcast address, in other words the boundaries, of your network? The following sections can be learn to get IP Range in network address.

Manual Calculation
1.     Subtract the last octet of the subnet mask from 256 to give the number of IP addresses in the subnet. (256 - 248) = 8
2.     Divide the last octet of the IP address by the result of step 1; don't bother with the remainder (for example 28 / 8 = 3). This gives you the theoretical number of subnets of the same size that are below this IP address.
3.     Multiply this result by the result of step 1 to get the network address (8 x 3 = 24). Think of it as the third subnet with 8 addresses in it. The network address is therefore 97.156.253.24
4.     The broadcast address is the result of step 3 plus the result of step 1 minus 1. (24 + 8 -1 = 31). Think of it as the broadcast address being the network address plus the number of IP addresses in the subnet minus 1". The broadcast address is 97.156.253.31
Let's do this for 192.168.4.56 with a mask of 255.255.255.224:
1.     256 - 224 = 32
2.     56/32 = 1
3.     32 x 1 = 32. Therefore the network base address is 192.168.4.32
4.     32 + 32 - 1 = 63. Therefore the broadcast address is 192.168.4.63
Let's do this for 10.0.0.75 with a mask of 255.255.255.240
1.     256 - 240 = 16
2.     75/16 = 4
3.     16 x 4 = 64. Therefore the network base address is 10.0.0.64
4.     64 + 16 -1 = 79. Therefore the broadcast address is 10.0.0.79
Note: As a rule of thumb, the last octet of your network base address must be divisible by the "256 minus the last octet of your subnet mask" and leave no remainder. If you are sub-netting a large chunk of IP addresses it's always a good idea to lay it out on a spreadsheet to make sure there are no overlapping subnets. Once again, this calculation exercise only works with subnet masks that start with "255.255.255".

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More