Networks

icon picker
Subneting Process

Subnetting Overview

What is Subnetting?

Subnetting is the process of dividing the host part of an IP address to create smaller, more manageable networks called subnets.
This allows for efficient use of IP addresses and better management of network traffic and security.

What Part Do We Divide?

In subnetting, we divide the host part of an IP address.
By "borrowing" bits from the host portion, we increase the number of bits used for the network, creating more subnets.

Subnet Mask

A subnet mask is a 32-bit number that masks an IP address and divides it into network and host parts.
It is written in the same format as an IP address, using four octets (e.g., 255.255.255.0).
The subnet mask determines how many bits are used for the network and how many are used for hosts.

Each IP address consists of two parts? What are these two parts?

the network portion that identifies the network broadcast domain
the host portion which identifies the host within the local network
ok

Subnetting is possible based on number of bits burrowing from hosts portion. For example, if we have 8 bits allocated to host portion for /24 networks then we have 8 bits to work on so it depends how many subnetting we need to do. If we need to divide it to 2 subnets we need to burrow 1 bit. Formula is 2^n(number of bits burrowed from host portion).

Number of Subnets Formula: 2^n (where n = number of borrowed bits)
Number of Hosts per Subnet Formula: text 2^h - 2 (where h = remaining host bits)
ok

If we need to create 8 subnets network, we need to burrow 3 bits from the host portion (8bits) so it becomes 2^3 = 8. Now the host bits remains with 5 bits . Each subnet will have 32 ip addresses including NA and BA

Table 10
Borrowed Bits
Subnet Mask
# of Subnets (2^n)
Hosts per Subnet (2^h - 2)
1
1
/25
2
126
2
2
/26
4
62
3
3
/27
8
30
4
4
/28
16
14
5
5
/29
32
6
6
6
/30
64
2
7
7
/31
128
0
8
8
/32
256
0
There are no rows in this table

Maximum Subnets

/24 Network

Network Bits: 24
Host Bits: 8
Maximum Subnets: You can borrow up to 8 bits for subnetting.
Maximum subnets: 2^8=256(though using all bits leaves no room for hosts).
But the each subnet will have no hosts

/28 Network

Network Bits: 28
Host Bits: 4
Maximum Subnets: You can borrow up to 4 bits for subnetting.
Maximum subnets: 2^4=16(though using all bits leaves no room for hosts).
each subnet will have 16

/29 Network

Network Bits: 29
Host Bits: 3
Maximum Subnets: You can borrow up to 3 bits for subnetting.
Maximum subnets: 2^3=8(though using all bits leaves no room for hosts).

Conclusion

Subnetting is a technique to divide the host portion of an IP address to create more subnets.
The subnet mask indicates how the IP address is split between network and host parts.
The number of subnets you can create depends on how many host bits you allocate for subnetting, balancing the need for subnets with available hosts.

Determining Hosts per Subnet:
The number of usable host addresses per subnet is calculated as 2^ number of host bits−2. The subtraction of 2 accounts for the network and broadcast addresses.

Mathematical Example

Original Network: 192.168.1.0/24
Subnet Mask: 255.255.255.0
Number of Host Bits: 8 (since /24 uses 24 bits for the network)
Subnetting to /26:
New Subnet Mask: 255.255.255.192 (or /26)
Number of Network Bits: 26 (24 original + 2 borrowed)
Number of Subnets: 2^2=4 (since 2 bits are borrowed)
Hosts per Subnet: 2^6−2=62 (since 6 bits remain for hosts)
Subnet Ranges:
192.168.1.0/26: Hosts from 192.168.1.1 to 192.168.1.62
192.168.1.64/26: Hosts from 192.168.1.65 to 192.168.1.126
192.168.1.128/26: Hosts from 192.168.1.129 to 192.168.1.190
192.168.1.192/26: Hosts from 192.168.1.193 to 192.168.1.254

rocket

Case Study: Subnetting a Corporate Network

Scenario: A company has been assigned a single Class C network, 192.168.10.0/24, and needs to create subnets for different departments: HR, IT, and Sales. Each department requires its own subnet with at least 30 hosts.
Steps:
Determine Subnet Requirements:
Each department requires at least 30 hosts. Therefore, each subnet must accommodate 32 addresses (30 hosts + 1 network + 1 broadcast).
Calculate Subnet Size:
To accommodate 32 addresses, you need 5 host bits (2^5=32). This leaves 3 bits for the network portion (since a Class C network originally has 8 host bits).
Determine Subnet Mask:
The new subnet mask is 255.255.255.224 (or /27), allowing for 8 subnets (2^3=8)
Assign Subnets:
HR: 192.168.10.0/27 (Hosts: 192.168.10.1 to 192.168.10.30)
IT: 192.168.10.32/27 (Hosts: 192.168.10.33 to 192.168.10.62)
Sales: 192.168.10.64/27 (Hosts: 192.168.10.65 to 192.168.10.94)
Conclusion: By subnetting the network, the company efficiently allocates IP addresses to each department, ensuring optimal performance and security.

Considerations

Plan Subnets Carefully: Ensure that each subnet has enough addresses for current and future needs.
Document Subnetting Scheme: Keep detailed records of your subnetting plan for reference and management.
Use VLSM: Variable Length Subnet Masking (VLSM) allows for different subnet sizes within the same network, optimizing address usage.
By understanding and applying these principles, subnetting can significantly enhance network efficiency, performance, and security. Use these notes to guide your understanding and discussions on the topic.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.