Subnetting

Subnetting is defined as breaking down of huge network address to manageable networks. For the subnet addressing scheme to work, every host on the network must know which part of the host address will be used as the subnet address. The table gives the default subnet mask of each class.

CIDR notation indicates the network mask for an address and adds on the total number of turned on bits in the entire address using slash notation.

Default Subnet Mask

ClassFormatDefault Subnet MaskCIDR
Anetwork.host.host.host255.0.0.0/8
Bnetwork.network.host.host255.255.0.0/16
Cnetwork.network.network.host255.255.255.0/24

Subnetting Formula

How many subnets? 2x = number of subnets. x is the number of masked bits or turned on network bit.

How many hosts per subnet? 2y – 2 = number of hosts per subnet. y is the number of unmasked bits or turned off host bit.

What are the valid subnets? 256 – subnet mask = block size

What’s the broadcast address for each subnet? The number right before the value of the next subnet.

Subnet0128
First host1129
Last host126254
Broadcast Address127255

Real-world Problem

Scenario I

192.168.1.0/24 network address is assigned to do subnetting for the topology seen below.

Explanation I

Total required networks include:

  • 2 LANs individually connected with the highest number of connected hosts, that is 2.
  • 1 WAN between routers
  • Given network address is 192.168.1.0/24 which belongs to Class C with default subnet mask 255.255.255.0
  • If we subnet with /26 i.e., 255.255.255.192, then block size is: 256 – 192 = 64
  • Subnetwork: 22 = 4
  • Valid Hosts per subnetwork 26 - 2 = 62

Answer I

  1. How many subnetworks can be seen as requirements in the figure above? 3
  2. How many maximum hosts are required in any subnetwork? 3
  3. How many bits will be borrowed from hosts portion in order to accommodate the required number of subnets? 2
  4. How many subnetworks will be created by borrowing the bits as mentioned above? 22 = 4
  5. How many subnetworks will remain unused for future use? 4 – 3 = 1
  6. How many valid host addresses will be available per subnetwork? 26 - 2 = 62
  7. After changing the length/CIDR of original network, what is the new subnet mask? 255.255.255.192
  8. Fill in the following table with the subnetwork’s information.
Subnetwork #Subnetwork AddressFirst Valid HostLast Valid HostBroadcast Address
1192.168.1.0192.168.1.1192.168.1.62192.168.1.63
2192.168.1.64192.168.1.65192.168.1.126192.168.1.127
3192.168.1.128192.168.1.129192.168.1.190192.168.1.191
4192.168.1.192192.168.1.193192.168.1.254192.168.1.255

Scenario II

192.168.20.0/24 network address is assigned to you to do subnetting for the topology seen below.

Explanation II

Total required networks include:

  • 4 LANs individually connected with the highest number of connected hosts, that is 3.
  • 4 WAN between routers
  • Given network address is 192.168.20.0/24 which belongs to Class C with default subnet mask 255.255.255.0
  • If we subnet with /27 i.e., 255.255.255.224, then block size: 256 – 192 = 64
  • Subnetwork: 23 = 8
  • Valid Hosts per subnetwork 25 - 2 = 30

Answer II

  1. How many subnetworks can be seen as requirements in the figure seen above? 8
  2. How many maximum hosts are required in any subnetwork? 3
  3. How many bits will be borrowed from hosts portion in order to accommodate the required number of subnets? 3
  4. How many subnetworks will be created by borrowing the bits as mentioned above? 23 = 8
  5. How many subnetworks will remain unused for future use? 8 – 8 = 0
  6. How many valid host addresses will be available per subnetwork? 25 - 2 = 30
  7. After changing the length/CIDR of original network, what is the new subnet mask? 255.255.255.224
  8. Fill in the following table with the subnetwork’s information.
Subnetwork #Subnetwork AddressFirst Valid HostLast Valid HostBroadcast Address
1192.168.20.0192.168.20.1192.168.20.30192.168.20.31
2192.168.20.32192.168.20.33192.168.20.62192.168.20.63
3192.168.20.64192.168.20.65192.168.20.94192.168.20.95
4192.168.20.96192.168.20.97192.168.20.126192.168.20.127
5192.168.20.128192.168.20.129192.168.20.158192.168.20.159
6192.168.20.160192.168.20.161192.168.20.190192.168.20.191
7192.168.20.192192.168.20.193192.168.20.222192.168.20.223
8192.168.20.224192.168.20.225192.168.20.254192.168.20.255

Scenario III

172.16.0.0/16 network address is assigned to you to do subnetting for the topology seen below.

Explanation III

Total required networks include:

  • 9 LANs individually connected with the highest number of connected hosts, that is 3900.
  • 6 WANs between routers. 4
  • Given network address is 172.16.0.0/16 which belongs to Class B with default subnet mask 255.255.0.0
  • If we subnet with /20 i.e., 255.255.240.0, then the block size: 256 – 240 = 16
  • Subnetwork: 24 = 16
  • Valid hosts per subnetwork 212 - 2 = 4094

Answer III

  1. How many subnetworks can be seen as requirements in the figure seen above? 15
  2. How many maximum hosts are required in any subnetwork? 3900
  3. How many bits will be borrowed from the host portion in order to accommodate the required number of subnets? 4
  4. How many subnetworks will be created by borrowing the bits as mentioned above? 24 = 16
  5. How many subnetworks will remain unused for future use? 16 – 15 = 1
  6. How many valid host addresses will be available per subnetwork? 212 - 2 = 4094
  7. After changing the length/CIDR of original network, what is the new subnet mask? 255.255.240.0
  8. Fill in the following table with the subnetwork’s information.
Subnetwork #Subnetwork AddressFirst Valid HostLast Valid HostBroadcast Address
1172.16.0.0172.16.0.1172.16.15.254172.16.15.255
2172.16.16.0172.16.16.1172.16.31.254172.16.31.255
3172.16.32.0172.16.32.1172.16.47.254172.16.47.255
4172.16.48.0172.16.48.1172.16.63.254172.16.63.255
5172.16.64.0172.16.64.1172.16.79.254172.16.79.255
6172.16.80.0172.16.80.1172.16.95.254172.16.95.255
7172.16.96.0172.16.96.1172.16.111.254172.16.111.255
8172.16.112.0172.16.112.1172.16.127.254172.16.127.255
9172.16.128.0172.16.128.1172.16.143.254172.16.143.255
10172.16.144.0172.16.144.1172.16.159.254172.16.159.255
11172.16.160.0172.16.160.1172.16.175.254172.16.175.255
12172.16.176.0172.16.176.1172.16.191.254172.16.191.255
13172.16.192.0172.16.192.1172.16.207.254172.16.207.255
14172.16.208.0172.16.208.1172.16.223.254172.16.223.255
15172.16.224.0172.16.224.1172.16.239.254172.16.239.255
16172.16.240.0172.16.240.1172.16.255.254172.16.255.255