English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am having problems determining the number of bits needed for a custom subnet mask and the number of usable networks. If anyone has a simpler way of determining this, please let me know.

Also, like a previous poster did, please do not simply refer me to a website. None have helped so far. I was really hoping for dialogue with a human being this time. Thanks.

2007-01-17 14:51:12 · 2 answers · asked by tricon7 1 in Computers & Internet Computer Networking

2 answers

Okay, assuming a class C network, you've got 8 bits to play with. Some of those bits will be used for the mask (determining the number of sub networks), the rest for the network addresses (which determines the number of hosts). The number of either will be 2 raised to the number of bits, minus 2. So if you have 3 bits for the mask, there will be (2*2*2)-2 = 6 networks, and (2*2*2*2*2)-2 = 30 hosts per network.

To work the reverse, if you need, say, 12 networks, 3 bits for the mask won't give you enough, so you have to go to 4 bits, which allow up to (2*2*2*2)-2 = 14 networks. That leaves 4 bits for the network addresses, which from the same math gives you up to 14 hosts per network.

If you have a class B network, there are 16 bits to work with (or class A, 24 bits), to split between mask and subnet addresses. The method is the same, you just have to raise 2 to higher powers.

Anyway, the final mask will appear in binary as a string of 1's followed by 0's, 32 digits long. The 0's at the end represent the network addresses, the 1's represent the mask (the first 8, 16, or 24 are the class mask, the rest of them from the subnet mask). This would look like 11111111 11111111 11111111 11100000 for the example in the first paragraph. (These are generally broken into 4 groups to make them easier to read.) They are then converted from binary into four decimal numbers, separated by periods: 255.255.255.224

Hope this helps.

2007-01-17 15:59:52 · answer #1 · answered by Peter_AZ 7 · 0 0

Hey Dude,

What are you trying to do? You need to be able to know how to subnet in order for any of us to help you. How many networks do you want or how many hosts do you need in each subnet? When you tell us this, we can help.

Otherwise http://www.solarwinds.net has a GREAT subnet calculator that can basically do anything you need to do for subnetting to SIDR, etc. It is only an IPv4 calc though.

Good Luck.

Tom

2007-01-17 14:56:05 · answer #2 · answered by Cafetom 4 · 0 0

fedest.com, questions and answers