Subnetting Type

What is IP Subnetting?

IP Subnetting is a process of dividing a large IP network in smaller IP networks. In Subnetting we create multiple small manageable networks from a single large IP network.

Let’s take an example.

To best utilize available addresses if we put more than 16000000 hosts in a single network, due to broadcast and collision, that network will never work. If we put less hosts then remaining addresses will be wasted.

Subnetting provides a better way to deal with this situation. Subnetting allows us to create smaller networks from a single large network which not only fulfill our hosts’ requirement but also offer several other networking benefits.

I have already explained the advantages of Subnetting along with why Subnetting is necessary in previous parts of this tutorial. In this part, I will mainly focus on Subnetting components and terminology.

This tutorial is the third part of the article “IP Subnetting in Computer Network Step by Step Explained with Examples”. Other parts of this article are following.

This tutorial is the last part of the article. It explains Supernetting in detail with examples.

Network portion vs Host portion

Advertisements

Identifying network portion and host portion in an IP address is the first step of Subnetting. Subnetting can only be done in host portion. Subnet mask is used to distinguish the network portion from host portion in an IP address.

An IP address and a subnet mask both collectively provide a numeric identity to an interface. Both addresses are always used together. Without subnet mask, an IP address is an ambiguous address and without IP address a subnet mask is just a number.

Both addresses are 32 bits in length. These bits are divided in four parts. Each part is known as octet and contains 8 bits. Octets are separated by periods and written in a sequence.

IP address 32 bit

Subnet mask assigns an individual bit for each bit of IP address. If IP bit belongs to network portion, assigned subnet mask bit will be turned on. If IP bit belongs to host portion, assigned subnet mask bit will be turned off.

There are two popular notations to write the IP address and Subnet mask; Decimal notation and Binary notation.

In decimal notation, a value range 1 to 255 represents a turned on bit while a value 0 (zero) represents a turned off bit.

IP address with subnet mask decimal notation

In binary notation, 1 (one) represents a turned on bit while 0 (zero) represents a turned off bit.

ip address in binary notation

Examples of IP address with subnet mask in binary format

00001010.00001010.00001010.00001010
11111111.00000000.00000000.00000000

10101100.10101000.00000001.00000001
11111111.11111111.00000000.00000000

11000000.10101000.00000001.00000001
11111111.11111111.11111111.00000000

Examples of IP address with subnet mask in decimal format

10.10.10.10
255.0.0.0

172.168.1.1
255.255.0.0

192.168.1.1
255.255.255.0

In above examples network portion is formatted in bold text.

Reserve IP classes, network bits and host bits

Advertisements

Each IP address belongs to a predefined IP class. There are five predefined IP classes; A, B, C, D and E. From these classes, class D and E are reserved and cannot be used in Subnetting.

To learn more about IP address and its classes, you can see this tutorial.

IP Address Classes and Definition Explained

It explains IP address, IP classes, Types of IP address, Private IP address, Public IP address and much more in detail.

In class A, B and C: -

  • First 8, 16 and 24 bits are reserved for network portion respectively.

  • Last 2 bits (31 & 32) are reserved for host portion.

reserved network bits

Reserved network bits and host bits cannot be used in Subnetting.

IP Class

First IP Address of class

Last IP Address of class

Default Subnet Mask

Default Network bits

Host bits

Reserved host bits

A

0.0.0.0

127.255.255.255

255.0.0.0

First 8 bits

9 to 30

31, 32

B

128.0.0.0

191.255.255.255

255.255.0.0

First 16 bits

17 to 30

31, 32

C

192.0.0.0

223.255.255.255

255.255.255.0

First 24 bits

25 to 30

31, 32

Subnetting eligible host bits

After excluding reserved network bits and host bits, remaining bits are considered as Subnetting eligible host bits.

subnetting eligible bits

Subnetting can be done only in Subnetting eligible bits.

Subnet

A subnet is a single small network created from a large network. In Subnetting we break a single large network in multiple small networks. These networks are known as subnets.

Network address and Broadcast address

In each network there are two special addresses; network address and broadcast address. Network address represents the network itself while broadcast address represents all the hosts which belong to it. These two addresses can’t be assigned to any individual host in network. Since each subnet represents an individual network, it also uses these two addresses.

In simple language, in a single network only two IP addresses will be used for these addresses. But if we breaks this network in two small networks then four IP addressed will be used for these addresses.

Network address and broadcast address are also known as Network ID and broadcast ID respectively.

Valid host addresses

All addresses between Network address and Broadcast address are known as valid host addresses. Only valid host addresses can be assigned to the devices in a network. These devices include end user devices such as computes, laptops, tablets, smartphones, IP phones, servers, printers, terminals, IP camera and networking devices such switches, routers, firewalls and proxy servers. In short, any device that uses IP protocol for data transferring needs a valid host address.

Block Size

Block size is the sum of network address, valid host addresses and broadcast address. For example, if in a network there are 6 valid hosts than block size of that network is 8 (1 network address + 6 valid hosts + 1 broadcast address).

Power of 2

An IP address is built from the various combinations of IP bits. Understanding how many combinations the number of bits provides or to get the number of combinations how many bits we need is the second essential step of Subnetting.

  • A combination of all 32 represents a unique IP address.

  • A combination of network bits in IP address represents the number of networks or subnets.

  • A combination of host bits in IP address represents the number of total hosts.

To know how many combinations the number of bits provides or to get the number of combinations how many bits are required, we use the power of 2.

For example, to break a single large network in 4 subnets, we need 2 (22 = 4) Subnetting bits. This way if we have 3 Subnetting bits, we can make 8 (23 = 8) additional networks.

Following table lists the power of 2 till 32.

2X

Value

2X

Value

2X

Value

2X

Value

1

2

9

512

17

131072

25

33554432

2

4

10

1024

18

262144

26

67108864

3

8

11

2048

19

524288

27

134217728

4

16

12

4096

20

1048576

28

268435456

5

32

13

8192

21

2097152

29

536870912

6

64

14

16384

22

4194304

30

1073741824

7

128

15

32768

23

8388608

31

2147483648

8

256

16

65536

24

16777216

32

4294967296

In 2X the X is the number of bits.

Subnetting Direction

Subnetting always flows in single direction (left to right) without skipping any bit. This simple rule gives us the exact location of Subnetting bits in an address space. Let’s take an example.

A class C network is subnetted in 4 subnets. Find the number of host bits used in Subnetting and their location in address space.

To create 4 subnets we need to 2 (22 = 4) Subnetting eligible host bits.

Since in class C network space Subnetting eligible bits starts from 25 and Subnetting always goes from left to right without skipping any bit, the bits used in this network are 25 and 26.

Slash Notation

It’s a compact representation of Subnet mask. In this notation a slash (/) sign and total number of the on bits in subnet mask are written with IP address instead of full Subnet mask.

Following table lists some examples of IP addresses with Subnet mask in all three notations.

In Slash notation

In binary notation

In decimal notation

10.10.10.10/8

00001010.00001010.00001010.00001010 11111111.00000000.00000000.00000000

10.10.10.10 255.0.0.0

172.168.1.1/16

10101100.10101000.00000001.00000001 11111111.11111111.00000000.00000000

172.168.1.1 255.255.0.

192.168.1.1/24

11000000.10101000.00000001.00000001 11111111.11111111.11111111.00000000

192.168.1.1 255.255.255.0

192.168.1.1/28

11000000.10101000.00000001.00000001 11111111.11111111.11111111.11110000

192.168.1.1 255.255.255.240

Type of Subnetting

There are two types of Subnetting FLSM and VLSM. In FLSM, all subnets have equal number of host addresses and use same Subnet mask. In VLSM, subnets have flexible number of host addresses and use different subnet mask.

Following figure shows an example of FLSM and VLSM.

FLSM is easy in implementation and simple in operation but wastes a lot of IP addresses. VLSM is hard in implementation and complex in operation but utilizes maximum IP addresses.

Last updated