## Pages

### Analyzing Existing Subnets - Faster Magic Number Method

This guide expands on how to quickly find the network ID, broadcast ID, and range of valid hosts. A previous guide showed how to achieve the same goal, but with utilizing binary math. Understanding the binary math is important, but it's also important to perform these operations quickly, which is why I'm sharing this method.
1.

### Examine the Question

First exam the question given, in this example we are given an IP address of a host and the subnet mask of that host. With this information we can find the Network ID, Broadcast ID, and range of valid IP addresses in that IPs range.
Example Question
IP Address: 10.180.10.18
Mask: 255.192.0.0
2.

### Identify the Interesting Octet

The interesting octet is the one with the subnet bits within it, this requires previous subnetting knowledge. As a general rule of thumb its the octet with a value other than 0 or 255. In our case it's the second octet with the value 192.
255.192.0.0
Each dot . represents an octet.
3.

### Find the MAGIC NUMBER!

The magic number is simple the difference of the interesting octet value and 256. To find this number use the following equation.
256 - (Interesting Octet Value)
256 - 192 = 64
64 is our Magic Number
Add attachment
4.

### Determine the Network Ranges

Using the Magic Number as our increment we can find the range associated with the IP address we were given above.
Increments of 64
0
64
128
192
256
Add attachment
5.

### Which Range does the IP Fall into?

Our IP address was 10.180.10.18, so we must find the two ranges that 180 would fall between.
128 & 192 are the ranges that 180 would be between.
6.

### Discover the Network ID

Our Network ID is the lowest of the two values ( 128 ), knowing that let's write out the Network ID.
10.128.0.0
We replace 180 with 128 because that is where the range starts, we also knock off the .10 & .18 and change them to 0s because the 0s represent the host portion of the mask.
7.

### What's the Broadcast?

Finding the broadcast ID is fairly simple. Take 192 the higher of the two ranges and subtract 1 from it, making it 191. Now since this is a broadcast we take the 0s of the Network ID and change them to .255. We do this because the broadcast is the very last IP address in the range and 255 is that value.
Broadcast ID
10.191.255.255
Add attachment
8.

### Valid Range of IP addresses

By far the simplest step, we now need to find the valid IP address for this range. To do this + 1 to the network ID and -1 from the broadcast ID. Below is lists the results
Range of Valid IP addresses
10.128.0.1 - 10.191.255.254
Double check your work and make sure 10.180.10.18 would exist between those ranges, if not you've made a mistake.