I'm having a hard time understanding how to turn, for example, 172.16.32.0/21 in to a subnet mask... I know it's not tough but for some reason, it's eluding me.
This calculator http://www.subnet-calculator.com/cidr.php seems to work right. Enter the base IP (172.16.32.0) and then below that the mask bits (21) and it calculates the rest.
0
GaleBeckwithAuthor Commented:
I'm actually trying to figure out how to do it myself, without a calculator.
Then this is a better explanation: http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing If you take the IP address as 4 8-bit bytes, the mask number is the left-most bits, 21 in your case. I don't think all combinations are valid though.
0
Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.
I'm curious what you are expecting. What _jesper_ showed is the same as on the link I posted and is the way it is normally done. There are a few rules and restrictions in addition but that is the 'math' to do it.
There are four octets that define the value of an IP address or netmask.
Add the binary bits from right to left with the value of the bit to the immediate left being double the amount of the bit to its right. 1 1 1 1 1 1 1 1
--------------------------------
There are a maximum of 255 bits to each octet => 128+64+32+16+8+4+2+1
How many bits are remaining? 7 = 4+2+1. This is also the number used in an inverse mask. Add 7 to the 3rd octet and you will see the last usable number within that field that you may use within that /21. Because you include the starting subnet boundary, you have a total of 8 /24s for your use.
Hope I remember this correctly.... I just count on my fingers. You are using 11 bits for your computers and 5 for the subnets. 11 should give you 2048 computers per subnet and 32 subnets. With 3 bits being used in the second octet, you would count 2-4-8 and subtract 8 from 256 and get 248. Bit count goes on your fingers 2 4 8 16 32 64 128 256 .... Been a while since I took that ccna. So if I have it correct and using your address and I needed 500 users per subnet, I should have a mask of /23 or 255.255.254.0 giving me 512 users for 128 subnets.
The /21 determines how many bits in the subnet mask are set to one from left to right as you write them down. After you've written down 21 consecutive one's, start writing consecutive zero's until you have 32 bits. (Break them up into 8 bits separated by a decimal point)
Without a calculator, you count the total bits to convert from 'slash' format. e.g.
1111 1111 . 1111 1111 . 1111 1000 . 0000 0000 Subnet Mask = /21 (out of 32-bits total)
255 . 255 . 3rd octet . 4th octet
Available IP addresses is always 2 less than possible, because one is reserved as the network identifier and one is reserved as the broadcast IP.
So, for the 172.16.32.0 /21 network, there are really only 2046 IPs available.
---
There are 10 kinds of people - those who think in binary, and those who don't.
0
Featured Post
This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.