Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

Subnetting an IPv4 Network

What is Subnetting ?
• Subnetting is the strategy used to partition a single physical network into more than one smaller logical
sub-networks (subnets).

• An IP address includes a network segment and a host segment. Subnets are designed by accepting bits
from the IP address's host part and using these bits to assign a number of smaller sub-networks inside
the original network.

• Subnetting allows an organization to add sub-networks without the need to acquire a new network
number via the Internet service provider (ISP).
Why Use Subnetting?
• Conservation of IP addresses:
– Imagine having a network of 20 hosts. Using a Class C network will waste a lot of IP addresses (254-20=234). Breaking up
large networks into smaller parts would be more efficient and would conserve a great amount of addresses.

• Reduced network traffic:


– The smaller networks created the smaller broadcast domains are formed hence less broadcast traffic on network
boundaries.

• Simplification:
– Breaking large networks into smaller ones could simplify fault troubleshooting by isolating network problems down to their
specific existence.

• Security:
– Enables an administrator to implement security policies such as which subnets are allowed or not allowed to communicate
together.
Ways of using Subnetting
Subnetting by Location
Ways of using Subnetting
Subnetting by group or function
Ways of using Subnetting
Subnetting by Device Type
Types of Subnetting
Subnetting an IPv4 Network
Subnetting a /24 Network

Subnets can borrow bits from any host bit position to create other masks.
Subnetting an IPv4 Network
Subnetting a /24 Network
Subnetting an IPv4 Network
Subnetting Formulas
Calculate Number of Subnets Formula
Subnetting a /24 Network
Subnetting an IPv4 Network
Subnetting Formulas (Cont.)
Calculate Number of Hosts Formula

Calculating the Number of Hosts


Subnetting an IPv4 Network
Subnetting with the Magic Number
• Magic number technique used to calculate subnets

• Magic number is simply the place value of the last one in the subnet mask

• /25 11111111.11111111.11111111.10000000 magic number = 128

• /26 11111111.11111111.11111111.11000000 magic number = 64

• /27 11111111.11111111.11111111.11100000 magic number = 32


Subnetting an IPv4 Network
Subnetting with the Magic Number (Cont.)
Subnetting an IPv4 Network
Subnetting with the Magic Number (Cont.)
Subnetting to Meet Requirements
Subnetting Based On Network Requirements
• Host devices used by employees in the
Engineering department in one network
and Management in a separate
network.
Example 01
• Consider-
– We have a big single network having IP Address 200.1.2.0.
– We want to do subnetting and divide this network into 2 subnets.
Example 01
• Consider-
– We have a big single network having IP Address 200.1.2.0.
– We want to do subnetting and divide this network into 2 subnets.
Example 02
• Consider-
– We have a big single network having IP Address 200.1.2.0.
– We want to do subnetting and divide this network into 4 subnets.
Example 02
• Consider-
– We have a big single network having IP Address 200.1.2.0.
– We want to do subnetting and divide this network into 4 subnets.
Subnetting to Meet Requirements
Subnetting Based on Host Requirements
According to Hosts
Our organization would like to use the 192.168.0.0/24 on all the LAN networks

Each having 20 computers

Step 1:

Identify the number of hosts and convert this value to number of bits required

No. of hosts: 20

No of bits: 5
1 0 1 0 1
According to Hosts
Step 2:
Use the above bits to calculate new subnet mask and increment

Current Subnet mask: 255.255.255.0

Binary format 11111111.11111111.11111111.00000000

Now we will need to add the above 2 bits into the subnet mask

Since we are Subnetting according to hosts we will add zeros from right to left and then the rest will be filled with
ones.

New Subnet Mask 11111111.11111111.11111111.11100000

Decimal Notation: 255.255.255.224

Increment = 32

1 1 1 0 0 0 0 0
Step 3:
Use increment to find Network ranges and valid Host ID’s

Increment = 32

Broadcast
Network ID First Valid Host Last Valid Host
Address
192.168.0.0 192.168.0.1 192.168.0.30 192.168.0.31
192.168.0.32 192.168.0.33 192.168.0.62 192.168.0.63
192.168.0.64 192.168.0.65 192.168.0.94 192.168.0.95
192.168.0.96 192.168.0.97 192.168.0.126 192.168.0.127
192.168.0.128 192.168.0.129 192.168.0.158 192.168.0.159
192.168.0.160 192.168.0.161 192.168.0.190 192.168.0.191
192.168.0.192 192.168.0.193 192.168.0.222 192.168.0.223
192.168.0.224 192.168.0.225 192.168.0.254 192.168.0.255
Benefits of Variable Length Subnet Masking
Traditional Subnetting Wastes Addresses
Benefits of Variable Length Subnet Masking
Traditional Subnetting Wastes Addresses
Benefits of Variable Length Subnet Masking
Variable Length Subnet Masks (VLSM)
Traditional Subnets of Varying Sizes
Benefits of Variable Length Subnet Masking
Basic VLSM
Basic Subnetting
Benefits of Variable Length Subnet Masking
VLSM Basics
• Basic VLSM
– Subnets do not have to be equal sizes, as long as their address ranges do not overlap.
– When creating subnets it is easier to work from larger to smaller.
Benefits of Variable Length Subnet Masking
VLSM Chart
Benefits of Variable Length Subnet Masking
VLSM Example
• Given the network 172.16.0.0 /23 creates subnets: /23 = 2^9 hosts = 512
– 1 network for 200 hosts - 256 256+128+64+32+16+16 = 512 hosts needed
– 1 network for 100 hosts - 128 Address range 172.16.0.0 – 172.16.1.255
– 1 network for 50 hosts - 64
– 1 network for 25 hosts - 32
– 1 network for 10 hosts - 16
– 4 point-to-point networks for 2 hosts each – 4x4 = 16

172.16.1.248 /30 (4)


172.16.1.252 /30 (4)

You might also like