# Understanding IP Address and Subnets

For their entire working careers, the vast majority of IT people have glanced at their subnet when they run ifconfig and noticed that 99% of the time it says 255.255.255.0 and thought no more about that. If someone were to think about this further they might wonder what’s the point in having this number if it always appears to be the same.That’s a good question. Here we explain what the subnet really means and how it relates to IP addresses.

### Subnets

An IP address is broken into four decimal numbers ranging from 0 to 255 and arranged into groups like this nnn.nnn.nnn.nnn. Let’s call each group an octet as it is 8 bits.The reason that the highest octet value is 255 is that IP addresses are given in bits, which are the power of 2.The maximum number you can write with bit notation is with 8 1’s or 11111111=255.This notation 11111111 is powers of 2, since each bit can be a 0 or a 1. So it is this:1×2⁷+1×2⁶+1×2⁵+1×2⁴+1×2³+1×2²+1×2¹+1×2⁰=255Now, the subnet, also called the subnet mask, means what network an IP address is on. Having a subnet tiedto an IP address is supposed to speed up a router by having it check fewer possibilities.Obviously you can easily see that if the devices in your home network all look like 192.168.1.x then the network portion of that address is 192.168.1. The last octet, .2 in this case, denotes the host.