gaqzi.blogg.se

How to find subnet magic number
How to find subnet magic number






how to find subnet magic number

However, this time you skip the host part of the mask.

how to find subnet magic number

Next, you can perform the same binary and trick as before. It works roughly the same but you need to perform a bit more base-2 magic. You can then translate the binary IP address to a human-readable one. If either or the fields have a 0 then you enter a 0 on the third row. If both the base-2 IP address and the mask have a 1 in a field then you add a 1 in the same field on the last row. That sounds complicated but it is quite easy. The third row calculates what the first IP address is by doing a binary and operation between the first two rows. Below, the first row is the IP address 84.18.206.207 in base-2 and the second row is the mask. To calculate the first IP address in the range you can use another table. So, in effect a /23 mask gives you 510 usable IPs. Remember, though, that not all 512 IPs can be assigned to nodes, as the first and last IP in the range are reserved. In other words, the calculation is like so: If you are lost here, 9 is an exponent that defines how many times the base number (2) needs be multiplied. So, 2 (32-23) translates to 2 9, or “2 to the power of 9”: We are using 32 because IPv4 addresses are 32-bit numbers, and we are subtracting the number of bits that are turned on (23). But how do you calculate the number of IPs? To do so, we need to brush up on our knowledge of exponents. In other words, the first seven bits in the third octet are turned on in a /23 network. You get to 254 by adding up the first seven columns.

how to find subnet magic number

To see where the cut-off point is you can draw an exponent table: All bits in the first two octets are turned on (255) and the entire fourth octet are nodes (0). This is a class A IP address, but the mask is used to make the first 23 bits the network part.Īs a quick recap of the article about subnetting and CIDR, the interesting part in this example is the third octet. Calculating the number of IPsįor this article I will use our Strawberry server as an example. To follow along you need to have a good understanding of base-2 numbers.

how to find subnet magic number

I will explain how you can find the number of IP addresses in a subnet and how you can find the first and last IP address in the range. In my article about subnetting and CIDR I looked at how you can identify what part of an IP address is part of the network.








How to find subnet magic number