IT Pro is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission. Learn more

What is subnetting?

Partitioning a single network can help relieve network congestion and increase security

A close-up of the end of a network cable, with points of multi-coloured light behind it against a black background

If you’ve ever had the chance to work for a larger company, especially one which has multiple offices, chances are that you’re already acquainted with subnetting in one form or another.

But employees who aren’t part of the company’s IT department might not always be aware of how big a role subnetting plays in their job, or even how the process works. In fact, your daily responsibilities, such as communicating with coworkers about a project, were made possible thanks to the security and efficiency provided by subnetting.

In basic terms, subnetting is the creation of a network within a network, often known as a subnetwork – or simply subnet. Also defined as a logical subdivision of an IP network, a subnetwork is more localised and compact than a main network.

Subnetting is most often done for efficiency purposes, allowing network traffic to be streamlined by erasing the need for it to travel through additional routers. This means that the data being transferred can travel to its destination as directly as possible, minimising any potential detours which could slow it down. 

One way of picturing this is by imagining you’re trying to take the public transport from Camden to the Emirates Stadium in London. To do so, you have to travel south on the Northern line to King’s Cross St Pancras, one of the main transport hubs of the city, and change onto the Piccadilly line to go back north again.

Subnetting this journey would mean creating an extra line to take passengers from Camden straight to Arsenal by simply going east. This would not only be faster due to a shorter travel distance but would also help travellers avoid the crowds at the busy station.

Although companies don’t always have the power to influence public transport infrastructure, they do have a say over the efficiency of their internal networks.

First, a look at IP addresses

It is important to understand IP addresses to fully comprehend the process of subnetting. IP addresses are combinations of 32-bit numbers, unique for each device, giving a maximum of 4,294,967,296 possible unique addresses in IP address version 4 (IPv4).

They are split into four octets, which is a group of eight bits. The most prevalent visible format of an IP address is created by converting each octet into a decimal, separated by a single dot. 

In an IP address, you’ll find a Network Prefix (or ID) and the Host ID, which can be thought of as two separate fields. These are separated according to the five classes of networks to which the IP address has been assigned. The classes are named alphabetically, ranging from A to E.

In the majority of cases, IP addresses are likely to be placed in the A to C class. Class D is reserved for multicasting, in which a single host can send a stream of data to multiple hosts at the same time. Class E, meanwhile, is reserved for research purposes respectively.

A Class A, B, or C TCP/IP network can be further divided, or subnetted, by an organisation's IT administrator.

Why use subnetting?

Soon after the IP system was introduced, it became clear that even as finding specific networks had become easier, sending data packets to specific machines on a network had become more difficult. Networks that are large enough to support entire organisations, and where network performance issues start to arise, are particular examples of this problem.

Subnets remedy this by breaking up the network into smaller parts, thereby reducing congestion. In this way, data packets are then able to be sent directly to their destination, avoiding bottlenecks (like the London underground example).

Organisations can use IP subnets to divide networks by physical constraint, e.g. smaller broadcast domains, or by logical reasoning e.g. for firewalls. In this way, subnets guide the choices that routers make.

Subnetting is also used to improve network security, as the divisions between each subnet allow organisations to enforce access controls - which also helps to contain any security incidents.

What is a subnet mask?

As with an IP address, a subnet mask comprises four bytes (32 bits) and is written in the same notation as an IP address. A typical example would be 255.255.255.0. For TCP/IP to work, you need a subnet mask.

Class A networks use a default subnet mask of 255.0.0.0 and have 0-127 as their first octet. Class B networks use a default subnet mask of 255.255.0.0 and have 128-191 as their first octet. Class C networks use a default subnet mask of 255.255.255.0 and have 192-223 as their first octet.

The subnet mask complements an IP address and determines the subnet to which said address belongs. An IP address has two components, the network address and the host address.

Subnetting further divides the host part of an IP address into a subnet and host address if additional subnetworks are needed. In effect, it masks an IP address and divides the IP address into network address and host address.

What is a default gateway?

When a computer on one network needs to communicate with a computer on another, it uses a router. A router specified on a host, which connects the host's subnet to other networks, is called a default gateway. This passes traffic on one subnet to devices on other subnets. This gateway often connects the local subnet to the internet.

Featured Resources

The Total Economic Impact™ Of Turbonomic Application Resource Management for IBM Cloud® Paks

Business benefits and cost savings enabled by IBM Turbonomic Application Resource Management

Free Download

The Total Economic Impact™ of IBM Watson Assistant

Cost savings and business benefits enabled by Watson Assistant

Free Download

The field guide to application modernisation

Moving forward with your enterprise application portfolio

Free Download

AI for customer service

Discover the industry-leading AI platform that customers and employees want to use

Free Download

Recommended

Server virtualisation: What is it and what are the benefits?
virtualisation

Server virtualisation: What is it and what are the benefits?

25 Jul 2022
Rogers Communication to invest C$10 billion in AI, oversight following outage
business transformation

Rogers Communication to invest C$10 billion in AI, oversight following outage

25 Jul 2022
Paessler PRTG Network Monitor 21.4 review: Hard to beat
Network & Internet

Paessler PRTG Network Monitor 21.4 review: Hard to beat

15 Mar 2022
Best paying tech jobs of 2022
Careers & training

Best paying tech jobs of 2022

10 Mar 2022

Most Popular

Why convenience is the biggest threat to your security
Sponsored

Why convenience is the biggest threat to your security

8 Aug 2022
UK water supplier confirms hack by Cl0p ransomware gang
ransomware

UK water supplier confirms hack by Cl0p ransomware gang

16 Aug 2022
How to boot Windows 11 in Safe Mode
Microsoft Windows

How to boot Windows 11 in Safe Mode

29 Jul 2022