From Netmask to subnets and addresses for each subnet

I write this tutorial without starting from the networking origins, assuming you have already read something about IPv4 addresses, network addresses, broadcast addresses and network mask addresses. If you still do not know anything, I refer to “Computer clipboard Free”, whose link can be found in our “Links.”

Probably like me you’re a little ‘messed up at least in the first moments with the IP addresses, especially regarding private networks. Specifically, I asked myself: how do you, given a network mask, you know how many subnets in the network breaks down, how many IP addresses you can use for each subnet? Well, thinking about it a bit ‘I wrote two formulette to derive this data easily.
For example, given the netmask (so 11111111.11111111.11111111.11111000, to 29bit), this tells us that the last subnet of the network address and will start from xxx248 to xxx255. So xxx248 will be the address of the last subnet; by xxx249 to xxx254 will be available IP addresses to hosts on the subnet; and xxx255 will be the broadcast address of the last subnet. Then we see a constant change in the number of IP addresses. We can find this constant change, I call module, executing: module = 256 – ultimo_ottetto_netmask So it will be: module = 256-248 = 8 The 256 is explained by the fact that IP addresses do not start at 1 but 0 and then the total IP does not but are 255 256 (0 to 255). Adding the number of IP addresses in the example above we have: 1 subnet (xxx248), 6 usable (from xxx249 to xxx254) and 1 broadcast (xxx255) = 8 TOTAL ADDRESSES (module). Knowing this we can say that the first subnet will go from ip xxx0 to xxx7, the second from xxx8 to xxx15, the third from xxx16 to xxx23, etc. …. so we know that for every subnet we will have 6 IP ADDRESSES fOR tHE HOST, since 2 (the network and broadcast) are reserved. Now that the network mask know how many hosts per subnet can we connect, we should ask how many subnets we can exploit. To know the exact number simply divide the total number of IP (256) for the module: n_sottoreti = 256 / module in our case: n_sottoreti = 256/8 = 32 subnets So we know the two basic criteria and to create our own network: number of subnets that we can use and how many hosts per subnet can we connect. With Netmask we will have 32 subnets for 6 each PC. Byez


Leave Your Reply

Your email address will not be published. Required fields are marked *