How to do subnetting

In order to efficiently manage a large network with many devices, subnetting is necessary. Splitting a network into smaller subnets allows for better bandwidth utilization and faster transmission speeds.

Subnetting enables network administrators to create smaller, more manageable subnetworks with fewer devices.

The subnet mask provides information about which bits in an IP address represent the network and which bits represent the host. The prefix length indicates how many bits in the subnet mask represent the network.

For example: an IPv4 address with subnet mask

IPv4 address Subnet Mask Prefix
192.168.1.0 255.255.255.0 24
IPv4 address Binary Subnet Mask Binary Prefix
11000000.10101000.00000001.00000000 11111111.11111111.11111111.00000000 24

Looking at the table above, we can see that the first three octets of the IP address consist of all 1s, which correspond to the network bits. Therefore, the network portion of the address is 192.168.1.

When the host bits in an IP address are set to 0, that part of the address is reserved for the network address. In this case, the first usable host address would be obtained by adding 1 to the network address, resulting in 192.168.1.1.

On the other hand, when the host bits in an IP address are all set to 1, that part of the address is reserved for the broadcast address. The last usable host address in this case would be obtained by subtracting 1 from the broadcast address, giving us 192.168.1.254.

Subnetting

If you’re designing a network to support just 12 hosts, using the entire address range of 192.168.1.0/24 would be inefficient, since it can accommodate up to 253 hosts. To make the most of your available address space, you’ll need to subnet the network.

To determine the appropriate subnet for your network, you’ll need to do some basic math. Since each bit in binary notation represents 2 possibilities, reserving 4 bits for the host portion of the address will allow for up to 14 hosts (2^4-2). This means that the last octet of the IP address will have 4 bits for the hosts and the remaining 4 bits will be used for the network.

When planning a network to support a small number of hosts, it’s important to use your available address space efficiently. In the case of 192.168.1.0/24, which can accommodate up to 253 hosts, you’ll want to subnet the network to make the most of it. This involves reserving 4 bits for the host portion of the address, which will allow for up to 14 hosts (2^4-2), while using the remaining 4 bits for the network portion.

192.168.1.0 11000000.10101000.00000001.00000000

So the network address for a subnet of 12 hosts is 192.168.1.0/28

what is the next network? You can find the next network address by incrementing 1 on the network bits, so the last octet would be 00010000 which is equivalent to 16 in decimal.

So the next network address is 192.168.1.16/28

To find subsequent network addresses, you can use the same method and continue incrementing the value of the network bits by 1 based on the subnet mask being used.

VLSM (Variable Length Subnet Mask)

If you have varying numbers of hosts in different networks, you can use Variable Length Subnet Masking (VLSM) to optimize the use of network addresses. VLSM is similar to the method mentioned earlier, but requires you to subnet again every time you want to change the range of the network. This method allows you to allocate the number of IP addresses required for each subnet, eliminating IP address waste and improving the efficiency of the network.

For exmaple

192.168.1.0/28 192.168.1.16/28 192.168.1.32/28

These networks all have the same range and can accommodate a maximum of 14 hosts. However, if you have a network that only needs to support 2 hosts, you would need to use VLSM.

For example, if you need to allocate 12 hosts for network 1 and 2 hosts for network 2, the first network address can be 192.168.1.0/28 which is fine for 12 hosts. However, the next available address, 192.168.1.16 with a prefix of 28, can accommodate up to 14 hosts which would be a waste for just 2 hosts. In this case, you only need 2 bits for the hosts which gives you 2^2-2=2 possible host addresses. Therefore, the network address for network 2 would be 192.168.1.16/30.

Leave a Comment

Your email address will not be published. Required fields are marked *