Introduction to Subnetting

Devices in computer networks use IP addresses to identify each other. An IP address consists of two addresses: the network address and the host address. Devices having the same network address can communicate directly.

What is Subnetting?

A subnet is a group of devices that have the same network address. If required, you can break a subnet into small subnets. Breaking a subnet into small subnets is known as subnetting. Subnetting does not create new subnets. It breaks existing subnets into small subnets. We use subnetting to convert a large-sized network into many small-sized manageable networks. For example, if a network has 1000 devices, you can divide it into two networks having 500 devices in each or four networks having 250 devices in each.

Subnetting components

Before we learn how subnetting works, we need to understand some basic terms and components. These are IP address, network address, host address, IP classes, and default IP subnets.

IP address

An IP address is a numeric identity of a device on a computer network. IP addresses are written and used in two formats: binary and decimal. Devices use IP addresses only in binary. Binary is complex. It uses only two numbers (0 and 1) to express all numbers, letters, and symbols.

Humans use decimal numbers. Decimal numbers are easy to use and remember. For example, 911 is a phone number used to contact emergency services in the USA. In binary, this number will be 1110001111.

If authorities ask you to choose and use this number in one format, which will you pick? Will you select the number 911 or 1110001111?

You will definitely select 911. It is much easier to remember and use.

No matter which format you select, devices always process this number in binary. If you choose decimal format, devices will convert the number into binary before use.

The same thing applies to IP addresses. We write and use them in decimal, but computers and other networking devices process them in binary. They convert them into binary before use. An IP address consists of 32 binary bits. It organizes binary bits into four sections. It keeps 8 bits in each. It uses a dot as a separator. The 8 bits are equal to 1 byte. We can also say an IP address has four bytes separated by dots.

IP bits in binary

From 8 binary bits, the maximum number we can make in decimal is 256. Computers start counting from 0. Because of this, each section in an IP address can have a decimal number from the range 0 -255.

IP bits in decimal

IP classes

There are five IP classes. The decimal number in the first section indicates the IP class.

Class Value range in the first section First address Last address
A 0-127 0.0.0.0 127.255.255.255
B 128-191 128.0.0.0 191.255.255.255
C 192-223 192.0.0.0 223.255.255.255
D 224-239 224.0.0.0 239.255.255.255
E 240-255 240.0.0.0 255.255.255.255

Network address and host address

An IP address contains two addresses: network address and host address. Network addresses create IP subnets. Host addresses provide identities to devices.

We can use only the IP addresses of classes A, B, and C to create IP networks. We cannot use class D and E's IP addresses. They are reserved for various functions of network services and research, respectively.

Classes A, B, and C allocate default sections for network and host addresses.

In class A, the first section is the network address. The remaining three sections are the host address.

In class B, the first and second sections are the network address. The third and fourth sections are the host address.

In class C, the first three sections are the network address. The fourth section is the host address.

default bits

Default IP subnets

Default allocation creates default IP subnets in each class. The following table lists default IP subnets.

Class Value range in the first section First IP subnet Last IP subnet
A 0-127 0.0.0.0 127.0.0.0
B 128-191 128.0.0.0 191.0.0.0
C 192-223 192.0.0.0 223.0.0.0

Since classes D and E are not available for network addressing, we cannot do subnetting in these classes.

Why is Subnetting necessary?

The major problem with default IP subnets is that they are not well-optimized. They provide more IP addresses than a network needs. For example, a class A subnet provides 16777216 IP addresses. Practically a network cannot have 16777216 devices in a single network. If we use this subnet to build a network, all the unused IP addresses will waste.

Subnetting solves this problem. It allows us to create subnets of our requirements. For example, we can break a class A subnet into 65536 subnets having 256 IP addresses in each subnet.

Key points:-

  • Computers and networking devices use IP addresses to identify each other on a computer network.
  • There are five IP classes.
  • We can use only three classes: A, B, and C, to provide network addressing.
  • An IP address consists of two addresses: network address and host address.
  • Network addresses create IP subnets. An IP subnet is a group of devices having the same network address.
  • Host addresses provide a unique identity to devices in IP subnets.
  • Default IP subnets provide more IP addresses than a typical network needs.
  • Subnetting allows us to break default IP subnets into small subnets.
  • Subnetting does not create new subnets. It breaks the existing subnet into smaller subnets.

ComputerNetworkingNotes CCNA Study Guide Introduction to Subnetting