Calculating Custom Subnet Masks

  • Thread starter Loki23
  • Start date
In summary, this conversation is about how to subnet a class B network and how to calculate the number of hosts that are available.
  • #1
Loki23
11
0
Hi everyone,

I'm still chipping away at networking. Right now in class we are doing "custom subnetting" which I am finding difficult. I find the material that he has given us to learn is not explained very well, so I resorted to internet tutorials. Here is an excerpt from something I found:

Imagine that we start with a Class B network with the network address 154.71.0.0. Since this is Class B, 16 bits are for the network ID (154.71) and 16 are for the host ID. In the default case there are no subnets (well, one “subnet” that is the whole network) and 65,534 hosts total. To subnet this network, we have a number of choices:

We can decide to use 1 bit for the subnet ID and 15 bits for the host ID. If we do this, then the total number of subnets is 21 or 2: the first subnet is 0 and the second is 1. The number of hosts available for each subnet is 215-2 or 32,766.

We can use 2 bits for the subnet ID and 14 for the host ID. In this case, we double the number of subnets: we now have 22 or 4 subnets: 00, 01, 10 and 11 (subnets 0, 1, 2 and 3). But the number of hosts is now only 214-2 or 16,382.

We can use any other combination of bits that add up to 16, as long as they allow us at least 2 hosts per subnet: 4 and 12, 5 and 11, and so on.

So... . I just don't understand how he is calculating the "total hosts". For instance, he said:

In the default case there are no subnets (well, one “subnet” that is the whole network) and 65,534 hosts total.


^ how does he calculate the total hosts? And I'm not even sure what the "default case" is supposed to look like.

I understand how to translate decimal over to binary, and I can identify classes. that's easy enough. But suddenly I'm over my head.
 
Computer science news on Phys.org
  • #2
took a screen shot from a tutorial that lays out a table:

qfiIV.jpg
 
  • #3
Loki23,

Subnetting really just comes down to simple binary numbers.

Example : IP Address : 192.168.1.1
Subnet Mask : 255.255.0.0

255.255.0.0 = 1111 1111.1111 1111.0000 0000.0000 0000 (in binary).

Now, all of the number ones identify the network bits, and all of the number zero's represent host bits. To figure out the total number of host's available you would add up your host bits in binary. So starting from right to left you would end up with a total of 65534 host's possible on your network. Keep in mind that in each subnet your lowest IP is used for the Network ID, and your highest IP would be used for your broadcast.

So, using 255.255.255.0 with an IP range of 192.168.1.0-192.168.1.255.

192.168.1.0 = Network ID
192.168.1.255 = broadcast address.

the 255.255.255.0 states that 192.168.1.xxx is the network portion, and xxx.xxx.xxx.1-255 are the adressable host ip's. the 0 = 1+2+4+8+16+32+64+128 = 256. The rule of thumb is 256 - 2, since you can't use your Network ID or Broadcast address.
 

Related to Calculating Custom Subnet Masks

1. What is a custom subnet mask?

A custom subnet mask is a network addressing scheme that allows for more flexibility in dividing a network into smaller subnets. It is used to determine which portion of an IP address corresponds to the network and which portion corresponds to the host.

2. How do you calculate a custom subnet mask?

To calculate a custom subnet mask, you need to determine the number of bits that will be used for the network portion and the host portion of the IP address. Then, you can convert the number of bits to decimal form and use it to create the custom subnet mask.

3. What is the purpose of a custom subnet mask?

The purpose of a custom subnet mask is to divide a network into smaller subnets, which can improve network performance and security. It also allows for more efficient use of IP addresses.

4. What is the difference between a default subnet mask and a custom subnet mask?

A default subnet mask is a predefined network addressing scheme that is used by most networks. It allows for a limited number of subnets and hosts. A custom subnet mask, on the other hand, allows for more flexibility and can accommodate a larger number of subnets and hosts.

5. What factors should be considered when calculating a custom subnet mask?

When calculating a custom subnet mask, you should consider the number of networks and hosts that will be required, as well as the growth potential of the network. It is important to strike a balance between having enough subnets and hosts, and not wasting IP addresses.

Similar threads

Replies
13
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
3K
  • Programming and Computer Science
Replies
1
Views
782
  • Programming and Computer Science
Replies
20
Views
3K
  • Computing and Technology
Replies
4
Views
1K
  • Computing and Technology
Replies
1
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
656
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Computing and Technology
2
Replies
43
Views
3K
  • Programming and Computer Science
Replies
15
Views
1K
Back
Top