An IP address contains a network portion and a host portion. The netmask determines the division between the portions. Together the operating system can determine which IPs are part of the local subnet and which ones are outside. I know this sounds really confusing so allow me to demonstrate. We will be using the Classless Internet Domain Routing (CIDR) notation.

An IP address (IPv4, 32 bits) of 192.168.1.200 with a subnet mask of 255.255.255.0 is represented in CIDR notation as: 192.168.1.200/24 (First 24 bits have binary value of 1, 11111111 = 255). The /24 is called the netmask.

• There’s one subnet with 256 addresses.
• Only 254 addresses are usable because the first one is used for the network address and the last is the broadcast address.

If we use 192.168.1.200/26, the netmask is 255.255.255.192. This netmask tells us that the  broadcast addresses will begin with 192.168.1 and that the range of each subnet is 64 (256-192). The way to find out the number of subnets and hosts is simple. Find out the number of added bits (26-24 = 2). Find out how many bits are left (8-2 = 6). Calculate 2^6 and you get 64. This is the number of hosts per subnet. For the total number of subnets all you do is divide 256/64 and we’ll get 4 subnets.

A table might make this clearer:

/24 1 256 0 0
/25 2 128 1 128
/26 4 64 2 192
/27 8 32 3 224
/28 16 16 4 240
/29 32 8 5 248
/30 64 4 6 252

The next steps is to find:

1. Network Address of the IP