Calculating Custom Subnet Masks

  • Thread starter Thread starter Loki23
  • Start date Start date
AI Thread Summary
Custom subnetting involves dividing a network into smaller subnets to optimize IP address usage. A Class B network, such as 154.71.0.0, has 16 bits for the network ID and 16 for the host ID, allowing for 65,534 total hosts when no subnets are defined. By allocating bits for subnet IDs, the number of available subnets increases while reducing the number of hosts per subnet. The calculation for total hosts is based on the formula 2^n - 2, where n is the number of host bits, accounting for the network and broadcast addresses. Understanding binary representation of subnet masks is crucial for determining network and host portions of an IP address.
Loki23
Messages
11
Reaction score
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
took a screen shot from a tutorial that lays out a table:

qfiIV.jpg
 
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.
 
This week, I saw a documentary done by the French called Les sacrifiés de l'IA, which was presented by a Canadian show Enquête. If you understand French I recommend it. Very eye-opening. I found a similar documentary in English called The Human Cost of AI: Data workers in the Global South. There is also an interview with Milagros Miceli (appearing in both documentaries) on Youtube: I also found a powerpoint presentation by the economist Uma Rani (appearing in the French documentary), AI...

Similar threads

Back
Top