# Subnetting /21 network

I've been trying to wrap my head around subnetting. I'm trying to find the network, usable host range, and broad cast for 42.128.188.148 /21.

So I wrote out the numbers 128, 64, etc... and lined up my binary network and host bits. As I understand it: the /21 tells we are operating on the 3rd octet from the left. So I aligned the binary, network and host bits with the number chart 128-1. It tells me there are 8 subnetworks 248 - 255; with 248 being the Network and 255 the broadcast, first host = 248(network bits) plus the 1 (host bit) = 249.

I must not be doing this right because when I plugged the original IP address and CIDR into a subnet calculator, it says the first usable host 42.128.184.1 …? Why does the last octet go to 1? Shouldn't the 3rd octet just keep going up by 1 until you reach the broadcast?

Your address is `42.128.188.148` and the CIDR is `/21` Your subnet mask will be `255.255.248.0`. When you do an AND operation between your address and the subnet mask, you obtain `42.128.184.0` which is your network address and can't be used as a host address.

``````        00101010.10000000.10111100.10010100  = 42.128.188.148
AND   11111111.11111111.11111000.00000000  = 255.255.248.0
____________________________________
00101010.10000000.10111000.00000000  = 42.128.184.0
``````

The first host will be next available address of the network: `42.128.184.1`.

It tells me there are 8 subnetworks 248 - 255; with 248 being the Network and 255 the broadcast, first host = 248(network bits) plus the 1 (host bit) = 249.

You have used 5 bits in the 3rd octet and 3 are left. `2^3 = 8 subnets`

Now, increment the remaining bits by 1.

``````00101010.10000000.10111000.00000000  = 42.128.184.0     1st network
00101010.10000000.10111001.00000000  = 42.128.185.0         .
00101010.10000000.10111010.00000000  = 42.128.186.0         .
00101010.10000000.10111011.00000000  = 42.128.187.0         .
00101010.10000000.10111100.00000000  = 42.128.188.0         .
00101010.10000000.10111101.00000000  = 42.128.189.0         .
00101010.10000000.10111110.00000000  = 42.128.190.0         .
00101010.10000000.10111111.00000000  = 42.128.191.0     8th network
``````

``````1st network: 42.128.184.0  Subnet mask: 255.255.248.0

2nd network:  42.128.185.0   Subnet mask: 255.255.249.0

3rd network:  42.128.186.0  Subnet mask: 255.255.250.0

4th network: 42.128.187.0  Subnet mask: 255.255.251.0