# Why is this a network if all host bits are zeros?

let's say that we have a router with address: 172.31.219.33/27 from this I can tell several things:

1. Subnet mask: 255.255.255.224
2. Broadcast address (here I am not sure if last digit should 64 or 65 - see later): 172.31.219.64
3. Last host address (since we know broadcast address; also not sure if last digit should be 63 or 62): 172.31.219.63

We could also tell first host address (172.31.219.33) and network address (172.31.219.32).

I don't understand two things:

1. Why is first host address X.X.X.33? It is like the router is already host?
2. Why is network address X.X.X.32? In other way, why it is not X.X.X.33 (from router address)?
• On points 2 and 3: The broadcast address is 172.31.219.63, making the last host address 172.31.219.62. 172.31.219.64 would be the network address of the next subnet (X.X.X.64-X.X.X.95). Jan 7 '15 at 20:38

Why is first host address X.X.X.33?

1. It is like the router is already host?
2. Why is network address X.X.X.32? In other way, why it is not X.X.X.33 (from router address)?

The reason for calculating network addresses and host addresses like this is specified in RFC 950 and RFC 1878; contiguous binary network masks are used to divide IPv4 addresses into host portions and network portions; if the host portion is all-zeros, that is by-definition a network, and not a host.

``````10101100.00011111.11011011.00100001    => IP 172.31.219.33 as binary
11111111.11111111.11111111.11100000    => 27-bit network mask (binary AND with IP for net)
^^^^^
Host bits are zero in a network mask
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Network bits are ones in a network mask
----------------------------------------------------------------------------
10101100.00011111.11011011.00100000    <= 172.31.219.32 is the *network*
``````

If you need help understanding how to calculate these correctly, we have many Q&As which already respond to this problem.

The first address of each subnet may be the broadcast address.

"WAIT", I hear you scream. "I thought the LAST address of each subnet was the broadcast address!"

Yeah, that is what they teach you, isn't it? "They" just expect people to be trusting and follow whatever rules people teach.