Subnetting IP Addresses
Subnetting is done to break a larger network into smaller networks. For example, if you have a class C
network, you have 254 possible host addresses. However, if you only need to use 28 hosts, the other
addresses would be wasted, as no one else can use them. Subnetting allows for the division of larger
networks into smaller networks.
Remember the binary number progression:
128 64 32 16 8 4 2 1
If you know the subnet mask
1. Subtract Subnet mask from 256
Result is starting network address and block size
2. Figure out network addresses
Add block size to self up to subnet mask
3. Figure out Broadcast addresses
One less than next network address
4. Figure out available addresses
Between Network and Broadcast
In any octet, the number of host bits that can be taken and their corresponding subnet masks are as
Bits Taken Subnet Mask Block Size Binary equivalent
1 128 128 10000000
2 192 64 11000000
3 224 32 11100000
4 240 16 11110000
5 248 8 11111000
6 252 4 11111100
7 254 2 11111110
8 255 1 11111111
Practice writing out this chart. You can use the chart to answer questions about subnets, when you know
the subnet mask.
For example, if you need to figure out the network address for the IP 22.214.171.124 255.255.240.0.
1. Look up 240 as a subnet mask in the chart.
2. Check the block size associated with that subnet mask.
3. Starting with the original classful address, start counting up bu the block size to find the network
for the IP address you are investigating.
NOTE: The network address is always less than an IP address.
4. In this example, the answer is 126.96.36.199. This is the highest subnetwork address without
going past the IP address.
Choosing the subnet mask
Figure out how many hosts or how many networks you need-This will tell you how many bits you will
need in your subnet mask. Use the formula 2
-2, where n is the number of bits you will need.
For example, if you needed 28 addresses while subne tting a class C network, you would need 5 bits for
You couldnt use only 4 bits because 2
-2= 14, which would not be enough hosts. Now that you know
how many bits you need for hosts, figure out how many are for network. In this case 3 bits are for the
network(because 8-5 is 3).
Now that you know how many bits you need (3), calculate the subnet mask. You will be taking bits
from the left hand side of the host portion such that the eight bit binary representation is 1 1 1 0 0 0 0 0.
This is a subnet mask of 224 (128 + 64 + 32).
Calculate the network addresses for the networks by subtracting the subnet mask from 256.
256-224= 32. This means your first subnetwork addr ess is 32. You can then calculate the rest of the
subnet addresses by adding this number to the original subnet address:
32 + 32= 64
64 + 32=96
96 + 32=128
128 + 32=160
160 + 32=192
You cannot use 224, as the subnet mask is 224)
Figure out the broadcast address for each network. The broadcast address will be one less than the next
Subnetwork Address Broadcast Address
The remaining addresses between the subnetwork address and the broadcast address are the valid host
Internet addresses contain the network portion and the host portion. The network portion precedes the host portion.
For example, in a Class A IP address, the first octet (8 bits) is the Network Address, and the last three octets (24 bits) are the host address:
Other Important Addresses include the Loopback address:
The numbers 0 and 255 can not be used to represent hosts on a network.
The 0 address is used to refer to the network as a whole. For example, if your computer has the address 192.168.10.12, 192.168.10.0 is your
The 255 address is used for broadcasting messages. The address 255.255.255.255 is used in autoconfiguration protocols like BOOTP an DHCP. On
a particular network, 255 will broadcast to all hosts on that network. For example, if the network portion of your IP address is 192.32.200 and the
host portion is 12, your computer can broadcast messages to all network hosts by using the destination address 188.8.131.52.
Class A Class B Class C
184.108.40.206 to 220.127.116.11 18.104.22.168 to 22.214.171.124 192.0.0.0 to 126.96.36.199
255.0.0.0 255.255.0.0 255.255.255.0
10.0.0.0 to 10.255.255.255
172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255